Repository navigation
fix(github-copilot): allow xhigh and max thinking levels on claude-opus-5 - #129690
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
…us-5 Copilot users could not select thinking levels above `high` on `claude-opus-5`. Both `/think xhigh` and `/think max` were rejected and the picker offered only up to `high`, even with `thinkingDefault: "max"` set. The bundled manifest entry declared no `supportedReasoningEfforts`, so `resolveCopilotThinkingLevelMap()` in extensions/github-copilot/models.ts returned undefined and `clampThinkingLevel()` filtered both tiers out. A user-side `models.providers` overlay cannot fix this: models.ts short-circuits `resolveCopilotForwardCompatModel()` when the model is already in the bundled registry, so the only path that applies a `thinkingLevelMap` is never reached. The native Claude fallback does not apply either, since model-utils.ts only consults it for `api === "anthropic-messages"` routes and Copilot resolves through its OpenAI-compatible transport. Declares the effort list the same way extensions/opencode already does for the same model id. Verified on a live account: after this change `xhigh` and `max` are selectable and accepted at runtime.
ee82dbd to
27b1cb9
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 3:13 PM ET / 19:13 UTC. ClawSweeper reviewWhat this changesThis PR declares Merge readinessNo blocking findings. Current main still omits the Opus 5 effort list, while the current head adds it and directly covers the manifest-to-provider-profile path requested in the prior review. Likely related people: @steipete (medium confidence; added the exact-head regression). Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherThe GitHub Copilot plugin converts bundled model-manifest metadata into the runtime model catalog. The provider’s thinking-policy hook then uses that catalog compatibility metadata to decide which flowchart LR
A[Copilot plugin manifest] --> B[Model catalog normalization]
B --> C[Registered Copilot provider]
C --> D[Thinking policy]
D --> E[Think command and default]
E --> F[Selected reasoning tier]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +4, Tests +20. Total +24 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the narrow provider-owned manifest declaration and its manifest-backed regression, then merge after exact-head CI completes successfully. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main lacks the Opus 5 effort list, and the Copilot policy therefore cannot add Is this the best way to solve the issue? Yes. The owning Copilot plugin manifest is the canonical producer of this model capability, and the new test exercises that manifest through the registered provider instead of adding a fallback or user configuration path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3826b52c51ee. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles) |
|
Verified the public Independent authenticated proof used trusted main with the same reviewed capability declaration, without executing fork code locally: pnpm --silent openclaw agent exec 'Do not use any tools. Reply with exactly COPILOT_OPUS_MAX_INDEPENDENT_OK.' --auth-env-only --cwd /tmp --model github-copilot/claude-opus-5 --thinking max --timeout 120 --jsonThe real provider returned Hosted CI passed on Fresh source-only Codex autoreview at P2 returned no accepted/actionable findings (patch correct, confidence 0.90); independent review also found no code issue. The prior manifest-backed test request is addressed by the 20-line regression, which reads the actual bundled model rather than constructing effort metadata in a fixture. Maintainer acceptance: a pre-existing explicit Thanks @mitchdevenport for the original fix. The nearby duplicate Opus 5 predicate in |
|
Merged via squash.
|
…us-5 (openclaw#129690) * fix(github-copilot): allow xhigh and max thinking levels on claude-opus-5 Copilot users could not select thinking levels above `high` on `claude-opus-5`. Both `/think xhigh` and `/think max` were rejected and the picker offered only up to `high`, even with `thinkingDefault: "max"` set. The bundled manifest entry declared no `supportedReasoningEfforts`, so `resolveCopilotThinkingLevelMap()` in extensions/github-copilot/models.ts returned undefined and `clampThinkingLevel()` filtered both tiers out. A user-side `models.providers` overlay cannot fix this: models.ts short-circuits `resolveCopilotForwardCompatModel()` when the model is already in the bundled registry, so the only path that applies a `thinkingLevelMap` is never reached. The native Claude fallback does not apply either, since model-utils.ts only consults it for `api === "anthropic-messages"` routes and Copilot resolves through its OpenAI-compatible transport. Declares the effort list the same way extensions/opencode already does for the same model id. Verified on a live account: after this change `xhigh` and `max` are selectable and accepted at runtime. * test(github-copilot): cover Opus 5 manifest reasoning levels --------- Co-authored-by: mitch <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes an issue where users on the GitHub Copilot provider running
claude-opus-5could not select thinking levels abovehigh./think maxand/think xhighwere both rejected, and the model picker offered onlydefault, off, minimal, low, medium, high— even withagents.defaults.thinkingDefault: "max"set in config.The Copilot API advertises
low, medium, high, xhigh, maxfor this model, so the two highest reasoning tiers were simply unreachable through OpenClaw.There is no user-side workaround. A
models.providersconfig overlay does not help:resolveCopilotForwardCompatModel()returns early when the model is already present in the bundled registry (extensions/github-copilot/models.ts:43-46), and that function is the only path that applies a user-suppliedthinkingLevelMap. Setting the overlay, restarting, and re-testing produced no change.Why This Change Was Made
The bundled manifest entry for
claude-opus-5declared"compat": { "codeMode": "capable" }with nosupportedReasoningEfforts.resolveCopilotThinkingLevelMap()(extensions/github-copilot/models.ts:245-258) returnsundefinedunless that field is an array, so nothinkingLevelMapwas ever attached andclampThinkingLevel()filtered bothxhighandmaxout of the supported set.The native Claude fallback does not cover this either.
resolveClaudeNativeThinkingLevelMap()would grant{xhigh, max}for Opus 5, butmodel-utils.ts:41-45only consults it forapi === "anthropic-messages"routes, and Copilot resolves through its OpenAI-compatible transport.This declares the effort list on the manifest entry, matching how
extensions/opencode/openclaw.plugin.jsonalready declares the same field for the same model id.extensions/anthropic/openclaw.plugin.jsonships an equivalentthinkingLevelMapfor it as well.Scope is deliberately limited to
claude-opus-5, the model verified end to end on a live account.claude-fable-5andclaude-sonnet-5appear to have the same gap and are left for a follow-up so each can be tested rather than pattern-matched.User Impact
Copilot users can select
xhighandmaxthinking levels onclaude-opus-5, and an existingthinkingDefaultofmaxnow resolves instead of being silently clamped tohigh.Higher reasoning tiers consume more reasoning tokens per turn, which maps to premium-request consumption on Copilot token auth. This is opt-in: the default is unchanged, and users reach the new tiers only by explicitly selecting them or configuring a higher
thinkingDefault.Evidence
Verified on a live GitHub Copilot account (token auth) against a local gateway.
Before —
/statusreportedthink highdespitethinkingDefault: "max", and/think maxwas rejected:Note that
xhighis absent from that list too, confirming the resolver attached no map at all rather than mapping one tier and not the other.After — with this change applied and the gateway restarted,
/think maxis accepted and/statusreports:Tests —
pnpm vitest run extensions/github-copilot/models.test.ts: 9 files, 166 tests passed.The existing suite already covers this resolver's behavior, including
models.test.ts:117assertingthinkingLevelMapbecomes{ xhigh: "xhigh", max: null }whensupportedReasoningEffortsincludesxhighbut notmax.