Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/fixes/8838-codex-gpt56-context-window.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- **Providers**: Codex GPT-5.6 Sol/Terra/Luna report the current upstream context window of 272000 instead of a stale 372000, so catalog consumers stop compacting past the Codex backend real input limit. Public OpenAI API GPT-5.6 metadata is unchanged
6 changes: 3 additions & 3 deletions open-sse/config/providers/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,16 +247,16 @@ export const GPT_5_6_API_CAPABILITIES = {
maxOutputTokens: 128000,
} as const;

// Codex's live catalog reports a 372K context window for GPT-5.6.
// 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: 372000,
maxInputTokens: 372000,
contextLength: 272000,
maxInputTokens: 272000,
maxOutputTokens: 128000,
} as const;

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/codex-gpt56-catalog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, 372000);
assert.equal(model.maxInputTokens, 372000);
assert.equal(model.contextLength, 272000);
assert.equal(model.maxInputTokens, 272000);
assert.equal(model.maxOutputTokens, 128000);
assert.equal(model.targetFormat, "openai-responses");
assert.equal(model.toolCalling, true);
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/provider-models-route-codex.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ test("provider models route merges live Codex models with the local catalog then
// merge conservatively — the smaller of live vs. pinned wins, never the
// larger, so a stale/inflated live number can never make OmniRoute promise
// more context than the account can actually serve (#7012). Here the pinned
// GPT-5.6 Codex contract (372000/128000, see GPT_5_6_CODEX_CAPABILITIES) is
// GPT-5.6 Codex contract (272000/128000, see GPT_5_6_CODEX_CAPABILITIES) is
// smaller than the live payload's 999999/999999, so the pinned value wins.
assert.equal(liveModel?.name, "GPT 5.6 Sol Live");
assert.equal(liveModel?.inputTokenLimit, 372000);
assert.equal(liveModel?.inputTokenLimit, 272000);
assert.equal(liveModel?.outputTokenLimit, 128000);
assert.equal(liveModel?.apiFormat, "responses");
assert.deepEqual(liveModel?.supportedEndpoints, ["responses"]);
Expand Down Expand Up @@ -218,7 +218,7 @@ test("provider models route: live token limit wins when it is SMALLER than the p
return Response.json({ models: [] });
}
// Live reports a SMALLER budget than the pinned GPT-5.6 Codex contract
// (372000/128000, GPT_5_6_CODEX_CAPABILITIES) — e.g. a temporary
// (272000/128000, GPT_5_6_CODEX_CAPABILITIES) — e.g. a temporary
// account-level cap. The conservative merge must take the smaller live
// value here, not the larger pinned one (#7012).
return Response.json({
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/vscode-token-routes-gpt56.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ test("vscode raw models route exposes native GPT-5.6 IDs and effort tiers", asyn
assert.equal(typeof defaultModel.created, "number");
assert.equal(defaultModel.owned_by, "codex");
assert.equal(defaultModel.name, "Codex GPT 5.6 Sol");
assert.equal(defaultModel.context_length, 372000);
assert.equal(defaultModel.context_length, 272000);
assert.equal(defaultModel.max_output_tokens, 128000);
assert.equal(defaultModel.max_input_tokens, 372000);
assert.equal(defaultModel.max_input_tokens, 272000);
assert.deepEqual(defaultModel.capabilities, {
vision: true,
tool_calling: true,
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/vscode-token-routes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ test("vscode combos route resolves combo names through Ollama api/show", async (
assert.equal(body.model, "show-combo");
assert.equal(body.modelfile, "FROM show-combo");
assert.equal(body.details.family, "show-combo");
assert.equal(body.model_info.context_length, 372000);
assert.equal(body.model_info.context_length, 272000);
assert.deepEqual(body.supportsReasoningEffort, ["none", "low", "medium", "high", "xhigh"]);
assert.equal(body.model_info.capabilities.reasoning, true);
});
Expand Down Expand Up @@ -290,7 +290,7 @@ test("vscode tokenized combos root route exposes importable combo metadata", asy
assert.equal(response.status, 200);
assert.ok(combo, "expected balanced-load in combo root response");
assert.equal(combo.url.includes("/responses#models.ai.azure.com"), true);
assert.equal(combo.maxInputTokens, 372000);
assert.equal(combo.maxInputTokens, 272000);
assert.equal(combo.toolCalling, true);
assert.deepEqual(combo.supportsReasoningEffort, ["none", "low", "medium", "high", "xhigh"]);
});
Expand Down Expand Up @@ -1075,7 +1075,7 @@ test("vscode tokenized api/show route exposes explicit reasoning effort metadata
assert.equal(body.configurationSchema?.properties?.reasoningEffort?.default, "low");
assert.equal(body.model_info["general.basename"], "Codex GPT 5.6 Sol (Default)");
assert.equal(body.model_info["general.architecture"], "codex");
assert.equal(body.model_info["codex.context_length"], 372000);
assert.equal(body.model_info["codex.context_length"], 272000);
assert.deepEqual(body.model_info.supports_reasoning_effort, [
"low",
"medium",
Expand Down