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
16 changes: 13 additions & 3 deletions coworker/providers/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,16 +211,26 @@ class ModelEntry:
"Llama 4 Maverick · via Fireworks", _AGENTIC, 1_000_000
),
# OpenRouter slugs are lowercase `<lab>/<model>` (checked against their catalog
# 2026-07-25); same labs as above, one key for all of them.
# 2026-07-25); same labs as above, one key for all of them. Kimi K2.6 and Llama 4
# Maverick declare image input (architecture.input_modalities, 2026-08-09); PDFs
# unverified over the compat surface, like Kimi K3 above.
"openrouter:z-ai/glm-5.2": ModelEntry("GLM-5.2 · via OpenRouter", _AGENTIC, 128_000),
"openrouter:moonshotai/kimi-k2.6": ModelEntry(
"Kimi K2.6 · via OpenRouter", _AGENTIC, 256_000
"Kimi K2.6 · via OpenRouter",
ModelCapabilities(
tools=True, vision=True, parallel_tool_calls=True, streaming=True
),
256_000,
),
"openrouter:deepseek/deepseek-v4-pro": ModelEntry(
"DeepSeek V4 Pro · via OpenRouter", _AGENTIC, 128_000
),
"openrouter:meta-llama/llama-4-maverick": ModelEntry(
"Llama 4 Maverick · via OpenRouter", _AGENTIC, 1_000_000
"Llama 4 Maverick · via OpenRouter",
ModelCapabilities(
tools=True, vision=True, parallel_tool_calls=True, streaming=True
),
1_000_000,
),
# Stealth/cloaked alpha (catalog-checked 2026-08-24: 1,048,576 ctx, tool calling).
# These are temporary lab previews — expect the slug to vanish when the lab ships
Expand Down
13 changes: 13 additions & 0 deletions tests/test_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,19 @@ def test_matrix_answers_capabilities_for_reseller_ids():
assert caps.tools and caps.parallel_tool_calls and caps.streaming


def test_openrouter_vision_matches_declared_input_modalities():
"""Vision must track what OpenRouter declares per model, or the engine swaps in its
non-vision placeholder and the image never reaches a model that can read it."""
for mid in (
"openrouter:moonshotai/kimi-k2.6",
"openrouter:meta-llama/llama-4-maverick",
):
caps = capabilities_for(mid)
assert caps.vision and not caps.pdf, mid
for mid in ("openrouter:z-ai/glm-5.2", "openrouter:deepseek/deepseek-v4-pro"):
assert not capabilities_for(mid).vision, mid


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

Expand Down