fix(ai): exclude nonexistent GPT-5.6 alias
This commit is contained in:
@@ -193,6 +193,8 @@ const ANT_LING_RING_THINKING_LEVEL_MAP = {
|
|||||||
xhigh: "xhigh",
|
xhigh: "xhigh",
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
const MODELS_DEV_OPENAI_UNSUPPORTED_MODEL_IDS = new Set(["gpt-5.6"]);
|
||||||
|
|
||||||
const OPENAI_RESPONSES_NONE_REASONING_MODELS = new Set([
|
const OPENAI_RESPONSES_NONE_REASONING_MODELS = new Set([
|
||||||
"gpt-5.1",
|
"gpt-5.1",
|
||||||
"gpt-5.2",
|
"gpt-5.2",
|
||||||
@@ -201,7 +203,6 @@ const OPENAI_RESPONSES_NONE_REASONING_MODELS = new Set([
|
|||||||
"gpt-5.4-mini",
|
"gpt-5.4-mini",
|
||||||
"gpt-5.4-nano",
|
"gpt-5.4-nano",
|
||||||
"gpt-5.5",
|
"gpt-5.5",
|
||||||
"gpt-5.6",
|
|
||||||
"gpt-5.6-sol",
|
"gpt-5.6-sol",
|
||||||
"gpt-5.6-terra",
|
"gpt-5.6-terra",
|
||||||
"gpt-5.6-luna",
|
"gpt-5.6-luna",
|
||||||
@@ -905,6 +906,8 @@ async function loadModelsDevData(): Promise<Model<any>[]> {
|
|||||||
for (const [modelId, model] of Object.entries(data.openai.models)) {
|
for (const [modelId, model] of Object.entries(data.openai.models)) {
|
||||||
const m = model as ModelsDevModel;
|
const m = model as ModelsDevModel;
|
||||||
if (m.tool_call !== true) continue;
|
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({
|
models.push({
|
||||||
id: modelId,
|
id: modelId,
|
||||||
@@ -1713,18 +1716,6 @@ async function generateModels() {
|
|||||||
|
|
||||||
// Add missing gpt models
|
// Add missing gpt models
|
||||||
const missingOpenAiModels: Model<"openai-responses">[] = [
|
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",
|
id: "gpt-5.6-sol",
|
||||||
name: "GPT-5.6 Sol",
|
name: "GPT-5.6 Sol",
|
||||||
|
|||||||
@@ -606,24 +606,6 @@ export const AZURE_OPENAI_RESPONSES_MODELS = {
|
|||||||
contextWindow: 1050000,
|
contextWindow: 1050000,
|
||||||
maxTokens: 128000,
|
maxTokens: 128000,
|
||||||
} satisfies Model<"azure-openai-responses">,
|
} satisfies Model<"azure-openai-responses">,
|
||||||
"gpt-5.6": {
|
|
||||||
id: "gpt-5.6",
|
|
||||||
name: "GPT-5.6",
|
|
||||||
api: "azure-openai-responses",
|
|
||||||
provider: "azure-openai-responses",
|
|
||||||
baseUrl: "",
|
|
||||||
reasoning: true,
|
|
||||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh","max":"max"},
|
|
||||||
input: ["text", "image"],
|
|
||||||
cost: {
|
|
||||||
input: 5,
|
|
||||||
output: 30,
|
|
||||||
cacheRead: 0.5,
|
|
||||||
cacheWrite: 6.25,
|
|
||||||
},
|
|
||||||
contextWindow: 1050000,
|
|
||||||
maxTokens: 128000,
|
|
||||||
} satisfies Model<"azure-openai-responses">,
|
|
||||||
"gpt-5.6-luna": {
|
"gpt-5.6-luna": {
|
||||||
id: "gpt-5.6-luna",
|
id: "gpt-5.6-luna",
|
||||||
name: "GPT-5.6 Luna",
|
name: "GPT-5.6 Luna",
|
||||||
|
|||||||
@@ -606,24 +606,6 @@ export const OPENAI_MODELS = {
|
|||||||
contextWindow: 1050000,
|
contextWindow: 1050000,
|
||||||
maxTokens: 128000,
|
maxTokens: 128000,
|
||||||
} satisfies Model<"openai-responses">,
|
} satisfies Model<"openai-responses">,
|
||||||
"gpt-5.6": {
|
|
||||||
id: "gpt-5.6",
|
|
||||||
name: "GPT-5.6",
|
|
||||||
api: "openai-responses",
|
|
||||||
provider: "openai",
|
|
||||||
baseUrl: "https://api.openai.com/v1",
|
|
||||||
reasoning: true,
|
|
||||||
thinkingLevelMap: {"off":"none","xhigh":"xhigh","max":"max"},
|
|
||||||
input: ["text", "image"],
|
|
||||||
cost: {
|
|
||||||
input: 5,
|
|
||||||
output: 30,
|
|
||||||
cacheRead: 0.5,
|
|
||||||
cacheWrite: 6.25,
|
|
||||||
},
|
|
||||||
contextWindow: 1050000,
|
|
||||||
maxTokens: 128000,
|
|
||||||
} satisfies Model<"openai-responses">,
|
|
||||||
"gpt-5.6-luna": {
|
"gpt-5.6-luna": {
|
||||||
id: "gpt-5.6-luna",
|
id: "gpt-5.6-luna",
|
||||||
name: "GPT-5.6 Luna",
|
name: "GPT-5.6 Luna",
|
||||||
|
|||||||
@@ -99,7 +99,6 @@ describe("openai-responses provider defaults", () => {
|
|||||||
"gpt-5.4-mini",
|
"gpt-5.4-mini",
|
||||||
"gpt-5.4-nano",
|
"gpt-5.4-nano",
|
||||||
"gpt-5.5",
|
"gpt-5.5",
|
||||||
"gpt-5.6",
|
|
||||||
"gpt-5.6-sol",
|
"gpt-5.6-sol",
|
||||||
"gpt-5.6-terra",
|
"gpt-5.6-terra",
|
||||||
"gpt-5.6-luna",
|
"gpt-5.6-luna",
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ describe("getSupportedThinkingLevels", () => {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
it.each(["gpt-5.6", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"] as const)(
|
it.each(["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"] as const)(
|
||||||
"includes xhigh and max for OpenAI %s models",
|
"includes xhigh and max for OpenAI %s models",
|
||||||
(modelId) => {
|
(modelId) => {
|
||||||
const model = getModel("openai", modelId);
|
const model = getModel("openai", modelId);
|
||||||
|
|||||||
Reference in New Issue
Block a user