From a27f7fe56c2868d89a60db534f9dcd041fe2fdda Mon Sep 17 00:00:00 2001 From: Mitch Devenport <88671039+mitchdevenport@users.noreply.github.com> Date: Wed, 26 Aug 2026 16:20:21 -0400 Subject: [PATCH] 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 Co-authored-by: Peter Steinberger --- extensions/github-copilot/index.test.ts | 20 +++++++++++++++++++ .../github-copilot/openclaw.plugin.json | 6 +++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/extensions/github-copilot/index.test.ts b/extensions/github-copilot/index.test.ts index 5b0deb9953b8..755261b0f74f 100644 --- a/extensions/github-copilot/index.test.ts +++ b/extensions/github-copilot/index.test.ts @@ -607,6 +607,26 @@ describe("github-copilot plugin", () => { expect(profile?.levels.map((level) => level.id)).toContain("xhigh"); }); + it("exposes xhigh and max thinking for the bundled Claude Opus 5 model", () => { + const provider = registerProviderWithPluginConfig({}); + const model = expectDefined( + manifest.modelCatalog.providers["github-copilot"].models.find( + (candidate) => candidate.id === "claude-opus-5", + ), + "bundled GitHub Copilot Claude Opus 5 model", + ); + + const profile = provider.resolveThinkingProfile({ + provider: "github-copilot", + modelId: model.id, + compat: model.compat, + }); + + expect(profile?.levels.map((level) => level.id)).toEqual( + expect.arrayContaining(["xhigh", "max"]), + ); + }); + it("exposes max thinking for catalog-supported Copilot reasoning efforts", () => { const provider = registerProviderWithPluginConfig({}); diff --git a/extensions/github-copilot/openclaw.plugin.json b/extensions/github-copilot/openclaw.plugin.json index 25b0591a59e2..1c477f9bd08b 100644 --- a/extensions/github-copilot/openclaw.plugin.json +++ b/extensions/github-copilot/openclaw.plugin.json @@ -44,7 +44,11 @@ "contextWindow": 1000000, "maxTokens": 128000, "cost": { "input": 5, "output": 25, "cacheRead": 0.5, "cacheWrite": 6.25 }, - "compat": { "codeMode": "capable" } + "compat": { + "codeMode": "capable", + "supportsReasoningEffort": true, + "supportedReasoningEfforts": ["low", "medium", "high", "xhigh", "max"] + } }, { "id": "claude-sonnet-5",