Skip to content

Commit a27f7fe

Browse files
mitchdevenportmitchsteipete
authored
fix(github-copilot): allow xhigh and max thinking levels on claude-opus-5 (#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]>
1 parent 2555e9f commit a27f7fe

2 files changed

Lines changed: 25 additions & 1 deletion

File tree

‎extensions/github-copilot/index.test.ts‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,26 @@ describe("github-copilot plugin", () => {
607607
expect(profile?.levels.map((level) => level.id)).toContain("xhigh");
608608
});
609609

610+
it("exposes xhigh and max thinking for the bundled Claude Opus 5 model", () => {
611+
const provider = registerProviderWithPluginConfig({});
612+
const model = expectDefined(
613+
manifest.modelCatalog.providers["github-copilot"].models.find(
614+
(candidate) => candidate.id === "claude-opus-5",
615+
),
616+
"bundled GitHub Copilot Claude Opus 5 model",
617+
);
618+
619+
const profile = provider.resolveThinkingProfile({
620+
provider: "github-copilot",
621+
modelId: model.id,
622+
compat: model.compat,
623+
});
624+
625+
expect(profile?.levels.map((level) => level.id)).toEqual(
626+
expect.arrayContaining(["xhigh", "max"]),
627+
);
628+
});
629+
610630
it("exposes max thinking for catalog-supported Copilot reasoning efforts", () => {
611631
const provider = registerProviderWithPluginConfig({});
612632

‎extensions/github-copilot/openclaw.plugin.json‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@
4444
"contextWindow": 1000000,
4545
"maxTokens": 128000,
4646
"cost": { "input": 5, "output": 25, "cacheRead": 0.5, "cacheWrite": 6.25 },
47-
"compat": { "codeMode": "capable" }
47+
"compat": {
48+
"codeMode": "capable",
49+
"supportsReasoningEffort": true,
50+
"supportedReasoningEfforts": ["low", "medium", "high", "xhigh", "max"]
51+
}
4852
},
4953
{
5054
"id": "claude-sonnet-5",

0 commit comments

Comments
 (0)