From 99be4474b63ba583eda46ae89c29cffa950f8b0d Mon Sep 17 00:00:00 2001 From: Pixma Date: Sat, 8 Aug 2026 01:53:08 +0200 Subject: [PATCH] fix(providers): correct Codex GPT-5.6 context limits (#9432) Merge-train validated (tip 6ce4effef8). Vitest failures confirmed as base-red (#9679). --- changelog.d/fixes/9431-codex-gpt56-context.md | 1 + open-sse/config/providers/shared.ts | 6 ++---- tests/unit/codex-gpt56-catalog.test.ts | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 changelog.d/fixes/9431-codex-gpt56-context.md diff --git a/changelog.d/fixes/9431-codex-gpt56-context.md b/changelog.d/fixes/9431-codex-gpt56-context.md new file mode 100644 index 0000000000..da11703298 --- /dev/null +++ b/changelog.d/fixes/9431-codex-gpt56-context.md @@ -0,0 +1 @@ +- **fix(providers):** Codex GPT-5.6 model metadata reports the 1M context window and 922K input limit ([#9431](https://github.com/diegosouzapw/OmniRoute/issues/9431)). diff --git a/open-sse/config/providers/shared.ts b/open-sse/config/providers/shared.ts index 7ed53eaf71..44cea91c05 100644 --- a/open-sse/config/providers/shared.ts +++ b/open-sse/config/providers/shared.ts @@ -271,16 +271,14 @@ export const GPT_5_6_API_CAPABILITIES = { maxOutputTokens: 128000, } as const; -// Codex's live catalog reports a 272K input context window for GPT-5.6. -// Keep the input and output limits explicit for catalog consumers that expose them separately. export const GPT_5_6_CODEX_CAPABILITIES = { targetFormat: "openai-responses", toolCalling: true, supportsReasoning: true, supportsVision: true, supportsXHighEffort: true, - contextLength: 272000, - maxInputTokens: 272000, + contextLength: 1050000, + maxInputTokens: 922000, maxOutputTokens: 128000, } as const; diff --git a/tests/unit/codex-gpt56-catalog.test.ts b/tests/unit/codex-gpt56-catalog.test.ts index b4eb0ab293..8cdfbe4dd7 100644 --- a/tests/unit/codex-gpt56-catalog.test.ts +++ b/tests/unit/codex-gpt56-catalog.test.ts @@ -36,8 +36,8 @@ test("Codex catalog exposes the GPT-5.6 lineup in configured priority order", () for (const modelId of expectedIds) { const model = models.find((entry) => entry.id === modelId); assert.ok(model, `codex must expose ${modelId}`); - assert.equal(model.contextLength, 272000); - assert.equal(model.maxInputTokens, 272000); + assert.equal(model.contextLength, 1050000); + assert.equal(model.maxInputTokens, 922000); assert.equal(model.maxOutputTokens, 128000); assert.equal(model.targetFormat, "openai-responses"); assert.equal(model.toolCalling, true);