File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,8 @@ export class ChatGPTApi implements LLMApi {
198198 const isDalle3 = _isDalle3 ( options . config . model ) ;
199199 const isO1OrO3 =
200200 options . config . model . startsWith ( "o1" ) ||
201- options . config . model . startsWith ( "o3" ) ;
201+ options . config . model . startsWith ( "o3" ) ||
202+ options . config . model . startsWith ( "o4-mini" ) ;
202203 if ( isDalle3 ) {
203204 const prompt = getMessageTextContent (
204205 options . messages . slice ( - 1 ) ?. pop ( ) as any ,
@@ -243,7 +244,7 @@ export class ChatGPTApi implements LLMApi {
243244 }
244245
245246 // add max_tokens to vision model
246- if ( visionModel ) {
247+ if ( visionModel && ! isO1OrO3 ) {
247248 requestPayload [ "max_tokens" ] = Math . max ( modelConfig . max_tokens , 4000 ) ;
248249 }
249250 }
Original file line number Diff line number Diff line change @@ -478,6 +478,8 @@ export const VISION_MODEL_REGEXES = [
478478 / ^ d a l l - e - 3 $ / , // Matches exactly "dall-e-3"
479479 / g l m - 4 v / ,
480480 / v l / i,
481+ / o 3 / ,
482+ / o 4 - m i n i / ,
481483] ;
482484
483485export const EXCLUDE_VISION_MODEL_REGEXES = [ / c l a u d e - 3 - 5 - h a i k u - 2 0 2 4 1 0 2 2 / ] ;
@@ -516,6 +518,8 @@ const openaiModels = [
516518 "o1-mini" ,
517519 "o1-preview" ,
518520 "o3-mini" ,
521+ "o3" ,
522+ "o4-mini" ,
519523] ;
520524
521525const googleModels = [
You can’t perform that action at this time.
0 commit comments