From 40e73b0fa4797e64696a13454cfae1d33799414d Mon Sep 17 00:00:00 2001 From: Fred Bricon Date: Mon, 15 Sep 2025 11:31:20 +0200 Subject: [PATCH] feat: autodetect qwen2.5vl image support Signed-off-by: Fred Bricon --- core/llm/autodetect.ts | 1 + core/llm/index.test.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index 7323f15ec..369a9cb9a 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -102,6 +102,7 @@ const MODEL_SUPPORTS_IMAGES: RegExp[] = [ /llama-?4/, // might use something like /llama-?(?:[4-9](?:\.\d+)?|\d{2,}(?:\.\d+)?)/ for forward compat, if needed /\bgemma-?3(?!n)/, // gemma3 supports vision, but gemma3n doesn't! /\b(pali|med)gemma/, + /qwen(.*)vl/, ]; function modelSupportsImages( diff --git a/core/llm/index.test.ts b/core/llm/index.test.ts index a4f9953b0..a35fe49da 100644 --- a/core/llm/index.test.ts +++ b/core/llm/index.test.ts @@ -110,6 +110,9 @@ describe("BaseLLM", () => { baseLLM.model = "foo/medgemma_4b_it_16Q"; expect(baseLLM.supportsImages()).toBe(true); + + baseLLM.model = "qwen2.5vl"; + expect(baseLLM.supportsImages()).toBe(true); }); test("should return false when modelSupportsImages returns false", () => {