Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/chat_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ def extract_urls(text: str) -> List[str]:
"phi-4", "phi4",
# zhipu / glm (glm-4.5v, glm-4.6v, glm-5v-turbo, etc.)
"glm-4.5v", "glm-4.6v", "glm-5v",
# Qwen3.6 is natively multimodal under its bare names: every checkpoint in
# the family (Qwen3.6-27B, Qwen3.6-35B-A3B) ships a vision encoder and is
# published as image-text-to-text; there is no separate Qwen3.6-VL line, so
# the qwen*-vl keywords above never match these tags.
"qwen3.6",
)
# Catches the "*-VL-*" / "*VL*" family not covered by a literal keyword above
# (e.g. Qwen2.5-VL and various tags): a standalone "vl" token, plus "vlm".
Expand Down
6 changes: 5 additions & 1 deletion tests/test_vision_model_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,15 @@ def test_recognizes_multimodal_families_without_vision_in_name():
"llama4:scout", "llama4", "llama-4-maverick",
"mistral-small3.1", "mistral-small-3.2",
"phi-4-multimodal", "phi4-multimodal",
# Qwen3.6 ships a vision encoder in every bare-named checkpoint
# (no separate VL variant), so plain tags must pass through images.
"qwen3.6", "qwen3.6:27b", "qwen3.6-35b-a3b",
]:
assert is_vision_model(name), f"{name!r} should be detected as vision-capable"


def test_new_keywords_do_not_overmatch_text_models():
# The added families must not flag their text-only siblings.
for name in ["gemma2:9b", "gemma:7b", "llama3.3", "mistral-small", "phi-3-mini"]:
for name in ["gemma2:9b", "gemma:7b", "llama3.3", "mistral-small", "phi-3-mini",
"qwen3:8b", "qwen2.5:14b"]:
assert not is_vision_model(name), f"{name!r} should not be flagged as vision"