fix(ai): correct Codex Spark context window

closes #4969
This commit is contained in:
Armin Ronacher
2026-05-26 09:08:40 +02:00
parent fa1180b6b7
commit 71446c6c2b
3 changed files with 4 additions and 2 deletions

View File

@@ -1512,6 +1512,7 @@ async function generateModels() {
// Context window is based on observed server limits (400s above ~272k), not marketing numbers.
const CODEX_BASE_URL = "https://chatgpt.com/backend-api";
const CODEX_CONTEXT = 272000;
const CODEX_SPARK_CONTEXT = 128000;
const CODEX_MAX_TOKENS = 128000;
const codexModels: Model<"openai-codex-responses">[] = [
{
@@ -1547,7 +1548,7 @@ async function generateModels() {
reasoning: true,
input: ["text"],
cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 },
contextWindow: CODEX_CONTEXT,
contextWindow: CODEX_SPARK_CONTEXT,
maxTokens: CODEX_MAX_TOKENS,
},
{