mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 21:07:01 -06:00
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 <mitch@mitchs-MacBook-Pro.local> Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
@@ -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({});
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user