| 项 | 值 |
|---|---|
| Provider id | volcengine-ark |
| 显示名 | 火山方舟 Ark |
| baseURL | https://ark.cn-beijing.volces.com/api/v3 |
| 协议 | openai-completions(DSH 的 OpenAI 兼容客户端) |
| 模型 id | deepseek-v4-1-flash-261017 |
| 上下文 / 最大输出 | 1,000,000 / 256,000(对齐 DSH 的 deepseek-official) |
| 输入模态 | text + image(实测图片可用) |
| 密钥 | ARK_API_KEY,存在 ~/.dsh/.credentials.yaml 的 refs 下 |
配置落点:~/.dsh/profiles/web/cordis.patch.yml 的 llm-pi-ai.config.providers 下。
volcengine-ark:
displayName: 火山方舟 Ark
api: openai-completions
baseURL: https://ark.cn-beijing.volces.com/api/v3
apiKeyEnv: ARK_API_KEY
reasoning: high
models:
- id: deepseek-v4-1-flash-261017
name: DeepSeek-V4.1-Flash 1017 (火山方舟)
contextWindow: 1000000
maxTokens: 256000
input: [text, image]
reasoningEfforts: { off: null, low: low, high: high, max: max }
compat:
thinkingFormat: deepseek
maxTokensField: max_tokens
supportsReasoningEffort: true
requiresReasoningContentOnAssistantMessages: true
为什么是这几个参数:DSH 里官方 DeepSeek 走的 deepseek-official 用的就是 1M 上下文 / 256K 输出 / thinking:{type} 开关 / 必须回传 reasoning_content。 方舟是同一模型的镜像部署,行为一致,所以照抄这套,只换 baseURL + 模型名 + 密钥引用。
| 能力 | 结果 |
|---|---|
/chat/completions 非流式 | ✅ 200,返回 reasoning_content(思考默认开) |
stream: true SSE | ✅ 标准 chunk |
tool_calls(函数调用) | ✅ 流式增量正常 |
image_url(data URI 图片) | ✅ 能识图 |
thinking: {type: disabled} | ✅ 思考关闭,直接出正文 |
thinking: {type: enabled} + reasoning_effort: high | ✅ 不报错 |
历史里回传 reasoning_content | ✅ 接受(这条最关键,很多中转会 400) |
max_tokens: 256000 | ✅ 接受 |
用 DSH 自己的客户端(不是 curl)跑了一次 headless 单轮:
dsh headless --patch /tmp/ark-e2e.yml "只回复两个字:收到" → 收到
MISSING_CREDENTIAL:原因是 headless profile 里 dsh-credentials-local 是 disabled: true,读不到 .credentials.yaml(不是配置写错)。SetLimitExceeded(安心体验模式限额)现象:
429 SetLimitExceeded
Your account [2107824605] has reached the set usage limit for the [deepseek-v4-1-flash]
model, and the model service has been paused. ... adjust or close the "Safe Experience Mode"
与 DSH 配置/密钥无关,是账号维度的「安心体验模式」把模型服务暂停了:
处置:
https://ark.volcengine.com/region:cn-beijing/openManagement)deepseek-v4-1-flash,关闭「安心体验模式」复测命令:
curl -sS --noproxy '*' https://ark.cn-beijing.volces.com/api/v3/chat/completions \
-H "Authorization: Bearer $ARK_API_KEY" -H 'Content-Type: application/json' \
-d '{"model":"deepseek-v4-1-flash-261017","messages":[{"role":"user","content":"hi"}],"max_tokens":8,"thinking":{"type":"disabled"}}'
cd ~/.dsh
ls profiles/web/cordis.patch.yml.bak-before-ark-* # 本次改动前的备份
cp profiles/web/cordis.patch.yml.bak-before-ark-<时间戳> profiles/web/cordis.patch.yml
# 密钥:从 .credentials.yaml 删掉 ARK_API_KEY 那一行(同目录有 .bak-before-ark-*)
说明:
patchReload: live,改完 patch 文件网页端会自动重载,无需重启 dsh; 但浏览器模型选择器需要刷新页面(Ctrl+F5)才看到新 provider。