fix(chat): detect bare-named Qwen3.6 tags as vision-capable#5502
Open
SumTuusDeus wants to merge 1 commit into
Open
fix(chat): detect bare-named Qwen3.6 tags as vision-capable#5502SumTuusDeus wants to merge 1 commit into
SumTuusDeus wants to merge 1 commit into
Conversation
The Qwen3.6 family ships vision natively in every bare-named checkpoint (Qwen3.6-27B, Qwen3.6-35B-A3B are published as image-text-to-text with a built-in vision encoder; there is no separate Qwen3.6-VL line). None of the existing qwen*-vl keywords or the standalone-"vl" regex match these tags, so is_vision_model returns False and image attachments are silently swapped for captions — the issue odysseus-dev#1274 failure mode, resolved per the err-toward-True policy of issue odysseus-dev#124.
AbdullahWins
approved these changes
Jul 14, 2026
AbdullahWins
left a comment
There was a problem hiding this comment.
Looks good to me! The logic for detecting bare-named tags as vision-capable seems correct and the accompanying test coverage is appreciated. LGTM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
is_vision_model()returnsFalsefor every Qwen3.6 tag (qwen3.6,qwen3.6:27b,qwen3.6-35b-a3b, fine-tune names containing the family name), so Odysseus silently swaps image attachments for text captions and the model never sees the picture — the exact failure mode #1274 fixed forgemma3:4b-style tags. Unlike Qwen2.5/Qwen3, the Qwen3.6 family ships vision natively in every bare-named checkpoint and has no separate VL variant (all official repos areimage-text-to-textwith a built-in vision encoder; vLLM serves them with vision on by default — full evidence with links in #5501), so none of the existingqwen*-vlkeywords or the standalone-vlregex can ever match. This PR adds the single bare family keyword"qwen3.6"to_VISION_MODEL_KEYWORDSwith a justifying comment matching the gemma3/llama4/phi-4 entries, per the err-toward-True policy (#124), plus test coverage. It complements open PR #3743 (Ollama/api/showprobe): the probe can't help vLLM/OpenAI-compatible endpoints, where the keyword list remains the only decision path, and this also fixes the fallback list that probe keeps relying on.Per the contribution policy on auto-generated PRs: this is an agent-assisted, human-reviewed contribution; issue #5501 was filed first describing the problem, before this PR.
Target branch
dev, notmain.Linked Issue
Fixes #5501
Related: #124, #1274, #4723 (same symptom reported for
qwen 3.6on Ollama), #3743Type of Change
Checklist
devdocker compose up -d --build) pointed at a vLLM-served Qwen3.6-35B fine-tune, image attachments reach the model natively with this keyword present, instead of being caption-swapped; verifiedis_vision_model("qwen3.6-35b")isTrueinside the running container.How to Test
python -m pytest tests/test_vision_model_detection.py(5 pass; new cases coverqwen3.6,qwen3.6:27b,qwen3.6-35b-a3bpositive andqwen3:8b,qwen2.5:14bnegative). Also ranpython -m pytest tests/test_lmstudio_vision.py(10 pass) andpython -m py_compile src/chat_helpers.py tests/test_vision_model_detection.py.from src.chat_helpers import is_vision_model; is_vision_model("qwen3.6:27b")→True(wasFalseondev).qwen3:8b,qwen2.5:14b,mistral-small,deepseek-r1) are still not flagged as vision.Visual / UI changes — REQUIRED if you touched anything that renders
Not a visual change — no UI/rendering paths touched.