llm-pi-ai:无法在只接受 system 角色的 OpenAI 兼容网关(如火山方舟 plan)上控制自定义模型的思考深度
#3531
Replies: 2 comments
|
There is an important release boundary here: the limitation is accurate for rc.7, but rc.8 already exposes A route-wide rc.8 configuration can keep the reasoning selector while sending the system prompt as llm-pi-ai:
providers:
volcengine:
apiKeyEnv: VOLCENGINE_API_KEY
api: openai-completions
baseURL: https://ark.cn-beijing.volces.com/api/plan/v3
compat:
supportsDeveloperRole: false
models:
- id: deepseek-v4-flash
reasoningEfforts:
off: null
high: high
max: maxA model-level We updated the source-backed guide with the rc.7 workaround versus rc.8 native fix, precedence, backport boundary, and wire gates: https://sandbaseai.github.io/deepseek-harness-handbook/openai-compatible-developer-role.html Canonical source: The decisive verification remains the outbound |
|
如果不想在 settings 里逐个手填火山每个模型的 dsh plugin --profile web add pi2dsh
dsh plugin --profile web add pi-volcengine-provider
# 启动前 export VOLCENGINE_API_KEY=...
# restart dsh这个包对 13 个火山 Coding Plan 模型逐个声明真实思考档位,并统一带 我刚在全新 DSH profile 复核过: |
Uh oh!
There was an error while loading. Please reload this page.
在 DSH 的
llm-pi-ai自定义提供方上启用reasoningEfforts(即把模型标记为reasoning: true)后,pi-ai 会把系统提示词以role: developer发送。对只接受system/assistant/user/tool角色的 OpenAI 兼容网关(火山方舟/api/plan/v3、大量自建/中转网关),每条请求都返回 400。compat.supportsDeveloperRole是 pi-ai 内部自动探测字段,DSH 的compat配置未开放,因此用户无法通过配置关闭。环境
@deepseek-ai/dsh-llm-pi-ai/api/plan/v3(OpenAI Chat Completions 兼容,只认system角色)deepseek-v4-flash/deepseek-v4-pro/glm-5.2/glm-5.3/kimi-k3复现步骤
settings.yaml配置自定义提供方,并给模型加reasoningEfforts:预期行为
system角色发送;不 400。developer角色"。实际行为
每条消息 400:
{"code":"InvalidParameter","message":"The parameter `messages.role` specified in the request are not valid: invalid value: `developer`, supported values are: `system`, `assistant`, `user`, `tool`."}去掉
reasoningEfforts后恢复可用(但思考深度选择器也随之消失)。根因
reasoningEfforts→resolveModelReasoning返回reasoning: true。useDeveloperRole = model.reasoning && compat.supportsDeveloperRole;对未知端点,detectCompat给出supportsDeveloperRole: true(该 baseURL 不匹配任何"非标准"特征)。compat配置仅开放thinkingFormat与supportsReasoningEffort(config.tscompatProfile),supportsDeveloperRole属"刻意不开放"的其余 compat 面,无法覆盖为 false。即:
reasoning: true与"发system角色"在方舟上互相排斥,且配置层无解。建议修复
开放
compat.supportsDeveloperRole(route 级默认 + 模型级覆盖,解析顺序与现有两个开关一致,仅限openai-completions)。补丁见patch/0001-llm-pi-ai-expose-supports-developer-role.patch(6 文件、+57/-10,已通过git apply --check)。可选后续(独立):让 pi-ai
detectCompat对非标准/未知 URL 默认supportsDeveloperRole: false,从源头避免误判。变通方案(上游合并前)
reasoningEfforts(无选择器,但可用);developer角色的网关。附加信息
packages/llm/llm-pi-ai/README.zh.md「推理分派的 compat 开关」。developer角色),故不影响现有 catalog 路由。All reactions