Repository navigation
Conversation
…ble providers
Custom provider ids (e.g. jdcloud-anthropic) using the anthropic-messages
adapter were silently clamped to thinking=off. The bundled policy surface
routing only matched exact provider ids ('anthropic', 'claude-cli'), and
the default branch returned null for any other provider.
- Route custom anthropic-messages providers to the Anthropic policy surface
by adding an API-family fallback path in resolveProviderThinkingProfile.
- Fix the default branch in the Anthropic policy surface to resolve thinking
profiles from the model identity instead of returning null.
- Pass the api field through ProviderDefaultThinkingPolicyContext so the
routing layer can use it as a fallback key.
Fixes openclaw#91975
Co-Authored-By: Claude Fable 5 <[email protected]>
|
👋 @steipete @frankekn — this addresses #91975 by fixing the Anthropic thinking profile resolution for custom providers using the The fix is in two layers:
Tests pass (31 anthropic + 47 thinking). Would appreciate your review when you have a chance! |
The re-export at line 6 references resolveClaudeModelIdentity but it was never imported. This was introduced by openclaw#91882 which added the Fable 5 adaptive thinking support and accidentally dropped the import while narrowing the import list. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Codex review: needs real behavior proof before merge. Reviewed June 11, 2026, 2:47 AM ET / 06:47 UTC. Summary PR surface: Source +36. Total +36 across 5 files. Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 418d7e1e83c5. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +36. Total +36 across 5 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
|
|
Superseded by #92053 which was merged earlier. Closing. |
Summary
Custom provider ids (e.g.
jdcloud-anthropic) that use theanthropic-messagesadapter were silently clamped tothinking=off. The root cause was twofold:resolveBundledProviderPolicySurfaceonly matches exact provider ids (anthropic,claude-cli). Custom ids never reach the Anthropic policy surface.resolveThinkingProfilereturnsnullfor any unrecognized provider id.Fix
resolveProviderThinkingProfilenow falls back to an API-family lookup when the direct provider-id match fails (e.g.anthropic-messages→anthropic).defaultbranch now resolves thinking profiles from the model identity instead of returningnull, matching the behavior already present in the runtime registration path.apifield is passed throughProviderDefaultThinkingPolicyContextso the routing layer can use it as a fallback key.Files changed
extensions/anthropic/provider-policy-api.tsdefaultbranch inresolveThinkingProfilesrc/plugins/provider-thinking.tsresolveProviderThinkingProfilesrc/plugins/provider-thinking.types.tsapifield toProviderDefaultThinkingPolicyContextsrc/auto-reply/thinking.tsapifrom catalog context to provider contextsrc/shared/anthropic-model-contract.tsresolveClaudeModelIdentityimportVerification
Tests
Real behavior proof
--thinking xhightooff(issue Native Anthropic adapter silently dropsthinkingtoofffor custom provider ids (resolveThinkingProfile only matches exactanthropic/claude-cli) #91975).pnpm devgateway.result.meta.requestShaping.thinkingwas"off". After the fix it is"xhigh".jdcloud-anthropic(api=anthropic-messages) to the Anthropic policy surface.listThinkingLevels("jdcloud-anthropic", "Claude-Opus-4.7-hq")now returns["off", "minimal", "low", "medium", "high", "xhigh", "adaptive", "max"]. Previously only base levels["off", "minimal", "low", "medium", "high"]were returned and xhigh was silently clamped.Fixes #91975
🤖 Generated with Claude Code