(model: string)
| 281 | } |
| 282 | |
| 283 | export function isVisionModel(model: string) { |
| 284 | const visionModels = useAccessStore.getState().visionModels; |
| 285 | const envVisionModels = visionModels?.split(",").map((m) => m.trim()); |
| 286 | if (envVisionModels?.includes(model)) { |
| 287 | return true; |
| 288 | } |
| 289 | return ( |
| 290 | !EXCLUDE_VISION_MODEL_REGEXES.some((regex) => regex.test(model)) && |
| 291 | VISION_MODEL_REGEXES.some((regex) => regex.test(model)) |
| 292 | ); |
| 293 | } |
| 294 | |
| 295 | export function isDalle3(model: string) { |
| 296 | return "dall-e-3" === model; |