fix(ai): exclude nonexistent GPT-5.6 alias

This commit is contained in:
Armin Ronacher
2026-07-09 21:20:33 +02:00
parent 532134428a
commit 6c735db060
5 changed files with 5 additions and 51 deletions
+4 -13
View File
@@ -193,6 +193,8 @@ const ANT_LING_RING_THINKING_LEVEL_MAP = {
xhigh: "xhigh",
} as const;
const MODELS_DEV_OPENAI_UNSUPPORTED_MODEL_IDS = new Set(["gpt-5.6"]);
const OPENAI_RESPONSES_NONE_REASONING_MODELS = new Set([
"gpt-5.1",
"gpt-5.2",
@@ -201,7 +203,6 @@ const OPENAI_RESPONSES_NONE_REASONING_MODELS = new Set([
"gpt-5.4-mini",
"gpt-5.4-nano",
"gpt-5.5",
"gpt-5.6",
"gpt-5.6-sol",
"gpt-5.6-terra",
"gpt-5.6-luna",
@@ -905,6 +906,8 @@ async function loadModelsDevData(): Promise<Model<any>[]> {
for (const [modelId, model] of Object.entries(data.openai.models)) {
const m = model as ModelsDevModel;
if (m.tool_call !== true) continue;
// models.dev lists this alias, but it is not accepted by OpenAI APIs.
if (MODELS_DEV_OPENAI_UNSUPPORTED_MODEL_IDS.has(modelId)) continue;
models.push({
id: modelId,
@@ -1713,18 +1716,6 @@ async function generateModels() {
// Add missing gpt models
const missingOpenAiModels: Model<"openai-responses">[] = [
{
id: "gpt-5.6",
name: "GPT-5.6",
api: "openai-responses",
baseUrl: "https://api.openai.com/v1",
provider: "openai",
reasoning: true,
input: ["text", "image"],
cost: { input: 5, output: 30, cacheRead: 0.5, cacheWrite: 0 },
contextWindow: 1050000,
maxTokens: 128000,
},
{
id: "gpt-5.6-sol",
name: "GPT-5.6 Sol",