From 0c916047651a506863b47bad624893ed54353b89 Mon Sep 17 00:00:00 2001 From: twfz7 <34053484+twfz7@users.noreply.github.com> Date: Fri, 25 Apr 2025 09:01:12 +0800 Subject: [PATCH] Revert "Support OpenAI o3 and o4-mini" --- app/client/platforms/openai.ts | 5 ++--- app/constant.ts | 4 ---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/app/client/platforms/openai.ts b/app/client/platforms/openai.ts index 4cad6bf94..c6f3fc425 100644 --- a/app/client/platforms/openai.ts +++ b/app/client/platforms/openai.ts @@ -198,8 +198,7 @@ export class ChatGPTApi implements LLMApi { const isDalle3 = _isDalle3(options.config.model); const isO1OrO3 = options.config.model.startsWith("o1") || - options.config.model.startsWith("o3") || - options.config.model.startsWith("o4-mini"); + options.config.model.startsWith("o3"); if (isDalle3) { const prompt = getMessageTextContent( options.messages.slice(-1)?.pop() as any, @@ -244,7 +243,7 @@ export class ChatGPTApi implements LLMApi { } // add max_tokens to vision model - if (visionModel && !isO1OrO3) { + if (visionModel) { requestPayload["max_tokens"] = Math.max(modelConfig.max_tokens, 4000); } } diff --git a/app/constant.ts b/app/constant.ts index 9fcea1187..422c42629 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -478,8 +478,6 @@ export const VISION_MODEL_REGEXES = [ /^dall-e-3$/, // Matches exactly "dall-e-3" /glm-4v/, /vl/i, - /o3/, - /o4-mini/, ]; export const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/]; @@ -518,8 +516,6 @@ const openaiModels = [ "o1-mini", "o1-preview", "o3-mini", - "o3", - "o4-mini", ]; const googleModels = [