newapi_channel_conn 形式的 url + key
url: https://ai.kedang.netkey: sk-woUA…w8sSs(51 字符,存凭据库,见下)kedang,只登记用户指定的两个模型
GLM -5.3(⚠️ id 含空格,GLM 与 -5.3 之间有一个空格,照抄上游 id,不要改成 GLM-5.3)GLM-5.3-Flashdsh-llm-pi-ai 的 README.zh.md「配置提供方路由」):
providers → ~/.dsh/profiles/web/cordis.patch.yml 的 llm-pi-ai.config.providers.kedang~/.dsh/.credentials.yaml 的 refs.KEDANG_API_KEY,provider 里只写 apiKeyEnv: KEDANG_API_KEY (官方要求:配置文件绝不包含密钥)patchReload: live + credentials chokidar watch),改完不需要重启 DSH kedang:
displayName: 可达AI (new-api 聚合)
api: openai-completions
baseURL: https://ai.kedang.net/v1
apiKeyEnv: KEDANG_API_KEY
streamIdleTimeoutMs: 600000
reasoning: high
models:
- id: GLM -5.3
name: GLM-5.3 (可达AI)
contextWindow: 262144
maxTokens: 131072
input: [text] # 实测不支持图片
reasoningEfforts: { off: none, low: low, high: high, max: max }
- id: GLM-5.3-Flash
name: GLM-5.3-Flash (可达AI)
contextWindow: 262144
maxTokens: 131072
input: [text, image] # 实测支持图片
reasoningEfforts: { off: none, low: low, high: high, max: max }
compat:
thinkingFormat: deepseek
maxTokensField: max_tokens
supportsReasoningEffort: true
supportsDeveloperRole: false
(上面 reasoningEfforts 为行内简写,实际文件中是分行的块式写法。)
| 项 | GLM -5.3 | GLM-5.3-Flash |
|---|---|---|
| 基本对话 | ✅ 200,返回 reasoning_content | ✅ 200 |
| 视觉(64×64 左红右蓝图) | ❌ 400 image_url is only supported by certain models | ✅ 答「红色」 |
| tool_calls | ✅ finish_reason=tool_calls | ✅ |
| 流式 | ✅ SSE 正常 | ✅ |
max_tokens 上限 | 131072(262144/393216 报 max_tokens range is [1, 131072]) | 131072 |
thinking:{type:disabled} | ✅ 接受 | ✅ 接受 |
reasoning_effort none/low/high/max | ✅ 全接受(max 档 reasoning_tokens 明显上升) | ✅ 全接受 |
developer 角色 | ❌ 500(网关报 field messages is required) | ❌ 同类 → 统一 supportsDeveloperRole: false |
其它探测过但未登记的档(用户只要 GLM):qwen4-max、qwen3.8-max、GLM-5.2、kimi-k3.1-pro、MiniMax-M3.1-Flash、Deepseek-v4.1-flash、Deepseek-v4-pro、qwen3-vl-plus 均可用; KD ·GLM5.3(带间隔号的那个 id)不支持图片。要加模型只需在 models 下补一条 id。
yaml.parse 通过;并用 pi-ai 官方 Config() schema 对整份 providers 做过校验,不抛错。~/.dsh/profiles/web/cordis.patch.yml.bak-before-kedang-20261125-195359~/.dsh/.credentials.yaml.bak-before-kedang-<时间戳>GLM -5.3 的 id 含空格,若手动改成 GLM-5.3 会 400(上游没这个 id)。/v1/models 共 68 个模型,含大量 Seedance/Seedream/wan 视频图像生成档——DSH 是 chat/agent 场景,这些放进来只会污染选择器,故未登记。streamIdleTimeoutMs 设 600000(10 分钟),避免长 prompt 预填被默认 300s 掐断。Deepseek-v4.1-flash 已按用户要求加入模型目录(显示名 DeepSeek-V4.1-Flash-1017 (可达AI))。
model=deepseek-flash = 官方现行唯一档 DeepSeek-V4.1-Flash-1017;同站 deepseek-v4.1-flash-v 回显 deepseek-v4-1-flash-260910(火山旧快照),不录。max_tokens 到 393216 接受(按官方上限登记 384000);max_completion_tokens 被忽略;reasoning_effort 全档接受;视觉可用;tool_calls/流式正常。contextWindow 由 262144 修正为 1000000(智谱官方 1M / 输出 128K)。
thinking:{type:disabled} 吞掉,故 DSH 的 off 档不报错但也关不掉思考。/api/pricing/new 为准。