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
12 changes: 12 additions & 0 deletions coworker/providers/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,18 @@ class ModelEntry:
"kimi:kimi-k2.6": ModelEntry("Kimi K2.6 · Moonshot", _AGENTIC, 256_000),
"minimax:MiniMax-M2.5": ModelEntry("MiniMax M2.5 · MiniMax"),
"qwen:qwen3-max": ModelEntry("Qwen3 Max · Alibaba", _AGENTIC, 256_000),
# Qwen3.8 Max Preview (2026-07): multimodal (text/image/video/document) per Alibaba's
# model card, unlike the text-only Qwen3 Max above — needs its own entry so the qwen
# prefix heuristic in capabilities.py (vision=False for the whole family) doesn't
# strip images client-side (owner report 2026-08-02). PDF unverified over the compat
# surface, same caveat as Muse Spark, so it falls back via pdf_support.py too.
"qwen:qwen3.8-max-preview": ModelEntry(
"Qwen3.8 Max Preview · Alibaba",
ModelCapabilities(
tools=True, vision=True, parallel_tool_calls=True, streaming=True
),
1_000_000,
),
"xai:grok-4.3": ModelEntry("Grok 4.3 · xAI", _AGENTIC, 256_000),
"mistral:mistral-large-latest": ModelEntry(
"Mistral Large · Mistral", _AGENTIC, 128_000
Expand Down
12 changes: 12 additions & 0 deletions tests/test_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,18 @@ def test_matrix_answers_capabilities_for_reseller_ids():
assert caps.tools and caps.parallel_tool_calls and caps.streaming


def test_qwen38_max_preview_is_curated_vision_true():
"""Qwen3.8 Max Preview is multimodal, unlike the text-only Qwen3 Max — it needs its
own matrix entry so the blanket qwen-prefix heuristic (vision=False) doesn't strip
images client-side (issue: images silently replaced with a placeholder). The bare
Qwen3 Max entry is untouched by the fix."""
assert capabilities_for("qwen:qwen3.8-max-preview").vision is True
assert capabilities_for("qwen:qwen3-max").vision is False
# the heuristic alone (no provider prefix) still can't tell the two apart — the
# matrix entry, not the heuristic, is what fixes this.
assert capabilities_for("qwen3.8-max-preview").vision is False


def test_matrix_labels_and_custom_model_fallback():
from coworker.providers.matrix import MATRIX, model_labels

Expand Down