Skip to content

fix(chat): detect bare-named Qwen3.6 tags as vision-capable#5502

Open
SumTuusDeus wants to merge 1 commit into
odysseus-dev:devfrom
SumTuusDeus:fix/vision-keywords-qwen36
Open

fix(chat): detect bare-named Qwen3.6 tags as vision-capable#5502
SumTuusDeus wants to merge 1 commit into
odysseus-dev:devfrom
SumTuusDeus:fix/vision-keywords-qwen36

Conversation

@SumTuusDeus

Copy link
Copy Markdown

Summary

is_vision_model() returns False for 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 for gemma3: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 are image-text-to-text with a built-in vision encoder; vLLM serves them with vision on by default — full evidence with links in #5501), so none of the existing qwen*-vl keywords or the standalone-vl regex can ever match. This PR adds the single bare family keyword "qwen3.6" to _VISION_MODEL_KEYWORDS with 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/show probe): 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

  • This PR targets dev, not main.

Linked Issue

Fixes #5501
Related: #124, #1274, #4723 (same symptom reported for qwen 3.6 on Ollama), #3743

Type of Change

  • Bug fix (non-breaking — fixes a confirmed issue)
  • New feature (non-breaking — adds new behaviour)
  • Breaking change (changes or removes existing behaviour)
  • Refactor / cleanup (behaviour unchanged)
  • Documentation only
  • CI / tooling / configuration

Checklist

  • I searched open issues and open PRs — this is not a duplicate. Closest neighbours are linked above: Images cannot be seen by model that is vision capable #4723 (symptom report, Ollama/Windows) and fix(vision): probe Ollama /api/show capabilities instead of guessing … #3743 (Ollama-only probe; leaves the keyword list stale for other backends).
  • This PR targets dev
  • My changes are limited to the scope described above — one keyword + its comment + tests; no unrelated changes.
  • I actually ran the app and verified the change works end-to-end: on a live Docker install (docker 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; verified is_vision_model("qwen3.6-35b") is True inside the running container.

How to Test

  1. Quick unit check on this branch: python -m pytest tests/test_vision_model_detection.py (5 pass; new cases cover qwen3.6, qwen3.6:27b, qwen3.6-35b-a3b positive and qwen3:8b, qwen2.5:14b negative). Also ran python -m pytest tests/test_lmstudio_vision.py (10 pass) and python -m py_compile src/chat_helpers.py tests/test_vision_model_detection.py.
  2. In a REPL on this branch: from src.chat_helpers import is_vision_model; is_vision_model("qwen3.6:27b")True (was False on dev).
  3. End-to-end: run Odysseus against any OpenAI-compatible endpoint serving a Qwen3.6 checkpoint (vLLM recipe: https://recipes.vllm.ai/Qwen/Qwen3.6-27B), attach an image, and ask about it — the model now describes the actual image instead of a caption.
  4. Regression: text-only tags (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.

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.
@github-actions github-actions Bot added the ready for review Description complete — ready for maintainer review label Jul 13, 2026

@AbdullahWins AbdullahWins left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! The logic for detecting bare-named tags as vision-capable seems correct and the accompanying test coverage is appreciated. LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Description complete — ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

is_vision_model() misses the entire Qwen3.6 family — images silently caption-swapped on vLLM/OpenAI-compatible endpoints

2 participants