← Help Center· Desktop/Terminal

Connect Newcclm with DeepSeek Harness

Overview

DSH 的模型层是 pi-ai。它自带的 DeepSeek 目录走的是 Anthropic 协议(往 /anthropic/v1/messages 发请求), 而 Newcclm 只提供 OpenAI compatible的 /v1。

所以:必须添加一个自定义提供方,并且协议要选 openai-completions。 不要改 DeepSeek 目录里的 Base URL —— 那栏的协议不对,填了也连不上。

一句话理解:DSH 默认会走 DeepSeek 官方那条 Anthropic 通道。 我们不在那条通道上,所以你得自己加一个走 OpenAI 协议的入口。

2. 添加自定义提供方

  1. 打开 DSH Web UI → Settings → Models → 点 Add a custom provider。 不要点「Add provider」里的 DeepSeek 或 Anthropic 目录。
  2. 协议(API)选 openai-completions。 不要选 anthropic-messages or openai-responses。
  3. Base URL 填 https://sccclm.com/v1, 模型至少加上 newcclm(其余三个可以一起加上)。
Provider IDnewcclm
Base URLhttps://sccclm. com/v1
APIopenai-completions
Modelsnewcclm · newcclm-fast · newcclm-coding · newcclm-free

「获取可用模型」可以点。带 Key 时 GET /v1/models 会返回 200, 列表里就是上面这四个名字 —— 看不到别的底层型号。

3. 写入 settings. yaml

如果你想直接改配置文件,路径一般在 ~/.dsh/settings.yaml(即 $DSH_HOME/settings.yaml)。加上这一段:

llm-pi-ai:
  providers:
    newcclm:
      displayName: Newcclm
      api: openai-completions
      baseURL: https://sccclm.com/v1
      apiKeyEnv: NEWCCLM_API_KEY
      compat:
        supportsDeveloperRole: false
        maxTokensField: max_tokens
      models:
        - id: newcclm
        - id: newcclm-fast
        - id: newcclm-coding
        - id: newcclm-free

4. 设置环境变量

Key 不要写进 yaml。把它放到环境变量里:

export NEWCCLM_API_KEY="YOUR_API_KEY"
On Windows用set NEWCCLM_API_KEY=..., or write it into the system environment variable. For how to apply for a key, seeHelp Center Section 5。

5. Don't match it like this

这四种是最常见的错法:

Do not select the Anthropic protocol

# Error - will not be able to connect
api: anthropic-messages

# Correct
api: openai-completions

Do not enter the real model name

# Error - we only recognize our stall name
models:
  - id: deepseek-chat
  - id: gpt-4o

# Correct
models:
  - id: newcclm
  - id: newcclm-fast
  - id: newcclm-coding
  - id: newcclm-free

Do not add/chat/completions after baseURL

# Wrong
baseURL: https://sccclm.com/v1/chat/completions

# Correct
baseURL: https://sccclm.com/v1

Don't cram new providers into DeepSeek's preset

Some versions of DSH will detectdeepseekis used, the official default parameters will be applied. Causes the request to be sent to the wrong place. Provider ID usesnewcclmJust fine.

6. Take a test

保存后回到 DSH,在模型选择器里选 newcclm/newcclm,发一句「你好」。 能正常回复就通了。

如果 DSH 里报的是 Anthropic 相关的 404,可以忽略 —— 那是它在探测 DeepSeek 官方通道,不影响我们用 OpenAI 那条路。

想单独验证地址和密钥?

打开终端跑这一条(不经过 DSH,直接打我们的接口):

curl https://sccclm.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
-d '{"model":"newcclm-fast","messages":[{"role":"user","content":"Hello"}]}'

Returning JSON with content means that there is no problem with the key and address - then the error reported in DSH is a problem with the configuration writing method. If this also fails, resolve the key/network first and then look at the DSH configuration.

报 both_paths_failed 是怎么回事?

八成不是故障,是提供方加错了位置。

DSH 加了自定义提供方之后会同时探测两条路径: OpenAI 的 /v1 和 Anthropic 的 /anthropic/v1。 我们只有 OpenAI 那条,所以 Anthropic 那条会 404 —— 两边一综合,DSH 就报 both_paths_failed。

怎么办:确认协议是 openai-completions, 并且你没有把它加到 DeepSeek 或 Anthropic 的官方目录里。 官方目录自带 Anthropic 协议,填我们的地址也连不上。

How to read an error report:
· Invalid token→ The key is incorrect or the environment variable is not filled in
· model not found → 模型名写错了,只能是那四个档位名
· both_paths_failed → 见上面那条,通常是加错目录
· 500–504 → 服务端或上游临时问题,先别改配置,等几秒重试
· 401 andupstream→ This is a problem on our side, not your configuration.

Still not working

Send us these three things:

1. The section you wrote in settings.yaml (key coding)
2. Complete error reported by DSH
3. The output of curl above

Back to Help Center · Newcclm Client →