Skip to content

Commit ea1329f

Browse files
committed
fix: add optional chaining to prevent errors when accessing visionModels
1 parent 149d732 commit ea1329f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ export function getMessageImages(message: RequestMessage): string[] {
255255

256256
export function isVisionModel(model: string) {
257257
const clientConfig = getClientConfig();
258-
const envVisionModels = clientConfig.visionModels
258+
const envVisionModels = clientConfig?.visionModels
259259
?.split(",")
260260
.map((m) => m.trim());
261261
if (envVisionModels?.includes(model)) {

0 commit comments

Comments
 (0)