fix(providers): mark Qwen3.8 Max Preview as vision-capable - #449
Open
ADanMan wants to merge 1 commit into
Open
Conversation
Qwen3.8 Max Preview is multimodal (text/image/video/document per Alibaba's model card), but the qwen-prefix heuristic in capabilities.py hardcodes vision=False for the whole family. With no curated matrix entry for this model, entry_for() falls through to that heuristic, so image attachments get silently stripped and replaced with a "[image attachment — not viewable by this model]" placeholder before the request ever reaches the model. Add a curated matrix entry, mirroring the existing vision exceptions for Muse Spark and the native vendors. pdf is left at its default (False), matching Muse Spark's caveat: PDF support is unverified over the OpenAI-compatible surface, so it falls back via pdf_support.py. Fixes andrewyng#401
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.
Fixes #401.
The bug
Qwen3.8 Max Preview is multimodal (text/image/video/document, per Alibaba's model card), but there's no curated matrix entry for it.
capabilities_for()falls through to theqwen-prefix heuristic incoworker/providers/capabilities.py, which hardcodesvision=Falsefor the whole family (deepseek,glm,kimi,minimax,qwen,grok,mistral,magistral). Selecting this model then silently strips any attached image and replaces it with a[image attachment — not viewable by this model]placeholder before the request reaches the model — no error, just a quiet capability downgrade.The fix
Add a curated matrix entry (
coworker/providers/matrix.py), the same pattern already used for the other vision exceptions (Muse Spark, the native vendors):pdfis left at its default (False) — same caveat as Muse Spark, since PDF ingestion is unverified over the OpenAI-compatible surface for this vendor and falls back viapdf_support.py. The existing text-onlyqwen:qwen3-maxentry is untouched.Since
_suggested_models()builds the "add model" datalist frommodels_for_provider()(matrix-derived) plusCOMPAT_MODELS, this also makesqwen3.8-max-previewshow up as a suggestion for the Qwen provider without any change needed there.Testing
test_qwen38_max_preview_is_curated_vision_trueintests/test_providers.py, covering: the new entry resolvesvision=True, the existingqwen3-maxentry is unaffected, and a bare (unprefixed) model string still falls through to the conservative heuristic — confirming the matrix entry, not the heuristic, is what fixes this.1113 passed, 1 skipped(uv venv --python 3.11+pip install -e ".[dev,bedrock,messaging]",pytest tests/) — clean on a fresh env with all optional extras installed.No UI-visible change (no screenshots) — this is a provider-capabilities data fix; effect is that the composer now sends the image instead of dropping it, per the issue's repro steps.