@ashx-j/lunr-ai 0.2.15 → 0.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalog/codex.d.ts.map +1 -1
- package/dist/catalog/codex.js +1 -1
- package/dist/catalog/codex.js.map +1 -1
- package/dist/providers/openai-codex.models.d.ts.map +1 -1
- package/dist/providers/openai-codex.models.js +4 -4
- package/dist/providers/openai-codex.models.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/catalog/codex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAoB,MAAM,aAAa,CAAC;AAG3D,eAAO,MAAM,4BAA4B,YAAY,CAAC;AACtD,eAAO,MAAM,iBAAiB,oDAAoD,CAAC;AAGnF,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,SAA+B,GAAG,MAAM,CAGpG;AAED,wFAAwF;AACxF,wBAAsB,0BAA0B,CAC/C,SAAS,EAAE,OAAO,KAAK,EACvB,MAAM,EAAE,WAAW,EACnB,QAAQ,SAA+B,GACrC,OAAO,CAAC,MAAM,CAAC,CAajB;AAED,qGAAqG;AACrG,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,wBAAwB,CAAC,EAAE,CA0DtG","sourcesContent":["import type { Model, ThinkingLevelMap } from \"../types.ts\";\n\n// Version of the Codex discovery protocol we implement, independent of lunR's package version.\nexport const CODEX_CATALOG_CLIENT_VERSION = \"0.153.4\";\nexport const CODEX_RELEASE_URL = \"https://registry.npmjs.org/@openai/codex/latest\";\nconst LEVELS = [\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"] as const;\n\nexport function codexModelsUrl(baseUrl: string, clientVersion = CODEX_CATALOG_CLIENT_VERSION): string {\n\tconst base = baseUrl.replace(/\\/+$/, \"\");\n\treturn `${base.endsWith(\"/codex\") ? base : `${base}/codex`}/models?client_version=${encodeURIComponent(clientVersion)}`;\n}\n\n/** Fetch only a release number, never npm code. Backend visibility is version-gated. */\nexport async function resolveCodexCatalogVersion(\n\tfetchImpl: typeof fetch,\n\tsignal: AbortSignal,\n\tfallback = CODEX_CATALOG_CLIENT_VERSION,\n): Promise<string> {\n\ttry {\n\t\tconst response = await fetchImpl(CODEX_RELEASE_URL, {\n\t\t\tsignal: AbortSignal.any([signal, AbortSignal.timeout(1500)]),\n\t\t\theaders: { accept: \"application/json\" },\n\t\t});\n\t\tif (!response.ok) return fallback;\n\t\tconst value = (await response.json()) as { version?: unknown } | null;\n\t\tif (typeof value?.version !== \"string\" || !/^\\d+\\.\\d+\\.\\d+$/.test(value.version)) return fallback;\n\t\treturn value.version;\n\t} catch {\n\t\treturn fallback;\n\t}\n}\n\n/** Parse only model capabilities; server prompt templates and tool instructions are not imported. */\nexport function parseCodexCatalog(payload: unknown, baseUrl: string): Model<\"openai-codex-responses\">[] {\n\tif (!payload || typeof payload !== \"object\" || !Array.isArray((payload as { models?: unknown }).models)) {\n\t\tthrow new Error(\"Invalid Codex model catalog: expected models array\");\n\t}\n\tconst models = new Map<string, Model<\"openai-codex-responses\">>();\n\tfor (const value of (payload as { models: unknown[] }).models) {\n\t\tif (!value || typeof value !== \"object\") throw new Error(\"Invalid Codex model entry\");\n\t\tconst row = value as Record<string, unknown>;\n\t\tif (typeof row.slug !== \"string\" || !row.slug.trim()) throw new Error(\"Codex model is missing its slug\");\n\t\tconst supplied: NonNullable<Model<any>[\"catalog\"]>[\"supplied\"] = [];\n\t\tconst positive = (value: unknown) => typeof value === \"number\" && Number.isInteger(value) && value > 0;\n\t\tconst context =
|
|
1
|
+
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/catalog/codex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAoB,MAAM,aAAa,CAAC;AAG3D,eAAO,MAAM,4BAA4B,YAAY,CAAC;AACtD,eAAO,MAAM,iBAAiB,oDAAoD,CAAC;AAGnF,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,SAA+B,GAAG,MAAM,CAGpG;AAED,wFAAwF;AACxF,wBAAsB,0BAA0B,CAC/C,SAAS,EAAE,OAAO,KAAK,EACvB,MAAM,EAAE,WAAW,EACnB,QAAQ,SAA+B,GACrC,OAAO,CAAC,MAAM,CAAC,CAajB;AAED,qGAAqG;AACrG,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,wBAAwB,CAAC,EAAE,CA0DtG","sourcesContent":["import type { Model, ThinkingLevelMap } from \"../types.ts\";\n\n// Version of the Codex discovery protocol we implement, independent of lunR's package version.\nexport const CODEX_CATALOG_CLIENT_VERSION = \"0.153.4\";\nexport const CODEX_RELEASE_URL = \"https://registry.npmjs.org/@openai/codex/latest\";\nconst LEVELS = [\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"] as const;\n\nexport function codexModelsUrl(baseUrl: string, clientVersion = CODEX_CATALOG_CLIENT_VERSION): string {\n\tconst base = baseUrl.replace(/\\/+$/, \"\");\n\treturn `${base.endsWith(\"/codex\") ? base : `${base}/codex`}/models?client_version=${encodeURIComponent(clientVersion)}`;\n}\n\n/** Fetch only a release number, never npm code. Backend visibility is version-gated. */\nexport async function resolveCodexCatalogVersion(\n\tfetchImpl: typeof fetch,\n\tsignal: AbortSignal,\n\tfallback = CODEX_CATALOG_CLIENT_VERSION,\n): Promise<string> {\n\ttry {\n\t\tconst response = await fetchImpl(CODEX_RELEASE_URL, {\n\t\t\tsignal: AbortSignal.any([signal, AbortSignal.timeout(1500)]),\n\t\t\theaders: { accept: \"application/json\" },\n\t\t});\n\t\tif (!response.ok) return fallback;\n\t\tconst value = (await response.json()) as { version?: unknown } | null;\n\t\tif (typeof value?.version !== \"string\" || !/^\\d+\\.\\d+\\.\\d+$/.test(value.version)) return fallback;\n\t\treturn value.version;\n\t} catch {\n\t\treturn fallback;\n\t}\n}\n\n/** Parse only model capabilities; server prompt templates and tool instructions are not imported. */\nexport function parseCodexCatalog(payload: unknown, baseUrl: string): Model<\"openai-codex-responses\">[] {\n\tif (!payload || typeof payload !== \"object\" || !Array.isArray((payload as { models?: unknown }).models)) {\n\t\tthrow new Error(\"Invalid Codex model catalog: expected models array\");\n\t}\n\tconst models = new Map<string, Model<\"openai-codex-responses\">>();\n\tfor (const value of (payload as { models: unknown[] }).models) {\n\t\tif (!value || typeof value !== \"object\") throw new Error(\"Invalid Codex model entry\");\n\t\tconst row = value as Record<string, unknown>;\n\t\tif (typeof row.slug !== \"string\" || !row.slug.trim()) throw new Error(\"Codex model is missing its slug\");\n\t\tconst supplied: NonNullable<Model<any>[\"catalog\"]>[\"supplied\"] = [];\n\t\tconst positive = (value: unknown) => typeof value === \"number\" && Number.isInteger(value) && value > 0;\n\t\tconst context = row.context_window;\n\t\tif (positive(context)) supplied.push(\"contextWindow\");\n\t\tif (positive(row.max_output_tokens)) supplied.push(\"maxTokens\");\n\t\tconst name = typeof row.display_name === \"string\" && row.display_name.trim() ? row.display_name : row.slug;\n\t\tif (name !== row.slug) supplied.push(\"name\");\n\t\tconst input = Array.isArray(row.input_modalities)\n\t\t\t? row.input_modalities.filter((item): item is \"text\" | \"image\" => item === \"text\" || item === \"image\")\n\t\t\t: [];\n\t\tif (input.length) supplied.push(\"input\");\n\t\tlet thinkingLevelMap: ThinkingLevelMap | undefined;\n\t\tconst efforts = Array.isArray(row.supported_reasoning_levels)\n\t\t\t? row.supported_reasoning_levels.flatMap((item) =>\n\t\t\t\t\titem && typeof item.effort === \"string\" ? [item.effort as string] : [],\n\t\t\t\t)\n\t\t\t: [];\n\t\tif (Array.isArray(row.supported_reasoning_levels)) {\n\t\t\tthinkingLevelMap = Object.fromEntries(\n\t\t\t\tLEVELS.map((level) => [\n\t\t\t\t\tlevel,\n\t\t\t\t\tlevel === \"off\" && efforts.includes(\"none\") ? \"none\" : efforts.includes(level) ? level : null,\n\t\t\t\t]),\n\t\t\t);\n\t\t\tsupplied.push(\"reasoning\", \"thinkingLevelMap\");\n\t\t}\n\t\tmodels.set(row.slug, {\n\t\t\tid: row.slug,\n\t\t\tname,\n\t\t\tprovider: \"openai-codex\",\n\t\t\tapi: \"openai-codex-responses\",\n\t\t\tbaseUrl,\n\t\t\treasoning: efforts.length > 0,\n\t\t\tthinkingLevelMap,\n\t\t\tinput: input.length ? input : [\"text\"],\n\t\t\tcontextWindow: positive(context) ? (context as number) : 128000,\n\t\t\tmaxTokens: positive(row.max_output_tokens) ? (row.max_output_tokens as number) : 8192,\n\t\t\tcost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },\n\t\t\tcatalog: {\n\t\t\t\tsource: \"provider\",\n\t\t\t\tsupplied,\n\t\t\t\tpricing: \"unknown\",\n\t\t\t\treasoningLevels: efforts,\n\t\t\t\thidden: row.visibility !== \"list\",\n\t\t\t},\n\t\t});\n\t}\n\tif (!models.size) throw new Error(\"Codex returned an empty model catalog; retaining cached models\");\n\treturn [...models.values()];\n}\n"]}
|
package/dist/catalog/codex.js
CHANGED
|
@@ -38,7 +38,7 @@ export function parseCodexCatalog(payload, baseUrl) {
|
|
|
38
38
|
throw new Error("Codex model is missing its slug");
|
|
39
39
|
const supplied = [];
|
|
40
40
|
const positive = (value) => typeof value === "number" && Number.isInteger(value) && value > 0;
|
|
41
|
-
const context =
|
|
41
|
+
const context = row.context_window;
|
|
42
42
|
if (positive(context))
|
|
43
43
|
supplied.push("contextWindow");
|
|
44
44
|
if (positive(row.max_output_tokens))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex.js","sourceRoot":"","sources":["../../src/catalog/codex.ts"],"names":[],"mappings":"AAEA,+FAA+F;AAC/F,MAAM,CAAC,MAAM,4BAA4B,GAAG,SAAS,CAAC;AACtD,MAAM,CAAC,MAAM,iBA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,wBAAwB;YAC7B,OAAO;YACP,SAAS,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC;YAC7B,gBAAgB;YAChB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YACtC,aAAa,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAE,OAAkB,CAAC,CAAC,CAAC,MAAM;YAC/D,SAAS,EAAE,QAAQ,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAE,GAAG,CAAC,iBAA4B,CAAC,CAAC,CAAC,IAAI;YACrF,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE;YAC1D,OAAO,EAAE;gBACR,MAAM,EAAE,UAAU;gBAClB,QAAQ;gBACR,OAAO,EAAE,SAAS;gBAClB,eAAe,EAAE,OAAO;gBACxB,MAAM,EAAE,GAAG,CAAC,UAAU,KAAK,MAAM;aACjC;SACD,CAAC,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpG,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;AAAA,CAC5B","sourcesContent":["import type { Model, ThinkingLevelMap } from \"../types.ts\";\n\n// Version of the Codex discovery protocol we implement, independent of lunR's package version.\nexport const CODEX_CATALOG_CLIENT_VERSION = \"0.153.4\";\nexport const CODEX_RELEASE_URL = \"https://registry.npmjs.org/@openai/codex/latest\";\nconst LEVELS = [\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"] as const;\n\nexport function codexModelsUrl(baseUrl: string, clientVersion = CODEX_CATALOG_CLIENT_VERSION): string {\n\tconst base = baseUrl.replace(/\\/+$/, \"\");\n\treturn `${base.endsWith(\"/codex\") ? base : `${base}/codex`}/models?client_version=${encodeURIComponent(clientVersion)}`;\n}\n\n/** Fetch only a release number, never npm code. Backend visibility is version-gated. */\nexport async function resolveCodexCatalogVersion(\n\tfetchImpl: typeof fetch,\n\tsignal: AbortSignal,\n\tfallback = CODEX_CATALOG_CLIENT_VERSION,\n): Promise<string> {\n\ttry {\n\t\tconst response = await fetchImpl(CODEX_RELEASE_URL, {\n\t\t\tsignal: AbortSignal.any([signal, AbortSignal.timeout(1500)]),\n\t\t\theaders: { accept: \"application/json\" },\n\t\t});\n\t\tif (!response.ok) return fallback;\n\t\tconst value = (await response.json()) as { version?: unknown } | null;\n\t\tif (typeof value?.version !== \"string\" || !/^\\d+\\.\\d+\\.\\d+$/.test(value.version)) return fallback;\n\t\treturn value.version;\n\t} catch {\n\t\treturn fallback;\n\t}\n}\n\n/** Parse only model capabilities; server prompt templates and tool instructions are not imported. */\nexport function parseCodexCatalog(payload: unknown, baseUrl: string): Model<\"openai-codex-responses\">[] {\n\tif (!payload || typeof payload !== \"object\" || !Array.isArray((payload as { models?: unknown }).models)) {\n\t\tthrow new Error(\"Invalid Codex model catalog: expected models array\");\n\t}\n\tconst models = new Map<string, Model<\"openai-codex-responses\">>();\n\tfor (const value of (payload as { models: unknown[] }).models) {\n\t\tif (!value || typeof value !== \"object\") throw new Error(\"Invalid Codex model entry\");\n\t\tconst row = value as Record<string, unknown>;\n\t\tif (typeof row.slug !== \"string\" || !row.slug.trim()) throw new Error(\"Codex model is missing its slug\");\n\t\tconst supplied: NonNullable<Model<any>[\"catalog\"]>[\"supplied\"] = [];\n\t\tconst positive = (value: unknown) => typeof value === \"number\" && Number.isInteger(value) && value > 0;\n\t\tconst context = row.context_window;\n\t\tif (positive(context)) supplied.push(\"contextWindow\");\n\t\tif (positive(row.max_output_tokens)) supplied.push(\"maxTokens\");\n\t\tconst name = typeof row.display_name === \"string\" && row.display_name.trim() ? row.display_name : row.slug;\n\t\tif (name !== row.slug) supplied.push(\"name\");\n\t\tconst input = Array.isArray(row.input_modalities)\n\t\t\t? row.input_modalities.filter((item): item is \"text\" | \"image\" => item === \"text\" || item === \"image\")\n\t\t\t: [];\n\t\tif (input.length) supplied.push(\"input\");\n\t\tlet thinkingLevelMap: ThinkingLevelMap | undefined;\n\t\tconst efforts = Array.isArray(row.supported_reasoning_levels)\n\t\t\t? row.supported_reasoning_levels.flatMap((item) =>\n\t\t\t\t\titem && typeof item.effort === \"string\" ? [item.effort as string] : [],\n\t\t\t\t)\n\t\t\t: [];\n\t\tif (Array.isArray(row.supported_reasoning_levels)) {\n\t\t\tthinkingLevelMap = Object.fromEntries(\n\t\t\t\tLEVELS.map((level) => [\n\t\t\t\t\tlevel,\n\t\t\t\t\tlevel === \"off\" && efforts.includes(\"none\") ? \"none\" : efforts.includes(level) ? level : null,\n\t\t\t\t]),\n\t\t\t);\n\t\t\tsupplied.push(\"reasoning\", \"thinkingLevelMap\");\n\t\t}\n\t\tmodels.set(row.slug, {\n\t\t\tid: row.slug,\n\t\t\tname,\n\t\t\tprovider: \"openai-codex\",\n\t\t\tapi: \"openai-codex-responses\",\n\t\t\tbaseUrl,\n\t\t\treasoning: efforts.length > 0,\n\t\t\tthinkingLevelMap,\n\t\t\tinput: input.length ? input : [\"text\"],\n\t\t\tcontextWindow: positive(context) ? (context as number) : 128000,\n\t\t\tmaxTokens: positive(row.max_output_tokens) ? (row.max_output_tokens as number) : 8192,\n\t\t\tcost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },\n\t\t\tcatalog: {\n\t\t\t\tsource: \"provider\",\n\t\t\t\tsupplied,\n\t\t\t\tpricing: \"unknown\",\n\t\t\t\treasoningLevels: efforts,\n\t\t\t\thidden: row.visibility !== \"list\",\n\t\t\t},\n\t\t});\n\t}\n\tif (!models.size) throw new Error(\"Codex returned an empty model catalog; retaining cached models\");\n\treturn [...models.values()];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai-codex.models.d.ts","sourceRoot":"","sources":["../../src/providers/openai-codex.models.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8JtB,CAAC","sourcesContent":["// This file is auto-generated by scripts/generate-models.ts\n// Do not edit manually - run 'npm run generate-models' to update\n\nimport type { Model } from \"../types.ts\";\n\nexport const OPENAI_CODEX_MODELS = {\n\t\"gpt-6-astra\": {\n\t\tid: \"gpt-6-astra\",\n\t\tname: \"GPT-6 Astra\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"off\":null,\"minimal\":null,\"xhigh\":\"xhigh\",\"max\":\"max\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 10,\n\t\t\toutput: 50,\n\t\t\tcacheRead: 1,\n\t\t\tcacheWrite: 12.5,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":20,\"output\":75,\"cacheRead\":2,\"cacheWrite\":25}],\n\t\t},\n\t\tcontextWindow:
|
|
1
|
+
{"version":3,"file":"openai-codex.models.d.ts","sourceRoot":"","sources":["../../src/providers/openai-codex.models.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8JtB,CAAC","sourcesContent":["// This file is auto-generated by scripts/generate-models.ts\n// Do not edit manually - run 'npm run generate-models' to update\n\nimport type { Model } from \"../types.ts\";\n\nexport const OPENAI_CODEX_MODELS = {\n\t\"gpt-6-astra\": {\n\t\tid: \"gpt-6-astra\",\n\t\tname: \"GPT-6 Astra\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"off\":null,\"minimal\":null,\"xhigh\":\"xhigh\",\"max\":\"max\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 10,\n\t\t\toutput: 50,\n\t\t\tcacheRead: 1,\n\t\t\tcacheWrite: 12.5,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":20,\"output\":75,\"cacheRead\":2,\"cacheWrite\":25}],\n\t\t},\n\t\tcontextWindow: 272000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.3-codex-spark\": {\n\t\tid: \"gpt-5.3-codex-spark\",\n\t\tname: \"GPT-5.3 Codex Spark\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"minimal\":\"low\"},\n\t\tinput: [\"text\"],\n\t\tcost: {\n\t\t\tinput: 1.75,\n\t\t\toutput: 14,\n\t\t\tcacheRead: 0.175,\n\t\t\tcacheWrite: 0,\n\t\t},\n\t\tcontextWindow: 128000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.4\": {\n\t\tid: \"gpt-5.4\",\n\t\tname: \"GPT-5.4\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"minimal\":\"low\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 2.5,\n\t\t\toutput: 15,\n\t\t\tcacheRead: 0.25,\n\t\t\tcacheWrite: 0,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":5,\"output\":22.5,\"cacheRead\":0.5,\"cacheWrite\":0}],\n\t\t},\n\t\tcontextWindow: 272000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.4-mini\": {\n\t\tid: \"gpt-5.4-mini\",\n\t\tname: \"GPT-5.4 mini\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"minimal\":\"low\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 0.75,\n\t\t\toutput: 4.5,\n\t\t\tcacheRead: 0.075,\n\t\t\tcacheWrite: 0,\n\t\t},\n\t\tcontextWindow: 272000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.5\": {\n\t\tid: \"gpt-5.5\",\n\t\tname: \"GPT-5.5\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"minimal\":\"low\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 5,\n\t\t\toutput: 30,\n\t\t\tcacheRead: 0.5,\n\t\t\tcacheWrite: 0,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":10,\"output\":45,\"cacheRead\":1,\"cacheWrite\":0}],\n\t\t},\n\t\tcontextWindow: 272000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.6-luna\": {\n\t\tid: \"gpt-5.6-luna\",\n\t\tname: \"GPT-5.6 Luna\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"max\":\"max\",\"minimal\":\"low\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 1,\n\t\t\toutput: 6,\n\t\t\tcacheRead: 0.1,\n\t\t\tcacheWrite: 1.25,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":2,\"output\":9,\"cacheRead\":0.2,\"cacheWrite\":2.5}],\n\t\t},\n\t\tcontextWindow: 272000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.6-sol\": {\n\t\tid: \"gpt-5.6-sol\",\n\t\tname: \"GPT-5.6 Sol\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"max\":\"max\",\"minimal\":\"low\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 5,\n\t\t\toutput: 30,\n\t\t\tcacheRead: 0.5,\n\t\t\tcacheWrite: 6.25,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":10,\"output\":45,\"cacheRead\":1,\"cacheWrite\":12.5}],\n\t\t},\n\t\tcontextWindow: 272000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.6-terra\": {\n\t\tid: \"gpt-5.6-terra\",\n\t\tname: \"GPT-5.6 Terra\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"max\":\"max\",\"minimal\":\"low\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 2.5,\n\t\t\toutput: 15,\n\t\t\tcacheRead: 0.25,\n\t\t\tcacheWrite: 3.125,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":5,\"output\":22.5,\"cacheRead\":0.5,\"cacheWrite\":6.25}],\n\t\t},\n\t\tcontextWindow: 272000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n} as const;\n"]}
|
|
@@ -18,7 +18,7 @@ export const OPENAI_CODEX_MODELS = {
|
|
|
18
18
|
cacheWrite: 12.5,
|
|
19
19
|
tiers: [{ "inputTokensAbove": 272000, "input": 20, "output": 75, "cacheRead": 2, "cacheWrite": 25 }],
|
|
20
20
|
},
|
|
21
|
-
contextWindow:
|
|
21
|
+
contextWindow: 272000,
|
|
22
22
|
maxTokens: 128000,
|
|
23
23
|
},
|
|
24
24
|
"gpt-5.3-codex-spark": {
|
|
@@ -115,7 +115,7 @@ export const OPENAI_CODEX_MODELS = {
|
|
|
115
115
|
cacheWrite: 1.25,
|
|
116
116
|
tiers: [{ "inputTokensAbove": 272000, "input": 2, "output": 9, "cacheRead": 0.2, "cacheWrite": 2.5 }],
|
|
117
117
|
},
|
|
118
|
-
contextWindow:
|
|
118
|
+
contextWindow: 272000,
|
|
119
119
|
maxTokens: 128000,
|
|
120
120
|
},
|
|
121
121
|
"gpt-5.6-sol": {
|
|
@@ -135,7 +135,7 @@ export const OPENAI_CODEX_MODELS = {
|
|
|
135
135
|
cacheWrite: 6.25,
|
|
136
136
|
tiers: [{ "inputTokensAbove": 272000, "input": 10, "output": 45, "cacheRead": 1, "cacheWrite": 12.5 }],
|
|
137
137
|
},
|
|
138
|
-
contextWindow:
|
|
138
|
+
contextWindow: 272000,
|
|
139
139
|
maxTokens: 128000,
|
|
140
140
|
},
|
|
141
141
|
"gpt-5.6-terra": {
|
|
@@ -155,7 +155,7 @@ export const OPENAI_CODEX_MODELS = {
|
|
|
155
155
|
cacheWrite: 3.125,
|
|
156
156
|
tiers: [{ "inputTokensAbove": 272000, "input": 5, "output": 22.5, "cacheRead": 0.5, "cacheWrite": 6.25 }],
|
|
157
157
|
},
|
|
158
|
-
contextWindow:
|
|
158
|
+
contextWindow: 272000,
|
|
159
159
|
maxTokens: 128000,
|
|
160
160
|
},
|
|
161
161
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai-codex.models.js","sourceRoot":"","sources":["../../src/providers/openai-codex.models.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,iEAAiE;AAIjE,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAClC,aAAa,EAAE;QACd,EAAE,EAAE,aAAa;QACjB,IAAI,EAAE,aAAa;QACnB,GAAG,EAAE,wBAAwB;QAC7B,QAAQ,EAAE,cAAc;QACxB,OAAO,EAAE,iCAAiC;QAC1C,MAAM,EAAE,EAAC,oBAAoB,EAAC,IAAI,EAAC;QACnC,SAAS,EAAE,IAAI;QACf,gBAAgB,EAAE,EAAC,KAAK,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAC,KAAK,EAAC,KAAK,EAAC;QACzE,KAAK,EAAE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EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;QACxB,IAAI,EAAE;YACL,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,EAAE;YACV,SAAS,EAAE,GAAG;YACd,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE,CAAC,EAAC,kBAAkB,EAAC,MAAM,EAAC,OAAO,EAAC,EAAE,EAAC,QAAQ,EAAC,EAAE,EAAC,WAAW,EAAC,CAAC,EAAC,YAAY,EAAC,IAAI,EAAC,CAAC;SAC3F;QACD,aAAa,EAAE,MAAM;QACrB,SAAS,EAAE,MAAM;KACyB;IAC3C,eAAe,EAAE;QAChB,EAAE,EAAE,eAAe;QACnB,IAAI,EAAE,eAAe;QACrB,GAAG,EAAE,wBAAwB;QAC7B,QAAQ,EAAE,cAAc;QACxB,OAAO,EAAE,iCAAiC;QAC1C,MAAM,EAAE,EAAC,oBAAoB,EAAC,IAAI,EAAC;QACnC,SAAS,EAAE,IAAI;QACf,gBAAgB,EAAE,EAAC,OAAO,EAAC,OAAO,EAAC,KAAK,EAAC,KAAK,EAAC,SAAS,EAAC,KAAK,EAAC;QAC/D,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;QACxB,IAAI,EAAE;YACL,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,EAAE;YACV,SAAS,EAAE,IAAI;YACf,UAAU,EAAE,KAAK;YACjB,KAAK,EAAE,CAAC,EAAC,kBAAkB,EAAC,MAAM,EAAC,OAAO,EAAC,CAAC,EAAC,QAAQ,EAAC,IAAI,EAAC,WAAW,EAAC,GAAG,EAAC,YAAY,EAAC,IAAI,EAAC,CAAC;SAC9F;QACD,aAAa,EAAE,MAAM;QACrB,SAAS,EAAE,MAAM;KACyB;CAClC,CAAC","sourcesContent":["// This file is auto-generated by scripts/generate-models.ts\n// Do not edit manually - run 'npm run generate-models' to update\n\nimport type { Model } from \"../types.ts\";\n\nexport const OPENAI_CODEX_MODELS = {\n\t\"gpt-6-astra\": {\n\t\tid: \"gpt-6-astra\",\n\t\tname: \"GPT-6 Astra\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"off\":null,\"minimal\":null,\"xhigh\":\"xhigh\",\"max\":\"max\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 10,\n\t\t\toutput: 50,\n\t\t\tcacheRead: 1,\n\t\t\tcacheWrite: 12.5,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":20,\"output\":75,\"cacheRead\":2,\"cacheWrite\":25}],\n\t\t},\n\t\tcontextWindow: 1050000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.3-codex-spark\": {\n\t\tid: \"gpt-5.3-codex-spark\",\n\t\tname: \"GPT-5.3 Codex Spark\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"minimal\":\"low\"},\n\t\tinput: [\"text\"],\n\t\tcost: {\n\t\t\tinput: 1.75,\n\t\t\toutput: 14,\n\t\t\tcacheRead: 0.175,\n\t\t\tcacheWrite: 0,\n\t\t},\n\t\tcontextWindow: 128000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.4\": {\n\t\tid: \"gpt-5.4\",\n\t\tname: \"GPT-5.4\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"minimal\":\"low\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 2.5,\n\t\t\toutput: 15,\n\t\t\tcacheRead: 0.25,\n\t\t\tcacheWrite: 0,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":5,\"output\":22.5,\"cacheRead\":0.5,\"cacheWrite\":0}],\n\t\t},\n\t\tcontextWindow: 272000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.4-mini\": {\n\t\tid: \"gpt-5.4-mini\",\n\t\tname: \"GPT-5.4 mini\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"minimal\":\"low\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 0.75,\n\t\t\toutput: 4.5,\n\t\t\tcacheRead: 0.075,\n\t\t\tcacheWrite: 0,\n\t\t},\n\t\tcontextWindow: 272000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.5\": {\n\t\tid: \"gpt-5.5\",\n\t\tname: \"GPT-5.5\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"minimal\":\"low\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 5,\n\t\t\toutput: 30,\n\t\t\tcacheRead: 0.5,\n\t\t\tcacheWrite: 0,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":10,\"output\":45,\"cacheRead\":1,\"cacheWrite\":0}],\n\t\t},\n\t\tcontextWindow: 272000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.6-luna\": {\n\t\tid: \"gpt-5.6-luna\",\n\t\tname: \"GPT-5.6 Luna\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"max\":\"max\",\"minimal\":\"low\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 1,\n\t\t\toutput: 6,\n\t\t\tcacheRead: 0.1,\n\t\t\tcacheWrite: 1.25,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":2,\"output\":9,\"cacheRead\":0.2,\"cacheWrite\":2.5}],\n\t\t},\n\t\tcontextWindow: 372000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.6-sol\": {\n\t\tid: \"gpt-5.6-sol\",\n\t\tname: \"GPT-5.6 Sol\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"max\":\"max\",\"minimal\":\"low\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 5,\n\t\t\toutput: 30,\n\t\t\tcacheRead: 0.5,\n\t\t\tcacheWrite: 6.25,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":10,\"output\":45,\"cacheRead\":1,\"cacheWrite\":12.5}],\n\t\t},\n\t\tcontextWindow: 372000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.6-terra\": {\n\t\tid: \"gpt-5.6-terra\",\n\t\tname: \"GPT-5.6 Terra\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"max\":\"max\",\"minimal\":\"low\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 2.5,\n\t\t\toutput: 15,\n\t\t\tcacheRead: 0.25,\n\t\t\tcacheWrite: 3.125,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":5,\"output\":22.5,\"cacheRead\":0.5,\"cacheWrite\":6.25}],\n\t\t},\n\t\tcontextWindow: 372000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n} as const;\n"]}
|
|
1
|
+
{"version":3,"file":"openai-codex.models.js","sourceRoot":"","sources":["../../src/providers/openai-codex.models.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,iEAAiE;AAIjE,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAClC,aAAa,EAAE;QACd,EAAE,EAAE,aAAa;QACjB,IAAI,EAAE,aAAa;QACnB,GAAG,EAAE,wBAAwB;QAC7B,QAAQ,EAAE,cAAc;QACxB,OAAO,EAAE,iCAAiC;QAC1C,MAAM,EAAE,EAAC,oBAAoB,EAAC,IAAI,EAAC;QACnC,SAAS,EAAE,IAAI;QACf,gBAAgB,EAAE,EAAC,KAAK,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAC,KAAK,EAAC,KAAK,EAAC;QACzE,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;QACxB,IAAI,EAAE;YACL,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,SAAS,EAAE,CAAC;YACZ,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE,CAAC,EAAC,kBAAkB,EAAC,MAAM,EAAC,OAAO,EAAC,EAAE,EAAC,QAAQ,EAAC,EAAE,EAAC,WAAW,EAAC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AAC,CAAC,EAAC,YAAY,EAAC,IAAI,EAAC,CAAC;SAC3F;QACD,aAAa,EAAE,MAAM;QACrB,SAAS,EAAE,MAAM;KACyB;IAC3C,eAAe,EAAE;QAChB,EAAE,EAAE,eAAe;QACnB,IAAI,EAAE,eAAe;QACrB,GAAG,EAAE,wBAAwB;QAC7B,QAAQ,EAAE,cAAc;QACxB,OAAO,EAAE,iCAAiC;QAC1C,MAAM,EAAE,EAAC,oBAAoB,EAAC,IAAI,EAAC;QACnC,SAAS,EAAE,IAAI;QACf,gBAAgB,EAAE,EAAC,OAAO,EAAC,OAAO,EAAC,KAAK,EAAC,KAAK,EAAC,SAAS,EAAC,KAAK,EAAC;QAC/D,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;QACxB,IAAI,EAAE;YACL,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,EAAE;YACV,SAAS,EAAE,IAAI;YACf,UAAU,EAAE,KAAK;YACjB,KAAK,EAAE,CAAC,EAAC,kBAAkB,EAAC,MAAM,EAAC,OAAO,EAAC,CAAC,EAAC,QAAQ,EAAC,IAAI,EAAC,WAAW,EAAC,GAAG,EAAC,YAAY,EAAC,IAAI,EAAC,CAAC;SAC9F;QACD,aAAa,EAAE,MAAM;QACrB,SAAS,EAAE,MAAM;KACyB;CAClC,CAAC","sourcesContent":["// This file is auto-generated by scripts/generate-models.ts\n// Do not edit manually - run 'npm run generate-models' to update\n\nimport type { Model } from \"../types.ts\";\n\nexport const OPENAI_CODEX_MODELS = {\n\t\"gpt-6-astra\": {\n\t\tid: \"gpt-6-astra\",\n\t\tname: \"GPT-6 Astra\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"off\":null,\"minimal\":null,\"xhigh\":\"xhigh\",\"max\":\"max\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 10,\n\t\t\toutput: 50,\n\t\t\tcacheRead: 1,\n\t\t\tcacheWrite: 12.5,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":20,\"output\":75,\"cacheRead\":2,\"cacheWrite\":25}],\n\t\t},\n\t\tcontextWindow: 272000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.3-codex-spark\": {\n\t\tid: \"gpt-5.3-codex-spark\",\n\t\tname: \"GPT-5.3 Codex Spark\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"minimal\":\"low\"},\n\t\tinput: [\"text\"],\n\t\tcost: {\n\t\t\tinput: 1.75,\n\t\t\toutput: 14,\n\t\t\tcacheRead: 0.175,\n\t\t\tcacheWrite: 0,\n\t\t},\n\t\tcontextWindow: 128000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.4\": {\n\t\tid: \"gpt-5.4\",\n\t\tname: \"GPT-5.4\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"minimal\":\"low\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 2.5,\n\t\t\toutput: 15,\n\t\t\tcacheRead: 0.25,\n\t\t\tcacheWrite: 0,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":5,\"output\":22.5,\"cacheRead\":0.5,\"cacheWrite\":0}],\n\t\t},\n\t\tcontextWindow: 272000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.4-mini\": {\n\t\tid: \"gpt-5.4-mini\",\n\t\tname: \"GPT-5.4 mini\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"minimal\":\"low\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 0.75,\n\t\t\toutput: 4.5,\n\t\t\tcacheRead: 0.075,\n\t\t\tcacheWrite: 0,\n\t\t},\n\t\tcontextWindow: 272000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.5\": {\n\t\tid: \"gpt-5.5\",\n\t\tname: \"GPT-5.5\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"minimal\":\"low\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 5,\n\t\t\toutput: 30,\n\t\t\tcacheRead: 0.5,\n\t\t\tcacheWrite: 0,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":10,\"output\":45,\"cacheRead\":1,\"cacheWrite\":0}],\n\t\t},\n\t\tcontextWindow: 272000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.6-luna\": {\n\t\tid: \"gpt-5.6-luna\",\n\t\tname: \"GPT-5.6 Luna\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"max\":\"max\",\"minimal\":\"low\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 1,\n\t\t\toutput: 6,\n\t\t\tcacheRead: 0.1,\n\t\t\tcacheWrite: 1.25,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":2,\"output\":9,\"cacheRead\":0.2,\"cacheWrite\":2.5}],\n\t\t},\n\t\tcontextWindow: 272000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.6-sol\": {\n\t\tid: \"gpt-5.6-sol\",\n\t\tname: \"GPT-5.6 Sol\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"max\":\"max\",\"minimal\":\"low\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 5,\n\t\t\toutput: 30,\n\t\t\tcacheRead: 0.5,\n\t\t\tcacheWrite: 6.25,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":10,\"output\":45,\"cacheRead\":1,\"cacheWrite\":12.5}],\n\t\t},\n\t\tcontextWindow: 272000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n\t\"gpt-5.6-terra\": {\n\t\tid: \"gpt-5.6-terra\",\n\t\tname: \"GPT-5.6 Terra\",\n\t\tapi: \"openai-codex-responses\",\n\t\tprovider: \"openai-codex\",\n\t\tbaseUrl: \"https://chatgpt.com/backend-api\",\n\t\tcompat: {\"supportsToolSearch\":true},\n\t\treasoning: true,\n\t\tthinkingLevelMap: {\"xhigh\":\"xhigh\",\"max\":\"max\",\"minimal\":\"low\"},\n\t\tinput: [\"text\", \"image\"],\n\t\tcost: {\n\t\t\tinput: 2.5,\n\t\t\toutput: 15,\n\t\t\tcacheRead: 0.25,\n\t\t\tcacheWrite: 3.125,\n\t\t\ttiers: [{\"inputTokensAbove\":272000,\"input\":5,\"output\":22.5,\"cacheRead\":0.5,\"cacheWrite\":6.25}],\n\t\t},\n\t\tcontextWindow: 272000,\n\t\tmaxTokens: 128000,\n\t} satisfies Model<\"openai-codex-responses\">,\n} as const;\n"]}
|