File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -328,6 +328,7 @@ const anthropicModels = [
328
328
"claude-3-sonnet-20240229" ,
329
329
"claude-3-opus-20240229" ,
330
330
"claude-3-haiku-20240307" ,
331
+ "claude-3-5-haiku-20241022" ,
331
332
"claude-3-5-sonnet-20240620" ,
332
333
"claude-3-5-sonnet-20241022" ,
333
334
"claude-3-5-sonnet-latest" ,
Original file line number Diff line number Diff line change @@ -254,6 +254,7 @@ export function getMessageImages(message: RequestMessage): string[] {
254
254
export function isVisionModel ( model : string ) {
255
255
// Note: This is a better way using the TypeScript feature instead of `&&` or `||` (ts v5.5.0-dev.20240314 I've been using)
256
256
257
+ const excludeKeywords = [ "claude-3-5-haiku-20241022" ] ;
257
258
const visionKeywords = [
258
259
"vision" ,
259
260
"claude-3" ,
@@ -266,9 +267,10 @@ export function isVisionModel(model: string) {
266
267
model . includes ( "gpt-4-turbo" ) && ! model . includes ( "preview" ) ;
267
268
268
269
return (
269
- visionKeywords . some ( ( keyword ) => model . includes ( keyword ) ) ||
270
- isGpt4Turbo ||
271
- isDalle3 ( model )
270
+ ! excludeKeywords . some ( ( keyword ) => model . includes ( keyword ) ) &&
271
+ ( visionKeywords . some ( ( keyword ) => model . includes ( keyword ) ) ||
272
+ isGpt4Turbo ||
273
+ isDalle3 ( model ) )
272
274
) ;
273
275
}
274
276
You can’t perform that action at this time.
0 commit comments