Skip to content

Commit 0d0bb45

Browse files
author
saju01
committed
test(github-copilot): cover live xhigh reasoning for non-Claude models
Regression coverage for #59416: when live /models metadata wins over the static xhigh allowlist, non-Claude mini-family ids (e.g. gpt-5.4-mini) must gain xhigh from their resolved compat, while ids whose live effort list lacks xhigh (e.g. gpt-5-mini) must not over-grant it. The live-first model catalog union and models-defaults removal are already in origin/main (75405f6, 46c42d4, d227959); this PR now contributes only the still-missing regression tests on top of that base.
1 parent 23b8f5d commit 0d0bb45

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

extensions/github-copilot/index.test.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,37 @@ describe("github-copilot plugin", () => {
273273
expect(profile?.levels.map((level) => level.id)).not.toContain("max");
274274
});
275275

276+
it("exposes xhigh thinking for non-Claude Copilot models with catalog xhigh effort", () => {
277+
// Regression for #59416: mini-family models (e.g. gpt-5.4-mini) are
278+
// entitled to xhigh per live /models, but the static xhigh allowlist only
279+
// contains gpt-5.4 and gpt-5.3-codex. When live metadata wins, the
280+
// resolved compat must drive xhigh for these non-Claude ids as well.
281+
const provider = registerProviderWithPluginConfig({});
282+
283+
const profile = provider.resolveThinkingProfile({
284+
provider: "github-copilot",
285+
modelId: "gpt-5.4-mini",
286+
compat: { supportedReasoningEfforts: ["none", "low", "medium", "high", "xhigh"] },
287+
});
288+
289+
expect(profile?.levels.map((level) => level.id)).toContain("xhigh");
290+
});
291+
292+
it("omits xhigh for non-Claude Copilot models whose catalog effort lacks it", () => {
293+
// Negative half of the #59416 regression: live-first must not over-grant.
294+
// gpt-5-mini reports only [low, medium, high] live, so xhigh must stay off
295+
// even though the reporter asked for the whole mini family to gain it.
296+
const provider = registerProviderWithPluginConfig({});
297+
298+
const profile = provider.resolveThinkingProfile({
299+
provider: "github-copilot",
300+
modelId: "gpt-5-mini",
301+
compat: { supportedReasoningEfforts: ["low", "medium", "high"] },
302+
});
303+
304+
expect(profile?.levels.map((level) => level.id)).not.toContain("xhigh");
305+
});
306+
276307
it("uses live plugin config to re-enable discovery after startup disable", async () => {
277308
mocks.resolveCopilotApiToken.mockResolvedValueOnce({
278309
token: "copilot_api_token",

0 commit comments

Comments
 (0)