feat(ai): add gpt-5.2-codex to OpenAI provider (#730)

* feat(ai): add gpt-5.2-codex to OpenAI provider

* fix(ai): avoid build break when model generation misses providers
This commit is contained in:
Anton 2026-01-14 13:21:01 -08:00 committed by GitHub
parent 9a438465eb
commit 5a795b9857
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 87 additions and 26 deletions

View file

@ -689,6 +689,26 @@ async function generateModels() {
});
}
if (!allModels.some(m => m.provider === "openai" && m.id === "gpt-5.2-codex")) {
allModels.push({
id: "gpt-5.2-codex",
name: "GPT-5.2 Codex",
api: "openai-responses",
baseUrl: "https://api.openai.com/v1",
provider: "openai",
reasoning: true,
input: ["text", "image"],
cost: {
input: 1.75,
output: 14,
cacheRead: 0.175,
cacheWrite: 0,
},
contextWindow: 400000,
maxTokens: 128000,
});
}
// OpenAI Codex (ChatGPT OAuth) models
// NOTE: These are not fetched from models.dev; we keep a small, explicit list to avoid aliases.
// Context window is based on observed server limits (400s above ~272k), not marketing numbers.