File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ export function getLLMProviderOverrideForPersona(
63
63
}
64
64
65
65
const MODEL_NAMES_SUPPORTING_IMAGE_INPUT = [
66
+ "gpt-4.1" ,
66
67
"gpt-4o" ,
67
68
"gpt-4o-mini" ,
68
69
"gpt-4-vision-preview" ,
@@ -125,12 +126,22 @@ export function checkLLMSupportsImageInput(model: string) {
125
126
const modelParts = model . split ( / [ / . ] / ) ;
126
127
const lastPart = modelParts [ modelParts . length - 1 ] ?. toLowerCase ( ) ;
127
128
128
- return MODEL_NAMES_SUPPORTING_IMAGE_INPUT . some ( ( modelName ) => {
129
+ const partialMatch = MODEL_NAMES_SUPPORTING_IMAGE_INPUT . some ( ( modelName ) => {
129
130
const modelNameParts = modelName . split ( / [ / . ] / ) ;
130
131
const modelNameLastPart = modelNameParts [ modelNameParts . length - 1 ] ;
131
132
// lastPart is already lowercased above for tiny performance gain
132
133
return modelNameLastPart ?. toLowerCase ( ) === lastPart ;
133
134
} ) ;
135
+ if ( partialMatch ) {
136
+ return true ;
137
+ }
138
+
139
+ // all claude models support image input
140
+ if ( model . toLowerCase ( ) . includes ( "claude" ) ) {
141
+ return true ;
142
+ }
143
+
144
+ return false ;
134
145
}
135
146
136
147
export const structureValue = (
You can’t perform that action at this time.
0 commit comments