From ea4bbdf7c00ff5c2aa80b4727dd575824a8324c9 Mon Sep 17 00:00:00 2001 From: GreatLiu Date: Thu, 6 Aug 2026 08:43:08 +0800 Subject: [PATCH] fix(open-sse): route GitHub Copilot gpt-5.6 sol/terra/luna to /responses (#9050) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../config/providers/registry/github/index.ts | 21 ++++++++++++++++--- tests/unit/executor-github.test.ts | 15 +++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/open-sse/config/providers/registry/github/index.ts b/open-sse/config/providers/registry/github/index.ts index 9513afdc1e..3adda64763 100644 --- a/open-sse/config/providers/registry/github/index.ts +++ b/open-sse/config/providers/registry/github/index.ts @@ -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", diff --git a/tests/unit/executor-github.test.ts b/tests/unit/executor-github.test.ts index 6e136e842c..b830e52bd8 100644 --- a/tests/unit/executor-github.test.ts +++ b/tests/unit/executor-github.test.ts @@ -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 = {