-
-
Notifications
You must be signed in to change notification settings - Fork 52.7k
Description
中文
问题描述
在 OpenClaw 2026.2.23 中,使用 siliconflow provider 的 Pro/* 模型时,如果会话 thinking 为 off,embedded run 会稳定返回 400 status code (no body),随后触发 compaction/retry,导致 WebUI 看起来“每发一条就 compact 一次”。
这不是实际上下文溢出:fresh session 下 tokensBefore 很低(例如 121、15)也会触发。
影响模型(已实测)
Pro/deepseek-ai/DeepSeek-V3.2Pro/zai-org/GLM-4.7Pro/MiniMaxAI/MiniMax-M2.1Pro/moonshotai/Kimi-K2.5
复现步骤
- 配置
siliconflowprovider(api: "openai-completions")并将主模型设置为任一Pro/*。 - 使用默认 thinking
off(例如agents.defaults.thinkingDefault: "off")。 - 在 WebUI 或本地 embedded run 发起一次普通对话。
- 观察 gateway log:
embedded run start ... thinking=off后紧跟isError=true error=400 status code (no body),随后 compaction start/retry。
日志特征(精简)
embedded run start: ... provider=siliconflow model=Pro/... thinking=offembedded run agent end: ... isError=true error=400 status code (no body)embedded run compaction start ...
API 对照证据(同一 API Key)
对上述 4 个模型均一致:
- 不带
thinking->200 thinking: "off"->400(code: 20015,The parameter is invalid. Please check again.)thinking: null->200
期望行为
当 provider=siliconflow 且模型为 Pro/* 时,thinking=off 不应导致 400;应避免进入误导性的 compaction 重试路径。
建议修复
在 payload 发送前做 provider/model 兼容处理:
- 条件:
provider === "siliconflow" && modelId.startsWith("Pro/") && thinkingLevel === "off" - 行为:将 payload 中
thinking: "off"归一为thinking: null
这样可保持“关闭 thinking”的语义,同时兼容 SiliconFlow 参数校验。
English
Description
On OpenClaw 2026.2.23, when using siliconflow Pro/* models, embedded runs fail with 400 status code (no body) whenever thinking is off. The runtime then enters compaction/retry, so WebUI appears to compact on every message.
This is not a real context overflow. Even in fresh sessions with low tokensBefore (e.g. 121, 15), the same loop occurs.
Affected models (verified)
Pro/deepseek-ai/DeepSeek-V3.2Pro/zai-org/GLM-4.7Pro/MiniMaxAI/MiniMax-M2.1Pro/moonshotai/Kimi-K2.5
Reproduction
- Configure
siliconflowprovider (api: "openai-completions") and set anyPro/*model as primary. - Keep thinking at
off(for exampleagents.defaults.thinkingDefault: "off"). - Send a normal message from WebUI (or embedded local run).
- Observe logs:
embedded run start ... thinking=off->isError=true error=400 status code (no body)-> compaction start/retry.
Log signature (short)
embedded run start: ... provider=siliconflow model=Pro/... thinking=offembedded run agent end: ... isError=true error=400 status code (no body)embedded run compaction start ...
API comparison evidence (same API key)
For all four models above:
- Without
thinking->200 - With
thinking: "off"->400(code: 20015,The parameter is invalid. Please check again.) - With
thinking: null->200
Expected behavior
For provider=siliconflow and Pro/* models, thinking=off should not cause HTTP 400 and should not trigger compaction retry flow.
Proposed fix
Add a provider/model compatibility shim before payload send:
- Condition:
provider === "siliconflow" && modelId.startsWith("Pro/") && thinkingLevel === "off" - Behavior: normalize payload
thinking: "off"tothinking: null
This preserves the "thinking disabled" intent while matching SiliconFlow's payload validation behavior.