fix(open-sse): route GitHub Copilot gpt-5.6 sol/terra/luna to /responses (#9050)

Validated in local merge-train (devbox-vm-06-dev002) @ combined-tip (FAST gates green: static + changed tests + vitest — only pre-existing audit.test.ts flake). Evidence: /home/diegosouzapw/dev/proxys/OmniRoute/.claude/worktrees/merge-train-20260805-213228-suite.log
This commit is contained in:
GreatLiu
2026-08-06 08:43:08 +08:00
committed by GitHub
parent 5f3f25e541
commit ea4bbdf7c0
2 changed files with 33 additions and 3 deletions

View File

@@ -122,9 +122,24 @@ 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.6-sol",
name: "GPT-5.6 Sol",
targetFormat: "openai-responses",
maxOutputTokens: 128000,
},
{
id: "gpt-5.6-terra",
name: "GPT-5.6 Terra",
targetFormat: "openai-responses",
maxOutputTokens: 128000,
},
{
id: "gpt-5.6-luna",
name: "GPT-5.6 Luna",
targetFormat: "openai-responses",
maxOutputTokens: 128000,
},
{ id: "gpt-5.5", name: "GPT-5.5", ...GPT_5_5_CODEX_CAPABILITIES, maxOutputTokens: 128000 },
{
id: "gpt-5.4",

View File

@@ -98,6 +98,21 @@ test("GithubExecutor.buildUrl routes unlisted Codex models to /responses (9route
);
});
test("GithubExecutor.buildUrl routes gpt-5.6-sol/terra/luna to /responses (regression)", () => {
// These models were registered in the `gh` registry without targetFormat, so
// getModelTargetFormat returned null and requests fell through to
// /chat/completions -> upstream 400 "model is not accessible via the
// /chat/completions endpoint". They only support /responses upstream.
const executor = new GithubExecutor();
for (const model of ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"]) {
assert.equal(
executor.buildUrl(model, true),
"https://api.githubcopilot.com/responses",
`${model} must route to /responses`
);
}
});
test("GithubExecutor.transformRequest injects JSON response instructions for Claude and strips reasoning fields", () => {
const executor = new GithubExecutor();
const body = {