fix: allow bailian provider in resolveThinkingProfile#96819
fix: allow bailian provider in resolveThinkingProfile#96819andreacasini wants to merge 1 commit into
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 19, 2026, 6:14 AM ET / 10:14 UTC. Summary PR surface: Source +1. Total +1 across 2 files. Reproducibility: no. reviewer-established current-main run is available, but the source-level gate and the contributor’s redacted after-fix gateway/session transcript give a concrete, medium-confidence reproduction path for explicitly configured Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Confirm Do we have a high-confidence way to reproduce the issue? No reviewer-established current-main run is available, but the source-level gate and the contributor’s redacted after-fix gateway/session transcript give a concrete, medium-confidence reproduction path for explicitly configured Is this the best way to solve the issue? Unclear until maintainers choose the supported boundary: the two matching changes are the smallest fix for a narrow AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8178b3cc140d. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +1. Total +1 across 2 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
|
|
Useful fix. One data point that might help scope it: the bundled So this looks complementary rather than overlapping: your change fixes the generic user-configured |
|
@andreacasini thanks for the PR. ClawSweeper is still waiting on real behavior proof before this can move forward. Useful proof can be a screenshot, short video, terminal output, copied live output, linked artifact, or redacted logs that show the changed behavior after the fix. Please redact private tokens, phone numbers, private endpoints, customer data, and anything else sensitive. Once proof is added to the PR body or a comment, ClawSweeper or a maintainer can re-check it. |
Proof: Bailian provider generates thinking blocks without
|
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
The thinking policy resolver only checked for 'vllm' provider, excluding 'bailian' (Alibaba Cloud) even when thinkingFormat was correctly set in compat. This prevented Bailian/Qwen models from using reasoning/thinking features. Adds bailian to isVllmQwenThinkingCompat in both: - src/agents/embedded-agent-runner/model.compat.ts - src/agents/model-selection-shared.ts Fixes openclaw#26037
6de60ac to
f0d0cb1
Compare
What Problem This Solves
The configured-model reasoning inference checks hardcode
provider === "vllm", excludingbailian(Alibaba Cloud Coding Plan) even whencompat.thinkingFormatis correctly configured. This prevents Bailian-hosted Qwen/GLM models from being recognized as reasoning-capable, breaking/thinkingcommands and reasoning token tracking.Root Cause
Two locations check for
vllmprovider without considering that other providers (likebailian) may also serve Qwen-format models:src/agents/model-selection-shared.ts—isVllmQwenThinkingCompat()src/agents/embedded-agent-runner/model.ts—readCompatThinkingFormat()Fix
Extend each check to accept both
vllmandbailianproviders.Note: The original PR also modified
extensions/vllm/thinking-policy.ts, but this was reverted because production resolves thinking policy by provider ownership/manifest — the vLLM manifest owns onlyvllm, sobailiannever loads this path. The change was dead code in production.Verified Configurations
Tested with Bailian provider using both thinking formats:
Evidence
Gateway logs showing thinking recognized:
Session transcript showing thinking payloads received:
{ "role": "assistant", "content": [ { "type": "thinking", "thinking": "The user wants me to run a cleanup script...", "thinkingSignature": "reasoning_content" }, { "type": "text", "text": "🎩 **Session cleanup complete**..." } ], "usage": { "input": 4258, "output": 2240, "reasoningTokens": 1662, "totalTokens": 42594 } }Provider config (redacted):
{ "baseUrl": "https://coding-intl.dashscope.aliyuncs.com/v1", "api": "openai-completions", "models": [ { "id": "qwen3.7-plus", "reasoning": true, "compat": { "thinkingFormat": "openai", "supportsUsageInStreaming": true } }, { "id": "qwen3.6-plus", "reasoning": true, "compat": { "thinkingFormat": "qwen", "supportsUsageInStreaming": true } } ] }Scope
This PR fixes the custom provider bailian path. The broader Coding Plan bundled catalog work (where models are marked non-reasoning in the bundled catalog) remains tracked in #26037.
Closes #26037