From b50c32790c58c0595e68a3234ee06b1e6f8e7b1f Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 18 Apr 2024 11:46:07 -0700 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20again,=20improve=20image?= =?UTF-8?q?=20support=20autodetection?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/llm/autodetect.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index 2ba433571a..2503dafd10 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -57,6 +57,9 @@ const MODEL_SUPPORTS_IMAGES: string[] = [ "claude-3", "gemini-ultra", "gemini-1.5-pro", + "sonnet", + "opus", + "haiku", ]; function modelSupportsImages(provider: ModelProvider, model: string): boolean { @@ -64,7 +67,7 @@ function modelSupportsImages(provider: ModelProvider, model: string): boolean { return false; } - if (MODEL_SUPPORTS_IMAGES.includes(model)) { + if (MODEL_SUPPORTS_IMAGES.includes(model.toLowerCase())) { return true; }