mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
feat(github): refresh Copilot model catalog (#8226)
* feat(github): refresh Copilot model catalog * feat(github): refresh Copilot model catalog (gpt-5.6 family) Dropped the claude-opus-4.6 reinstatement (contradicts #7223/#2821 with no new evidence; risks a production 400 on /v1/messages). Kept the gpt-5.6-sol/terra/luna additions, which already exist on the Codex provider. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: backryun <backryun@users.noreply.github.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
This commit is contained in:
@@ -114,6 +114,9 @@ export const githubProvider: RegistryEntry = {
|
||||
contextLength: 1000000,
|
||||
maxOutputTokens: 64000,
|
||||
},
|
||||
{ id: "gpt-5.6-sol", name: "GPT-5.6 Sol", maxOutputTokens: 128000 },
|
||||
{ id: "gpt-5.6-terra", name: "GPT-5.6 Terra", maxOutputTokens: 128000 },
|
||||
{ id: "gpt-5.6-luna", name: "GPT-5.6 Luna", maxOutputTokens: 128000 },
|
||||
{ id: "gpt-5.5", name: "GPT-5.5", ...GPT_5_5_CODEX_CAPABILITIES, maxOutputTokens: 128000 },
|
||||
{
|
||||
id: "gpt-5.4",
|
||||
|
||||
@@ -32,6 +32,9 @@ export const GITHUB_COPILOT_MODEL_ALLOWLIST = [
|
||||
"claude-haiku-4.5",
|
||||
"gemini-3.1-pro-preview",
|
||||
"gemini-3.5-flash",
|
||||
"gpt-5.6-sol",
|
||||
"gpt-5.6-terra",
|
||||
"gpt-5.6-luna",
|
||||
"gpt-5.5",
|
||||
"gpt-5.4",
|
||||
"gpt-5.4-mini",
|
||||
@@ -206,7 +209,11 @@ export function parseGheCopilotModels(data: unknown): GitHubCopilotModel[] {
|
||||
toNonEmptyString(item.display_name) ||
|
||||
toNonEmptyString(item.label) ||
|
||||
id;
|
||||
models.push({ id, name, owned_by: toNonEmptyString(item.vendor || item.provider) || "ghe-copilot" });
|
||||
models.push({
|
||||
id,
|
||||
name,
|
||||
owned_by: toNonEmptyString(item.vendor || item.provider) || "ghe-copilot",
|
||||
});
|
||||
}
|
||||
|
||||
return models;
|
||||
|
||||
@@ -140,6 +140,9 @@ test("curated Copilot allowlist contains the final approved model ids only", ()
|
||||
"claude-haiku-4.5",
|
||||
"gemini-3.1-pro-preview",
|
||||
"gemini-3.5-flash",
|
||||
"gpt-5.6-sol",
|
||||
"gpt-5.6-terra",
|
||||
"gpt-5.6-luna",
|
||||
"gpt-5.5",
|
||||
"gpt-5.4",
|
||||
"gpt-5.4-mini",
|
||||
@@ -155,6 +158,24 @@ test("curated Copilot allowlist contains the final approved model ids only", ()
|
||||
);
|
||||
});
|
||||
|
||||
test("newly approved Copilot models survive live and fallback discovery", async () => {
|
||||
const expected = ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"];
|
||||
const live = parseGitHubCopilotModels({ data: expected.map((id) => ({ id, name: id })) });
|
||||
assert.deepEqual(
|
||||
live.map((model) => model.id),
|
||||
expected
|
||||
);
|
||||
|
||||
const fallback = await fetchGitHubCopilotModels({
|
||||
token: "",
|
||||
fallbackModels: expected.map((id) => ({ id, name: id })),
|
||||
});
|
||||
assert.deepEqual(
|
||||
fallback.models.map((model) => model.id),
|
||||
expected
|
||||
);
|
||||
});
|
||||
|
||||
test("fetch falls back when no token is provided (unauthed refresh stays safe)", async () => {
|
||||
let called = false;
|
||||
const fakeFetch = (async () => {
|
||||
|
||||
Reference in New Issue
Block a user