Repository navigation
fix(agents): suppress DeepSeek thinking for Foundry aliases - #87933
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed May 29, 2026, 3:49 AM ET / 07:49 UTC. Summary PR surface: Source +16, Tests +59, Docs +1. Total +76 across 3 files. Reproducibility: yes. Current main has a high-confidence source reproduction: matching DeepSeek V4 OpenAI-compatible ids reach the generic fallback, which injects native Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land the narrow compat gate and regression tests after real gateway/provider proof or a maintainer proof override is recorded, with the changelog line removed. Do we have a high-confidence way to reproduce the issue? Yes. Current main has a high-confidence source reproduction: matching DeepSeek V4 OpenAI-compatible ids reach the generic fallback, which injects native Is this the best way to solve the issue? Mostly yes. The compat gate is the narrow maintainable fix and preserves default plus explicit Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 4ad875308f5c. Label changesLabel justifications:
Evidence reviewedPR surface: Source +16, Tests +59, Docs +1. Total +76 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
b11e2c9 to
6e01e60
Compare
|
Maintainer refresh pushed for #90520. What changed:
What I tested:
Live-provider note:
|
|
Pre-merge maintainer proof for the refreshed head
Live-provider note: I checked for a Foundry credential item and attempted the exact local gateway alias probe, but this local agent rejected the model override before provider dispatch. Issue #90520 has the reporter's live A/B proof for the same Foundry deployment: canonical Known CI failures are unrelated to the touched embedded-runner files:
|
Summary
microsoft-foundry-*DeepSeek V4 provider ids as Microsoft Foundry-compatible for the embedded runner DeepSeek fallback, so alias-backed Foundry deployments no longer receive the DeepSeek-native top-levelthinkingparameter.compat.thinkingFormatroutes while stripping DeepSeek-native replay fields (reasoning_content) that OpenAI/Azure-style deployments can reject.Fixes #90520.
Verification
node scripts/run-vitest.mjs src/agents/embedded-agent-runner/extra-params.deepseek-v4-thinking-format.test.ts src/agents/embedded-agent-runner-extraparams.test.ts(139 tests passed)pnpm exec oxfmt --check src/agents/embedded-agent-runner/extra-params.ts src/agents/embedded-agent-runner/extra-params.deepseek-v4-thinking-format.test.tsgit diff --check./.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main->autoreview clean: no accepted/actionable findings reportedReal behavior proof
Behavior addressed: Microsoft Foundry DeepSeek V4 alias providers no longer receive DeepSeek-native top-level
thinkingor replayedreasoning_contentfields that Foundry rejects.Real environment tested: Local OpenClaw checkout with the real CLI/gateway path until provider dispatch, plus issue #90520 reporter's live Foundry A/B provider proof for the same deployment/model alias behavior.
Exact steps or command run after this patch: I checked 1Password Molty metadata for a Foundry credential, then ran
pnpm openclaw infer model run --gateway --model microsoft-foundry-9433/DeepSeek-V4-Pro --prompt 'Reply with exactly FOUNDRY_V4_PRO_OK and nothing else.' --jsonfrom this branch.Evidence after fix: The local gateway probe produced real terminal output from OpenClaw and failed before provider dispatch with
GatewayClientRequestError: Error: Model override "microsoft-foundry-9433/DeepSeek-V4-Pro" is not allowed for agent "main".The reporter's issue #90520 live proof showsmicrosoft-foundry/DeepSeek-V4-Prosucceeds whilemicrosoft-foundry-9433/DeepSeek-V4-Profails with400 Unrecognized request argument supplied: thinking; this patch removes that aliasedthinkinginjection path and strips DeepSeek replay fields on the same alias-provider route.Observed result after fix: Focused embedded-runner tests confirm the alias request payload no longer includes top-level
thinking, no longer includesreasoning_effort, and strips assistant-messagereasoning_content; native DeepSeek-compatible proxy routes still keep the DeepSeek-native fallback, and OpenRouter/Together-style reasoning controls remain preserved.What was not tested: A complete live Microsoft Foundry round trip from my machine was not tested because no Foundry credential item was available and the local agent config rejected the alias model override before provider dispatch.
Notes
CHANGELOG.md; release generation owns changelog entries.mainand refreshed by a maintainer because the original PR predated the canonical Foundry fix and did not cover alias providers.