fix(models): use 1M context for openai-codex gpt-5.4 (#37876)

Merged via squash.

Prepared head SHA: c41020779e
Co-authored-by: yuweuii <82372187+yuweuii@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
This commit is contained in:
yuweuii
2026-03-09 09:23:49 +08:00
committed by GitHub
parent b34158086a
commit f6243916b5
6 changed files with 26 additions and 15 deletions

View File

@@ -36,13 +36,14 @@ export function mockOpenAICodexTemplateModel(): void {
export function buildOpenAICodexForwardCompatExpectation(
id: string = "gpt-5.3-codex",
): Partial<typeof OPENAI_CODEX_TEMPLATE_MODEL> & { provider: string; id: string } {
const isGpt54 = id === "gpt-5.4";
return {
provider: "openai-codex",
id,
api: "openai-codex-responses",
baseUrl: "https://chatgpt.com/backend-api",
reasoning: true,
contextWindow: 272000,
contextWindow: isGpt54 ? 1_050_000 : 272000,
maxTokens: 128000,
};
}