feat(ai,coding-agent): add new Copilot models

This commit is contained in:
Armin Ronacher 2026-09-22 21:14:13 +02:00
parent db91e03319
commit 27c072e98f
5 changed files with 66 additions and 0 deletions

View file

@ -4,6 +4,7 @@
### Added
- Added Claude Opus 5.5, GPT-6 Sol, and GPT-6 Luna to the GitHub Copilot catalog.
- Added GPT-6 Sol and GPT-6 Luna for OpenAI API keys and OpenAI Codex subscriptions, with full reasoning-effort, prompt-caching, tool-search, long-context pricing, and official cost metadata.
- Added Claude Opus 5.5 to the built-in Anthropic model catalog with adaptive thinking, 1M context, and official pricing metadata.
- Added Grok 4.7 to the built-in xAI model catalog with long-context pricing metadata.

View file

@ -488,11 +488,15 @@ const GITHUB_COPILOT_EXTENDED_CONTEXT_MODELS = new Set([
"claude-opus-4.7",
"claude-opus-4.8",
"claude-opus-5",
"claude-opus-5.5",
"claude-sonnet-4.6",
"claude-sonnet-5",
"gpt-5.3-codex",
"gpt-5.4",
"gpt-5.5",
"gpt-6-astra",
"gpt-6-luna",
"gpt-6-sol",
]);
// Checked manually against the authenticated GitHub Copilot /models endpoint on 2026-06-15.
@ -2702,6 +2706,51 @@ async function generateModels() {
});
}
// The authenticated Copilot catalog advertised these models on 2026-09-22,
// but models.dev did not include them yet.
const missingCopilotModels: Model<Api>[] = [
{
id: "claude-opus-5.5",
name: "Claude Opus 5.5",
api: "anthropic-messages",
provider: "github-copilot",
baseUrl: "https://api.individual.githubcopilot.com",
reasoning: true,
thinkingLevelMap: {
off: null,
minimal: null,
low: "low",
medium: "medium",
high: "high",
xhigh: "xhigh",
max: "max",
},
input: ["text", "image"],
cost: { input: 4, output: 20, cacheRead: 0.2, cacheWrite: 5 },
contextWindow: 1000000,
maxTokens: 128000,
headers: { ...COPILOT_STATIC_HEADERS },
},
...(["gpt-6-sol", "gpt-6-luna"] as const).map((id) => ({
id,
name: id === "gpt-6-sol" ? "GPT-6 Sol" : "GPT-6 Luna",
api: "openai-responses" as const,
provider: "github-copilot" as const,
baseUrl: "https://api.individual.githubcopilot.com",
reasoning: true,
input: ["text", "image"] as ("text" | "image")[],
cost: withOpenAiLongContextPricing(OPENAI_STANDARD_COSTS[id]),
contextWindow: 1000000,
maxTokens: 128000,
headers: { ...COPILOT_STATIC_HEADERS },
})),
];
for (const model of missingCopilotModels) {
if (!allModels.some((candidate) => candidate.provider === model.provider && candidate.id === model.id)) {
allModels.push(model);
}
}
// Temporary overrides until upstream model metadata is corrected.
for (const candidate of allModels) {
if (candidate.provider === "github-copilot" && GITHUB_COPILOT_EXTENDED_CONTEXT_MODELS.has(candidate.id)) {

View file

@ -69,6 +69,11 @@ describe("Copilot Claude via Anthropic Messages", () => {
expect(getSupportedThinkingLevels(opus5)).toContain("xhigh");
expect(getSupportedThinkingLevels(opus5)).toContain("max");
const opus55 = getModel("github-copilot", "claude-opus-5.5");
expect(opus55.api).toBe("anthropic-messages");
expect(opus55.contextWindow).toBe(1000000);
expect(getSupportedThinkingLevels(opus55)).toEqual(["low", "medium", "high", "xhigh", "max"]);
const sonnet46 = getModel("github-copilot", "claude-sonnet-4.6");
expect(sonnet46.thinkingLevelMap).toMatchObject({ minimal: "low", max: "max" });
expect(getSupportedThinkingLevels(sonnet46)).toContain("max");

View file

@ -24,4 +24,14 @@ it("routes all GitHub Copilot GPT models through the Responses API", () => {
expect(gptModels.length).toBeGreaterThan(0);
expect(gptModels.every((model) => model.api === "openai-responses")).toBe(true);
expectTypeOf(GITHUB_COPILOT_MODELS["gpt-6-astra"].api).toEqualTypeOf<"openai-responses">();
for (const modelId of ["gpt-6-sol", "gpt-6-luna"] as const) {
const model = GITHUB_COPILOT_MODELS[modelId];
expectTypeOf(model.api).toEqualTypeOf<"openai-responses">();
expect(model).toMatchObject({
api: "openai-responses",
contextWindow: 1000000,
maxTokens: 128000,
thinkingLevelMap: { off: "none", max: "max" },
});
}
});

View file

@ -4,6 +4,7 @@
### Added
- Added inherited Claude Opus 5.5, GPT-6 Sol, and GPT-6 Luna support for GitHub Copilot.
- Added inherited GPT-6 Sol and GPT-6 Luna support for OpenAI API keys and OpenAI Codex subscriptions.
- Added inherited Claude Opus 5.5 support for Anthropic with adaptive thinking and a 1M context window.