3d8f74357c
This adds cache-friendly dynamic tool loading anchored to tool results. Purely additive active-tool changes are recorded with `addedToolNames`, allowing supported Anthropic and OpenAI Responses models to load tool definitions at the point they become available instead of placing them in the cached prompt prefix. It retains safe fallback behavior for unsupported models and non-additive changes but it will wipe caches.
145 lines
4.0 KiB
TypeScript
145 lines
4.0 KiB
TypeScript
// This file is auto-generated by scripts/generate-models.ts
|
|
// Do not edit manually - run 'npm run generate-models' to update
|
|
|
|
import type { Model } from "../types.ts";
|
|
|
|
export const OPENAI_CODEX_MODELS = {
|
|
"gpt-5.3-codex-spark": {
|
|
id: "gpt-5.3-codex-spark",
|
|
name: "GPT-5.3 Codex Spark",
|
|
api: "openai-codex-responses",
|
|
provider: "openai-codex",
|
|
baseUrl: "https://chatgpt.com/backend-api",
|
|
reasoning: true,
|
|
thinkingLevelMap: {"xhigh":"xhigh","minimal":"low"},
|
|
input: ["text"],
|
|
cost: {
|
|
input: 1.75,
|
|
output: 14,
|
|
cacheRead: 0.175,
|
|
cacheWrite: 0,
|
|
},
|
|
contextWindow: 128000,
|
|
maxTokens: 128000,
|
|
} satisfies Model<"openai-codex-responses">,
|
|
"gpt-5.4": {
|
|
id: "gpt-5.4",
|
|
name: "GPT-5.4",
|
|
api: "openai-codex-responses",
|
|
provider: "openai-codex",
|
|
baseUrl: "https://chatgpt.com/backend-api",
|
|
compat: {"supportsToolSearch":true},
|
|
reasoning: true,
|
|
thinkingLevelMap: {"xhigh":"xhigh","minimal":"low"},
|
|
input: ["text", "image"],
|
|
cost: {
|
|
input: 2.5,
|
|
output: 15,
|
|
cacheRead: 0.25,
|
|
cacheWrite: 0,
|
|
tiers: [{"inputTokensAbove":272000,"input":5,"output":22.5,"cacheRead":0.5,"cacheWrite":0}],
|
|
},
|
|
contextWindow: 272000,
|
|
maxTokens: 128000,
|
|
} satisfies Model<"openai-codex-responses">,
|
|
"gpt-5.4-mini": {
|
|
id: "gpt-5.4-mini",
|
|
name: "GPT-5.4 mini",
|
|
api: "openai-codex-responses",
|
|
provider: "openai-codex",
|
|
baseUrl: "https://chatgpt.com/backend-api",
|
|
compat: {"supportsToolSearch":true},
|
|
reasoning: true,
|
|
thinkingLevelMap: {"xhigh":"xhigh","minimal":"low"},
|
|
input: ["text", "image"],
|
|
cost: {
|
|
input: 0.75,
|
|
output: 4.5,
|
|
cacheRead: 0.075,
|
|
cacheWrite: 0,
|
|
},
|
|
contextWindow: 272000,
|
|
maxTokens: 128000,
|
|
} satisfies Model<"openai-codex-responses">,
|
|
"gpt-5.5": {
|
|
id: "gpt-5.5",
|
|
name: "GPT-5.5",
|
|
api: "openai-codex-responses",
|
|
provider: "openai-codex",
|
|
baseUrl: "https://chatgpt.com/backend-api",
|
|
compat: {"supportsToolSearch":true},
|
|
reasoning: true,
|
|
thinkingLevelMap: {"xhigh":"xhigh","minimal":"low"},
|
|
input: ["text", "image"],
|
|
cost: {
|
|
input: 5,
|
|
output: 30,
|
|
cacheRead: 0.5,
|
|
cacheWrite: 0,
|
|
tiers: [{"inputTokensAbove":272000,"input":10,"output":45,"cacheRead":1,"cacheWrite":0}],
|
|
},
|
|
contextWindow: 272000,
|
|
maxTokens: 128000,
|
|
} satisfies Model<"openai-codex-responses">,
|
|
"gpt-5.6-luna": {
|
|
id: "gpt-5.6-luna",
|
|
name: "GPT-5.6 Luna",
|
|
api: "openai-codex-responses",
|
|
provider: "openai-codex",
|
|
baseUrl: "https://chatgpt.com/backend-api",
|
|
compat: {"supportsToolSearch":true},
|
|
reasoning: true,
|
|
thinkingLevelMap: {"xhigh":"xhigh","max":"max","minimal":"low"},
|
|
input: ["text", "image"],
|
|
cost: {
|
|
input: 1,
|
|
output: 6,
|
|
cacheRead: 0.1,
|
|
cacheWrite: 1.25,
|
|
tiers: [{"inputTokensAbove":272000,"input":2,"output":9,"cacheRead":0.2,"cacheWrite":2.5}],
|
|
},
|
|
contextWindow: 372000,
|
|
maxTokens: 128000,
|
|
} satisfies Model<"openai-codex-responses">,
|
|
"gpt-5.6-sol": {
|
|
id: "gpt-5.6-sol",
|
|
name: "GPT-5.6 Sol",
|
|
api: "openai-codex-responses",
|
|
provider: "openai-codex",
|
|
baseUrl: "https://chatgpt.com/backend-api",
|
|
compat: {"supportsToolSearch":true},
|
|
reasoning: true,
|
|
thinkingLevelMap: {"xhigh":"xhigh","max":"max","minimal":"low"},
|
|
input: ["text", "image"],
|
|
cost: {
|
|
input: 5,
|
|
output: 30,
|
|
cacheRead: 0.5,
|
|
cacheWrite: 6.25,
|
|
tiers: [{"inputTokensAbove":272000,"input":10,"output":45,"cacheRead":1,"cacheWrite":12.5}],
|
|
},
|
|
contextWindow: 372000,
|
|
maxTokens: 128000,
|
|
} satisfies Model<"openai-codex-responses">,
|
|
"gpt-5.6-terra": {
|
|
id: "gpt-5.6-terra",
|
|
name: "GPT-5.6 Terra",
|
|
api: "openai-codex-responses",
|
|
provider: "openai-codex",
|
|
baseUrl: "https://chatgpt.com/backend-api",
|
|
compat: {"supportsToolSearch":true},
|
|
reasoning: true,
|
|
thinkingLevelMap: {"xhigh":"xhigh","max":"max","minimal":"low"},
|
|
input: ["text", "image"],
|
|
cost: {
|
|
input: 2.5,
|
|
output: 15,
|
|
cacheRead: 0.25,
|
|
cacheWrite: 3.125,
|
|
tiers: [{"inputTokensAbove":272000,"input":5,"output":22.5,"cacheRead":0.5,"cacheWrite":6.25}],
|
|
},
|
|
contextWindow: 372000,
|
|
maxTokens: 128000,
|
|
} satisfies Model<"openai-codex-responses">,
|
|
} as const;
|