Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: models.dev catalog for reasoning and image options on other API providers (#10957)
Nilay8b343f8e4e8e
diff --git a/studio/backend/core/inference/external_provider.py b/studio/backend/core/inference/external_provider.pyindex 0fe082bc82e..a6ba5c824c8 100644--- a/studio/backend/core/inference/external_provider.py+++ b/studio/backend/core/inference/external_provider.py@@ -163,8 +163,8 @@ _ANTHROPIC_MODEL_VERSION = re.compile()_OPENAI_REASONING_SUMMARY_UNSUPPORTED = re.compile(r"^o3(?:[-.]|$)")# Gemini 3.x, dotted minor optional: gemini-3-, gemini-3.1-, gemini-3.6- ...-_GEMINI3_FAMILY = re.compile(r"^gemini-3(?:\.\d+)?-")-_GEMINI3_PRO = re.compile(r"^gemini-3(?:\.\d+)?-pro")+_GEMINI3_FAMILY = re.compile(r"^gemini-(?:[3-9]|\d{2,})(?:\.\d+)?-")+_GEMINI3_PRO = re.compile(r"^gemini-(?:[3-9]|\d{2,})(?:\.\d+)?-pro")def _anthropic_text_is_sendable(value: Any) -> bool:@@ -452,16 +452,56 @@ _ANTHROPIC_THINKING_SPECS = (kind = "manual",efforts = ("none", "low", "medium", "high"),),+ # Earlier Claude 4 models and 3.7 Sonnet only take manual budget_tokens; adaptive thinking returns a 400 there.+ _AnthropicThinkingSpec(+ prefixes = (+ "claude-opus-4-1",+ "claude-opus-4-0",+ "claude-opus-4-2025",+ "claude-sonnet-4-0",+ "claude-sonnet-4-2025",+ "claude-3-7-sonnet",+ ),+ kind = "manual",+ efforts = ("none", "low", "medium", "high"),+ ),)+def _anthropic_spec_prefix_matches(model_lc: str, prefix: str) -> bool:+ """A version prefix ("claude-opus-4-1") must stop at a boundary or it swallows+ "claude-opus-4-15"; a truncated release date ("claude-opus-4-2025") has to run on, so only a+ 4-digit tail may."""+ if model_lc == prefix:+ return True+ if not model_lc.startswith(prefix):+ return False+ rest = model_lc[len(prefix) :]+ if rest.startswith("-"):+ return True+ trailing_digits = re.search(r"\d+$", prefix)+ return bool(trailing_digits and len(trailing_digits.group()) >= 4 and rest[0].isdigit())++def _anthropic_thinking_spec(model: str) -> Optional[_AnthropicThinkingSpec]:+ # Normalized like the version helpers, so a capitalized id keeps its efforts and its+ # default-on / can-disable flags instead of falling through to no thinking field at all.+ model_lc = model.strip().lower()for spec in _ANTHROPIC_THINKING_SPECS:- if model.startswith(spec.prefixes):+ if any(_anthropic_spec_prefix_matches(model_lc, p) for p in spec.prefixes):return specreturn None+# A Claude id the spec table does not list yet takes adaptive thinking only when it is numbered after 4.6.+def _anthropic_model_newer_than_specs(model: str) -> bool:+ match = _ANTHROPIC_MODEL_VERSION.match(model.strip().lower())+ if match is None:+ return False+ major, minor = int(match.group("major")), int(match.group("minor") or 0)+ return major >= 5 or (major == 4 and minor >= 6)++# Anthropic ships date-pinned tool versions per model family: the newer `_20260209`/`_20260120` variants only run on# recent models (400 "tool not supported" elsewhere), and old versions on a new model miss dynamic filtering and# free-with-search pricing. Pick the newest combo the model accepts, else the GA `_20250305`/`_20250910`/`_20250825`@@ -611,7 +651,20 @@ _MISTRAL_THINKING_SPECS = (style = "prompt_mode",),_MistralThinkingSpec(- models = ("mistral-small-latest", "mistral-vibe-cli-latest"),+ # Every id the catalog marks reasoning-capable with an effort list, so the composer's+ # Thinking control and this allowlist cannot disagree and render a dead control. The+ # catalog's own ladders are clamped to Mistral's documented pair before they reach the UI,+ # so nothing here can send a third value. zai-glm-5-2 is a partner model in models.dev's+ # mistral bucket rather than a Mistral release, hence the separate line.+ models = (+ "mistral-small-latest",+ "mistral-small-2603",+ "mistral-medium-latest",+ "mistral-medium-2604",+ "mistral-medium-3-5",+ "mistral-vibe-cli-latest",+ "zai-glm-5-2",+ ),style = "reasoning_effort",efforts = ("none", "high"),),@@ -643,8 +696,8 @@ def _apply_mistral_reasoning_controls() -> None:"""Translate generic reasoning controls into Mistral's model-specific shape:magistral-medium-latest takes baseline or `prompt_mode="reasoning"`; mistral-small-latest /- mistral-vibe-cli-latest take `reasoning_effort` in {"none", "high"}; all other tested Mistral- models take no reasoning params."""+ mistral-vibe-cli-latest / mistral-medium-3-5 take `reasoning_effort` in {"none", "high"}; all+ other tested Mistral models take no reasoning params."""model_for_matching = model.rsplit("/", 1)[-1].strip().lower()spec = _mistral_thinking_spec(model_for_matching)body.pop("prompt_mode", None)@@ -658,12 +711,59 @@ def _apply_mistral_reasoning_controls(returnif spec.style == "reasoning_effort":+ # Two documented values, so the intermediate levels of the shared UI scale collapse to+ # "high"; only an explicit opt-out sends "none".if reasoning_effort in spec.efforts:body["reasoning_effort"] = reasoning_effort+ elif reasoning_effort in _REASONING_EFFORT_LEVELS or enable_thinking is True:+ body["reasoning_effort"] = "high"elif enable_thinking is False:body["reasoning_effort"] = "none"- elif enable_thinking is True:- body["reasoning_effort"] = "high"+ return++ # Nothing for the rest: mistral-large, codestral and the older mistral-medium releases are not+ # in Mistral's reasoning docs and reject the parameter, so an effort the caller sent for a model+ # the catalog got wrong must be dropped here rather than forwarded.+++_REASONING_EFFORT_LEVELS = frozenset({"minimal", "low", "medium", "high", "xhigh", "max"})+_DEEPSEEK_EFFORT_ALIASES = {"minimal": "low", "medium": "high", "xhigh": "high"}+_LOCAL_SERVER_EFFORT_ALIASES = {"minimal": "low", "xhigh": "high", "max": "high"}+++def _apply_deepseek_reasoning_controls(+ body: dict[str, Any], enable_thinking: Optional[bool], reasoning_effort: Optional[str]+) -> None:+ effort = (reasoning_effort or "").strip().lower()+ if effort == "none" or (not effort and enable_thinking is False):+ body["thinking"] = {"type": "disabled"}+ return+ if effort in _REASONING_EFFORT_LEVELS:+ body["thinking"] = {"type": "enabled"}+ body["reasoning_effort"] = _DEEPSEEK_EFFORT_ALIASES.get(effort, effort)+ return+ if enable_thinking is True:+ body["thinking"] = {"type": "enabled"}+++def _apply_qwen_reasoning_controls(body: dict[str, Any], enable_thinking: Optional[bool]) -> None:+ if enable_thinking is not None:+ body["enable_thinking"] = bool(enable_thinking)+++def _apply_passthrough_reasoning_effort(+ body: dict[str, Any],+ enable_thinking: Optional[bool],+ reasoning_effort: Optional[str],+ aliases: dict[str, str] | None = None,+) -> None:+ effort = (reasoning_effort or "").strip().lower()+ if aliases:+ effort = aliases.get(effort, effort)+ if effort == "none" or (not effort and enable_thinking is False):+ body["reasoning_effort"] = "none"+ elif effort in _REASONING_EFFORT_LEVELS:+ body["reasoning_effort"] = effort# ollama's openai-compatible /v1/chat/completions accepts these five values.@@ -1284,14 +1384,28 @@ class ExternalProviderClient:body["thinking"] = {"type": "disabled"}elif self.provider_type == "mistral":_apply_mistral_reasoning_controls(body, model, enable_thinking, reasoning_effort)- elif provider_info.get("supports_chat_template_kwargs") and enable_thinking is not None:+ elif self.provider_type == "deepseek":+ _apply_deepseek_reasoning_controls(body, enable_thinking, reasoning_effort)+ elif self.provider_type == "qwen":+ _apply_qwen_reasoning_controls(body, enable_thinking)+ elif self.provider_type == "huggingface":+ _apply_passthrough_reasoning_effort(body, enable_thinking, reasoning_effort)+ elif provider_info.get("supports_chat_template_kwargs"):# chat_template_kwargs is the only route to a template's enable_thinking variable, and a strict gateway- # 400s on the unknown key, so it is opt-in per registry entry rather than by provider family.- tpl_kw = body.get("chat_template_kwargs")- if not isinstance(tpl_kw, dict):- tpl_kw = {}- tpl_kw["enable_thinking"] = bool(enable_thinking)- body["chat_template_kwargs"] = tpl_kw+ # 400s on the unknown key, so it is opt-in per registry entry rather than by provider family. Off rides on+ # that kwarg alone: vLLM through 0.16 types the top-level reasoning_effort as low | medium | high and 400s+ # on "none".+ effort = (reasoning_effort or "").strip().lower()+ effort = _LOCAL_SERVER_EFFORT_ALIASES.get(effort, effort)+ thinking = False if effort == "none" else enable_thinking+ if thinking is not None:+ tpl_kw = body.get("chat_template_kwargs")+ if not isinstance(tpl_kw, dict):+ tpl_kw = {}+ tpl_kw["enable_thinking"] = bool(thinking)+ body["chat_template_kwargs"] = tpl_kw+ if effort in ("low", "medium", "high"):+ body["reasoning_effort"] = effortelif self.provider_type == "ollama":_apply_ollama_reasoning_controls(body, enable_thinking, reasoning_effort)@@ -2253,12 +2367,16 @@ class ExternalProviderClient:last_msg["content"] = headthinking_spec = _anthropic_thinking_spec(model)allowed_efforts = (- thinking_spec.efforts if thinking_spec else ("none", "low", "medium", "high")+ thinking_spec.efforts+ if thinking_spec+ else ("none", "low", "medium", "high", "xhigh", "max"))effort = reasoning_effort if reasoning_effort in allowed_efforts else None# Claude 4.6 takes top-tier adaptive effort as "max" only ("xhigh" is 4.7-only), so map "xhigh" -> "max" for# 4.6 outbound requests.- if effort == "xhigh" and model.startswith(("claude-opus-4-6", "claude-sonnet-4-6")):+ if effort == "xhigh" and model.strip().lower().startswith(+ ("claude-opus-4-6", "claude-sonnet-4-6")+ ):effort = "max"if effort is None:if enable_thinking is False:@@ -2284,9 +2402,13 @@ class ExternalProviderClient:if not sampling_removed:body["temperature"] = 1body.pop("top_p", None)- if thinking_spec and thinking_spec.kind == "adaptive":+ adaptive = (thinking_spec is not None and thinking_spec.kind == "adaptive") or (+ thinking_spec is None and _anthropic_model_newer_than_specs(model)+ )+ if adaptive:# Force display="summarized": it defaults to "omitted" on Opus 4.7, which emits an empty thinking- # block and leaves the panel blank. Harmless no-op on 4.6.+ # block and leaves the panel blank. Harmless no-op on 4.6. An unlisted id older than that gets no+ # thinking field, since Claude 4.5 and earlier reject the adaptive shape.body["thinking"] = {"type": "adaptive", "display": "summarized"}# Adaptive effort lives under `output_config.effort`, not top-level (top-level 400s "Extra inputs are# not permitted"). Allowed: low|medium|high|xhigh|max.@@ -3753,7 +3875,15 @@ class ExternalProviderClient:model_lc == p or model_lc.startswith(p + "-") for p in _PRO_THINKING_PREFIXES)effort_lc = (reasoning_effort or "").strip().lower()- if not is_image_model_strict and is_gemini3_thinking:+ is_gemma_thinking = bool(re.match(r"^gemma-(?:[4-9]|\d{2,})(?:\.\d+)?-", model_lc))+ if not is_image_model_strict and is_gemma_thinking:+ # Gemma 4 on the Gemini API is on/off only, as thinkingLevel "high" or "minimal"; it takes no budget.+ # https://ai.google.dev/gemma/docs/core/gemma_on_gemini_api+ if effort_lc in ("none", "off") or enable_thinking is False:+ gen_config["thinkingConfig"] = {"thinkingLevel": "minimal"}+ elif effort_lc or enable_thinking is True:+ gen_config["thinkingConfig"] = {"thinkingLevel": "high"}+ elif not is_image_model_strict and is_gemini3_thinking:# Gemini 3.x thinkingLevel matrix: 3.1+ Pro low/medium/high; 3 Pro low/high (deprecated 2026-03-09); 3.x# Flash* minimal/low/medium/high. Coerce minimal->low on Pro, medium->high on legacy 3-Pro._G3_LEVELS = {"minimal", "low", "medium", "high"}diff --git a/studio/backend/core/inference/provider_model_capabilities.py b/studio/backend/core/inference/provider_model_capabilities.pyindex 31bee006a48..9932251f3ca 100644--- a/studio/backend/core/inference/provider_model_capabilities.py+++ b/studio/backend/core/inference/provider_model_capabilities.py@@ -75,3 +75,57 @@ def provider_model_capabilities(return []mapped = (openrouter_model_capabilities(m) for m in models if isinstance(m, dict))return [entry for entry in mapped if entry is not None]+++MODELS_DEV_URL = "https://models.dev/api.json"++MODELS_DEV_PROVIDER_MAP = {+ "openai": "openai",+ "anthropic": "anthropic",+ "openrouter": "openrouter",+ "google": "gemini",+ "mistral": "mistral",+ "deepseek": "deepseek",+ "moonshotai": "kimi",+ "cohere": "cohere",+ "huggingface": "huggingface",+ "alibaba": "qwen",+ "ollama-cloud": "ollama",+ "lmstudio": "lmstudio",+}+++def _trim_models_dev_model(model: dict[str, Any]) -> dict[str, Any]:+ entry: dict[str, Any] = {}+ if model.get("reasoning") is True:+ entry["reasoning"] = True+ options = model.get("reasoning_options")+ options = options if isinstance(options, list) else []+ for option in options:+ if not isinstance(option, dict):+ continue+ if option.get("type") == "effort":+ efforts = _sorted_efforts(option.get("values"))+ if efforts:+ entry["efforts"] = efforts+ elif option.get("type") == "toggle":+ entry["toggle"] = True+ modalities = model.get("modalities")+ inputs = modalities.get("input") if isinstance(modalities, dict) else None+ if isinstance(inputs, list) and inputs:+ entry["input"] = [m for m in inputs if isinstance(m, str)]+ return entry+++def trim_models_dev_catalog(raw: dict[str, Any]) -> dict[str, dict[str, dict[str, Any]]]:+ catalog: dict[str, dict[str, dict[str, Any]]] = {}+ for source, provider_type in MODELS_DEV_PROVIDER_MAP.items():+ provider = raw.get(source)+ models = provider.get("models") if isinstance(provider, dict) else None+ if not isinstance(models, dict):+ continue+ bucket = catalog.setdefault(provider_type, {})+ for model_id, model in models.items():+ if isinstance(model_id, str) and model_id.strip() and isinstance(model, dict):+ bucket[model_id.strip().lower()] = _trim_models_dev_model(model)+ return catalogdiff --git a/studio/backend/core/inference/providers.py b/studio/backend/core/inference/providers.pyindex e0aaa2dc2a4..f36eafa3ae7 100644--- a/studio/backend/core/inference/providers.py+++ b/studio/backend/core/inference/providers.py@@ -207,8 +207,8 @@ PROVIDER_REGISTRY: dict[str, dict[str, Any]] = {"display_name": "DeepSeek","base_url": "https://api.deepseek.com/v1","default_models": [- "deepseek-chat",- "deepseek-reasoner",+ "deepseek-flash",+ "deepseek-v4-pro",],"supports_streaming": True,"supports_vision": False,@@ -216,7 +216,7 @@ PROVIDER_REGISTRY: dict[str, dict[str, Any]] = {"studio_tools": True,"auth_header": "Authorization","auth_prefix": "Bearer ",- "notes": "OpenAI-compatible API. deepseek-chat = V3, deepseek-reasoner = R1 thinking mode.",+ "notes": "OpenAI-compatible API. deepseek-flash and deepseek-v4-pro take thinking on/off plus reasoning_effort low/high/max.",},"mistral": {"display_name": "Mistral AI",diff --git a/studio/backend/core/research_runs.py b/studio/backend/core/research_runs.pyindex 80753834ac9..c53c6765e20 100644--- a/studio/backend/core/research_runs.py+++ b/studio/backend/core/research_runs.py@@ -1658,6 +1658,21 @@ class ResearchSupervisor:)if inference.get("topP") is not None:payload["top_p"] = inference["topP"]+ if inference.get("providerType") in ("deepseek", "huggingface", "qwen", "mistral"):+ # These providers forward reasoning fields verbatim, and a strict upstream rejects one the model lacks.+ # Mistral documents reasoning_effort for mistral-small-latest and mistral-medium-3-5 only, so the+ # planner opt-out must not reach mistral-large and the other non-reasoning models.+ # `is not True`, not `is False`: a run from before these flags carries neither, and a+ # thinking planner call on a resumed run beats a request the model rejects.+ if inference.get("supportsReasoning") is not True:+ enable_thinking = None+ inference = {+ key: value+ for key, value in inference.items()+ if key not in ("enableThinking", "reasoningEffort")+ }+ elif enable_thinking is False and inference.get("supportsReasoningOff") is False:+ enable_thinking = Noneif enable_thinking is not None:payload["enable_thinking"] = enable_thinkingelif inference.get("enableThinking") is not None:diff --git a/studio/backend/models/providers.py b/studio/backend/models/providers.pyindex dc512c69251..446560cb4b2 100644--- a/studio/backend/models/providers.py+++ b/studio/backend/models/providers.py@@ -171,6 +171,11 @@ class ProviderModelCapabilityInfo(BaseModel):supported_parameters: Optional[list[str]] = None+class ModelCatalogResponse(BaseModel):+ fetched_at: float+ providers: dict[str, dict[str, dict]]++class ProviderModelsRequest(BaseModel):"""Request to list models from an external provider."""diff --git a/studio/backend/routes/providers.py b/studio/backend/routes/providers.pyindex fba6a079050..aa7e4114dab 100644--- a/studio/backend/routes/providers.py+++ b/studio/backend/routes/providers.py@@ -6,6 +6,7 @@ configurations and their API keys, the RSA public key used to encrypt those keyslisting."""+import jsonimport timeimport uuidfrom typing import Optional@@ -41,9 +42,12 @@ from core.inference.external_provider import ExternalProviderClientfrom core.inference import openai_codex_auth, openai_codex_clientfrom core.inference.provider_model_capabilities import (MODEL_CAPABILITY_PROVIDERS,+ MODELS_DEV_URL,provider_model_capabilities,+ trim_models_dev_catalog,)from models.providers import (+ ModelCatalogResponse,ProviderCreate,ProviderCredentialMigration,ProviderModelsRequest,@@ -57,6 +61,7 @@ from models.providers import ()from storage import credential_secrets, providers_dbfrom hub.services.models import account_access+from utils.paths.storage_roots import cache_rootfrom utils.utils import safe_curated_detail, log_and_http_errorlogger = structlog.get_logger(__name__)@@ -741,6 +746,67 @@ _MODEL_CAPABILITY_CACHE_TTL_SECONDS = 3600.0_model_capability_cache: dict[str, tuple[float, list[dict]]] = {}+_MODEL_CATALOG_TTL_SECONDS = 24 * 3600.0+_model_catalog_cache: dict | None = None+++def _model_catalog_cache_path():+ return cache_root() / "model_catalog.json"+++def _read_model_catalog_file() -> dict | None:+ try:+ data = json.loads(_model_catalog_cache_path().read_text(encoding = "utf-8"))+ except (OSError, ValueError):+ return None+ if (+ isinstance(data, dict)+ and isinstance(data.get("providers"), dict)+ and isinstance(data.get("fetched_at"), (int, float))+ ):+ return data+ return None+++def _write_model_catalog_file(data: dict) -> None:+ try:+ path = _model_catalog_cache_path()+ path.parent.mkdir(parents = True, exist_ok = True)+ path.write_text(json.dumps(data), encoding = "utf-8")+ except OSError as exc:+ logger.warning("providers.model_catalog_cache_write_failed", error = str(exc))+++async def _fetch_models_dev_catalog() -> dict:+ from core.inference.external_provider import _client++ response = await _client().get(MODELS_DEV_URL, timeout = 20.0)+ response.raise_for_status()+ return {"fetched_at": time.time(), "providers": trim_models_dev_catalog(response.json())}++[email protected]("/model-catalog", response_model = ModelCatalogResponse)+async def get_model_catalog(_current_subject: str = Depends(get_current_subject)):+ global _model_catalog_cache+ cached = _model_catalog_cache or _read_model_catalog_file()+ if cached is not None and time.time() - cached["fetched_at"] < _MODEL_CATALOG_TTL_SECONDS:+ _model_catalog_cache = cached+ return cached+ try:+ fresh = await _fetch_models_dev_catalog()+ except Exception as exc:+ logger.warning("providers.model_catalog_refresh_failed", error = str(exc))+ if cached is not None:+ _model_catalog_cache = cached+ return cached+ raise HTTPException(+ status_code = 503, detail = "The model catalog is unavailable offline."+ ) from None+ _model_catalog_cache = fresh+ _write_model_catalog_file(fresh)+ return fresh++@router.post("/model-capabilities", response_model = list[ProviderModelCapabilityInfo])async def list_provider_model_capabilities(payload: ProviderModelsRequest,diff --git a/studio/backend/routes/research_runs.py b/studio/backend/routes/research_runs.pyindex ebc1a3c988e..68515556f02 100644--- a/studio/backend/routes/research_runs.py+++ b/studio/backend/routes/research_runs.py@@ -222,6 +222,8 @@ def _sanitize_config("maxOutputTokensPublished","enableThinking","reasoningEffort",+ "supportsReasoning",+ "supportsReasoningOff",}unknown = set(request) - allowedif unknown:@@ -297,6 +299,9 @@ def _sanitize_config(request["maxOutputTokensFromSavedCap"], bool):raise ValueError+ for flag in ("supportsReasoning", "supportsReasoningOff"):+ if flag in request and not isinstance(request[flag], bool):+ raise ValueErrorif "maxOutputTokensPublished" in request:published = request["maxOutputTokensPublished"]if isinstance(published, bool) or not isinstance(published, int):diff --git a/studio/backend/tests/test_provider_model_capabilities.py b/studio/backend/tests/test_provider_model_capabilities.pyindex 129d675a909..a9de3483f9a 100644--- a/studio/backend/tests/test_provider_model_capabilities.py+++ b/studio/backend/tests/test_provider_model_capabilities.py@@ -254,3 +254,116 @@ def test_null_efforts_accept_the_full_scale_while_omitted_efforts_remain_toggle_]toggle = openrouter_model_capabilities({"id": "acme/reasoning", "reasoning": {}})assert toggle["reasoning"]["supported_efforts"] is None+++_RAW_MODELS_DEV = {+ "openrouter": {+ "models": {+ "DeepSeek/DeepSeek-V4-Pro": {+ "reasoning": True,+ "reasoning_options": [+ {"type": "toggle"},+ {"type": "effort", "values": ["xhigh", "high", "turbo"]},+ ],+ "modalities": {"input": ["text"]},+ },+ "openai/gpt-4o": {"reasoning": False, "modalities": {"input": ["text", "image"]}},+ }+ },+ "google": {+ "models": {+ "gemini-9-flash": {+ "reasoning": True,+ "reasoning_options": [],+ "modalities": {"input": ["text", "image"]},+ }+ }+ },+ "unrelated": {"models": {"x": {"reasoning": True}}},+}+++def test_models_dev_catalog_is_trimmed_and_remapped():+ from core.inference.provider_model_capabilities import trim_models_dev_catalog++ catalog = trim_models_dev_catalog(_RAW_MODELS_DEV)+ assert set(catalog) == {"openrouter", "gemini"}+ assert catalog["openrouter"]["deepseek/deepseek-v4-pro"] == {+ "reasoning": True,+ "toggle": True,+ "efforts": ["high", "xhigh"],+ "input": ["text"],+ }+ assert catalog["openrouter"]["openai/gpt-4o"] == {"input": ["text", "image"]}+ assert catalog["gemini"]["gemini-9-flash"] == {"reasoning": True, "input": ["text", "image"]}+++class _FakeCatalogClient:+ calls = 0+ fail = False++ async def get(+ self,+ url,+ timeout = None,+ ):+ type(self).calls += 1+ if type(self).fail:+ raise RuntimeError("models.dev down")++ class _Resp:+ def raise_for_status(self):+ pass++ def json(self):+ return _RAW_MODELS_DEV++ return _Resp()+++def catalog_route(monkeypatch, tmp_path):+ from core.inference import external_provider as ep++ providers_route._model_catalog_cache = None+ _FakeCatalogClient.calls = 0+ _FakeCatalogClient.fail = False+ monkeypatch.setattr(ep, "_client", lambda: _FakeCatalogClient())+ monkeypatch.setattr(providers_route, "cache_root", lambda: tmp_path)++ def call():+ return asyncio.run(providers_route.get_model_catalog(_current_subject = "tester"))++ yield call+ providers_route._model_catalog_cache = None+++def test_model_catalog_route_fetches_once_and_persists_to_disk(+ capability_route, catalog_route, tmp_path+):+ first = catalog_route()+ assert first["providers"]["openrouter"]["deepseek/deepseek-v4-pro"]["efforts"] == [+ "high",+ "xhigh",+ ]+ assert (tmp_path / "model_catalog.json").exists()+ assert catalog_route() == first+ assert _FakeCatalogClient.calls == 1+++def test_model_catalog_route_serves_the_disk_copy_when_models_dev_is_down(catalog_route, tmp_path):+ first = catalog_route()+ providers_route._model_catalog_cache = None+ stale = dict(first, fetched_at = first["fetched_at"] - 10 * 24 * 3600)+ (tmp_path / "model_catalog.json").write_text(json.dumps(stale))+ _FakeCatalogClient.fail = True+ served = catalog_route()+ assert served["providers"] == first["providers"]+ assert served["fetched_at"] == stale["fetched_at"]+++def test_model_catalog_route_answers_503_offline_with_nothing_cached(catalog_route):+ _FakeCatalogClient.fail = True+ with pytest.raises(Exception) as excinfo:+ catalog_route()+ assert getattr(excinfo.value, "status_code", None) == 503diff --git a/studio/backend/tests/test_provider_reasoning_wire.py b/studio/backend/tests/test_provider_reasoning_wire.pynew file mode 100644index 00000000000..c632f58c556--- /dev/null+++ b/studio/backend/tests/test_provider_reasoning_wire.py@@ -0,0 +1,364 @@+# SPDX-License-Identifier: AGPL-3.0-only+# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++from __future__ import annotations++import asyncio+import json+import re+from pathlib import Path++import httpx+import pytest++from core.inference import external_provider as ep_mod+from core.inference.external_provider import ExternalProviderClient++_OPENAI_SSE = 'data: {"choices":[{"index":0,"delta":{"content":"ok"}}]}\n\ndata: [DONE]\n\n'+_GEMINI_SSE = (+ 'data: {"candidates":[{"content":{"parts":[{"text":"ok"}],"role":"model"},"finishReason":"STOP"}],'+ '"usageMetadata":{"promptTokenCount":1,"candidatesTokenCount":1}}\n\n'+)+_ANTHROPIC_SSE = 'event: message_stop\ndata: {"type": "message_stop"}\n\n'++_BASE_URLS = {+ "gemini": "https://generativelanguage.googleapis.com/v1beta",+ "anthropic": "https://api.anthropic.com/v1",+}+_SSE = {"gemini": _GEMINI_SSE, "anthropic": _ANTHROPIC_SSE}+++def _body(provider_type: str, model: str, **kwargs) -> dict:+ captured: dict = {}++ def handler(request: httpx.Request) -> httpx.Response:+ captured["body"] = json.loads(request.content.decode())+ return httpx.Response(+ 200,+ content = _SSE.get(provider_type, _OPENAI_SSE),+ headers = {"content-type": "text/event-stream"},+ )++ mock_client = httpx.AsyncClient(transport = httpx.MockTransport(handler))+ client = ExternalProviderClient(+ provider_type = provider_type,+ base_url = _BASE_URLS.get(provider_type, "http://127.0.0.1:8000/v1"),+ api_key = "test-key",+ )++ async def run() -> None:+ try:+ async for _ in client.stream_chat_completion(+ messages = [{"role": "user", "content": "hi"}],+ model = model,+ **kwargs,+ ):+ pass+ finally:+ await client.close()+ await mock_client.aclose()++ loop = asyncio.new_event_loop()+ previous = ep_mod._http_client+ ep_mod._http_client = mock_client+ try:+ loop.run_until_complete(run())+ finally:+ ep_mod._http_client = previous+ loop.run_until_complete(loop.shutdown_asyncgens())+ loop.close()+ return captured["body"]+++ "effort,expected",+ [+ ("low", "low"),+ ("high", "high"),+ ("max", "max"),+ ("minimal", "low"),+ ("medium", "high"),+ ("xhigh", "high"),+ ],+)+def test_deepseek_effort_is_forwarded_with_thinking_enabled(effort, expected):+ body = _body("deepseek", "deepseek-v4-flash", reasoning_effort = effort, enable_thinking = True)+ assert body["thinking"] == {"type": "enabled"}+ assert body["reasoning_effort"] == expected+++def test_deepseek_off_disables_thinking():+ body = _body("deepseek", "deepseek-v4-flash", reasoning_effort = "none", enable_thinking = False)+ assert body["thinking"] == {"type": "disabled"}+ assert "reasoning_effort" not in body+ body = _body("deepseek", "deepseek-v4-flash", enable_thinking = False)+ assert body["thinking"] == {"type": "disabled"}+++def test_deepseek_bare_toggle_and_silence():+ assert _body("deepseek", "deepseek-v4-flash", enable_thinking = True)["thinking"] == {+ "type": "enabled"+ }+ body = _body("deepseek", "deepseek-chat")+ assert "thinking" not in body and "reasoning_effort" not in body+++def test_qwen_toggle_is_a_top_level_enable_thinking():+ assert _body("qwen", "qwen3.5-plus", enable_thinking = True)["enable_thinking"] is True+ assert _body("qwen", "qwen3.5-plus", enable_thinking = False)["enable_thinking"] is False+ body = _body("qwen", "qwen3.5-plus", reasoning_effort = "high")+ assert "reasoning_effort" not in body and "enable_thinking" not in body++[email protected]("effort", ["minimal", "low", "medium", "high", "xhigh", "max"])+def test_huggingface_router_takes_the_effort_verbatim(effort):+ assert (+ _body("huggingface", "openai/gpt-oss-120b", reasoning_effort = effort)["reasoning_effort"]+ == effort+ )+++def test_huggingface_off_and_silence():+ assert (+ _body("huggingface", "openai/gpt-oss-120b", enable_thinking = False)["reasoning_effort"]+ == "none"+ )+ assert (+ _body("huggingface", "openai/gpt-oss-120b", reasoning_effort = "none")["reasoning_effort"]+ == "none"+ )+ assert "reasoning_effort" not in _body(+ "huggingface", "openai/gpt-oss-120b", enable_thinking = True+ )++[email protected]("provider_type", ["vllm", "llama_cpp"])+def test_local_servers_get_template_toggle_and_effort(provider_type):+ body = _body(+ provider_type, "openai/gpt-oss-20b", reasoning_effort = "xhigh", enable_thinking = True+ )+ assert body["chat_template_kwargs"] == {"enable_thinking": True}+ assert body["reasoning_effort"] == "high"+ body = _body(provider_type, "Qwen/Qwen3-14B", enable_thinking = False)+ assert body["chat_template_kwargs"] == {"enable_thinking": False}+ # vLLM through 0.16 types reasoning_effort as low | medium | high, so off never goes top-level.+ assert "reasoning_effort" not in body+ body = _body(provider_type, "Qwen/Qwen3-14B", reasoning_effort = "none")+ assert body["chat_template_kwargs"] == {"enable_thinking": False}+ assert "reasoning_effort" not in body+ body = _body(provider_type, "Qwen/Qwen3-14B", reasoning_effort = "medium")+ assert body["reasoning_effort"] == "medium"+ assert "chat_template_kwargs" not in body+++def test_custom_gateway_still_receives_nothing():+ body = _body("custom", "some-model", reasoning_effort = "high", enable_thinking = True)+ assert (+ "reasoning_effort" not in body+ and "chat_template_kwargs" not in body+ and "thinking" not in body+ )+++def test_mistral_medium_3_5_takes_the_documented_two_value_form():+ assert (+ _body("mistral", "mistral-medium-3-5", reasoning_effort = "medium")["reasoning_effort"]+ == "high"+ )+ assert (+ _body("mistral", "mistral-medium-3-5", enable_thinking = True)["reasoning_effort"] == "high"+ )+ assert (+ _body("mistral", "mistral-medium-3-5", reasoning_effort = "none")["reasoning_effort"]+ == "none"+ )+ assert (+ _body("mistral", "mistral-medium-3-5", enable_thinking = False)["reasoning_effort"] == "none"+ )+ assert "reasoning_effort" not in _body("mistral", "mistral-large-latest")+++def test_mistral_known_specs_are_unchanged():+ assert (+ _body("mistral", "magistral-medium-latest", reasoning_effort = "high")["prompt_mode"]+ == "reasoning"+ )+ assert (+ _body("mistral", "mistral-small-latest", reasoning_effort = "high")["reasoning_effort"]+ == "high"+ )+++def test_gemini_families_past_three_use_thinking_level():+ body = _body(+ "gemini",+ "gemini-4.1-flash",+ reasoning_effort = "medium",+ temperature = 0.7,+ top_p = 0.95,+ max_tokens = 64,+ )+ assert body["generationConfig"]["thinkingConfig"] == {"thinkingLevel": "medium"}+ body = _body(+ "gemini",+ "gemini-4-pro",+ reasoning_effort = "minimal",+ temperature = 0.7,+ top_p = 0.95,+ max_tokens = 64,+ )+ assert body["generationConfig"]["thinkingConfig"] == {"thinkingLevel": "low"}+ body = _body(+ "gemini",+ "gemini-2.5-flash",+ reasoning_effort = "none",+ temperature = 0.7,+ top_p = 0.95,+ max_tokens = 64,+ )+ assert body["generationConfig"]["thinkingConfig"] == {"thinkingBudget": 0}+++def test_anthropic_models_outside_the_spec_take_the_adaptive_shape():+ body = _body(+ "anthropic",+ "claude-opus-6",+ reasoning_effort = "xhigh",+ temperature = 0.7,+ top_p = 0.95,+ max_tokens = 4096,+ )+ assert body["thinking"] == {"type": "adaptive", "display": "summarized"}+ assert body["output_config"] == {"effort": "xhigh"}+ body = _body(+ "anthropic",+ "claude-opus-6",+ reasoning_effort = "none",+ temperature = 0.7,+ top_p = 0.95,+ max_tokens = 4096,+ )+ assert "output_config" not in body and "thinking" not in body+++def test_gemma_on_gemini_toggles_with_thinking_level_not_budget():+ sampling = {"temperature": 0.7, "top_p": 0.95, "max_tokens": 64}+ body = _body("gemini", "gemma-4-31b-it", enable_thinking = True, **sampling)+ assert body["generationConfig"]["thinkingConfig"] == {"thinkingLevel": "high"}+ body = _body("gemini", "gemma-4-26b-a4b-it", enable_thinking = False, **sampling)+ assert body["generationConfig"]["thinkingConfig"] == {"thinkingLevel": "minimal"}+ body = _body("gemini", "gemma-4-31b-it", **sampling)+ assert "thinkingConfig" not in body.get("generationConfig", {})+++# Wire proof for older Claude models, run against a mocked Anthropic stream rather than the live API. Anthropic documents+# adaptive thinking as a 400 on Claude 4.5 and earlier, and budget_tokens as the only thinking mode there:+# https://platform.claude.com/docs/en/build-with-claude/extended-thinking+ "model,effort,budget",+ [+ ("claude-sonnet-4-20250514", "high", 4096),+ ("claude-opus-4-1-20250805", "low", 1024),+ ("claude-3-7-sonnet-20250219", "medium", 2048),+ ],+)+def test_earlier_claude_thinking_models_keep_budget_tokens(model, effort, budget):+ body = _body(+ "anthropic", model, reasoning_effort = effort, temperature = 0.7, top_p = 0.95, max_tokens = 8192+ )+ assert body["thinking"] == {"type": "enabled", "budget_tokens": budget}+ assert "output_config" not in body+++ "model", ["claude-3-5-haiku-20241022", "claude-3-5-sonnet-20241022", "claude-3-opus-20240229"]+)+def test_claude_models_without_extended_thinking_stream_without_a_thinking_field(model):+ sampling = {"temperature": 0.7, "top_p": 0.95, "max_tokens": 4096}+ body = _body("anthropic", model, reasoning_effort = "high", **sampling)+ assert "thinking" not in body and "output_config" not in body+ body = _body("anthropic", model, **sampling)+ assert "thinking" not in body and "output_config" not in body++[email protected]("model", ["claude-opus-4-10-20260901", "claude-opus-4-15-20260901"])+def test_a_two_digit_claude_minor_is_not_read_as_the_4_1_spec(model):+ """`claude-opus-4-1` is a prefix of `claude-opus-4-15`, so an unbounded match sent a model+ numbered after 4.6 the manual budget shape and dropped xhigh/max."""+ body = _body("anthropic", model, reasoning_effort = "xhigh", max_tokens = 8192)+ assert body["thinking"] == {"type": "adaptive", "display": "summarized"}+ assert body["output_config"] == {"effort": "xhigh"}+++def test_a_capitalized_claude_id_keeps_its_thinking_spec():+ """Model ids reach us as typed in a custom model field; the version helpers lowercase, so the+ spec lookup must too or the id silently loses extended thinking."""+ body = _body("anthropic", "Claude-Opus-4-1-20250805", reasoning_effort = "low", max_tokens = 8192)+ assert body["thinking"] == {"type": "enabled", "budget_tokens": 1024}++[email protected]("model", ["claude-opus-4-6", "Claude-Opus-4-6", "CLAUDE-SONNET-4-6"])+def test_the_4_6_xhigh_remap_reads_the_id_the_same_way_the_spec_lookup_does(model):+ """4.6 spells the top adaptive tier `max`; the spec lookup lowercases, so a capitalized id was+ allowed `xhigh` and then missed the remap that turns it into `max`."""+ body = _body("anthropic", model, reasoning_effort = "xhigh", max_tokens = 8192)+ assert body["output_config"] == {"effort": "max"}+++# Mistral documents reasoning_effort for mistral-small-latest and mistral-medium-3-5 only, with+# values "high" and "none": https://docs.mistral.ai/capabilities/reasoning/+# mistral-large, codestral and the older mistral-medium releases are absent from that page and+# reject the parameter, so no caller-supplied effort may reach them.+ "model", ["mistral-large-latest", "codestral-latest", "mistral-medium-2505"]+)+ "controls",+ [+ {"reasoning_effort": "none"},+ {"reasoning_effort": "high"},+ {"reasoning_effort": "medium"},+ {"enable_thinking": True},+ {"enable_thinking": False},+ {"enable_thinking": False, "reasoning_effort": "none"},+ ],+)+def test_a_mistral_model_outside_the_reasoning_docs_gets_no_effort_whatever_the_caller_sends(+ model, controls+):+ assert "reasoning_effort" not in _body("mistral", model, **controls)+++def _snapshot_reasoning_models(provider_type: str) -> dict[str, list[str]]:+ """The ids the committed frontend snapshot marks reasoning-capable, with their effort lists.++ Read out of the TypeScript rather than a fixture: the point is to catch the real file drifting+ away from the wire allowlist, which a copy could not do."""+ path = (+ Path(__file__).resolve().parents[2] / "frontend/src/features/chat/model-catalog-snapshot.ts"+ )+ text = path.read_text(encoding = "utf-8")+ start = text.index(f'"{provider_type}": {{')+ bucket = text[start : text.index("\n },", start)]+ found: dict[str, list[str]] = {}+ for model_id, entry in re.findall(r'"([^"]+)":\s*(\{.*\})', bucket):+ parsed = json.loads(entry)+ if parsed.get("reasoning") and parsed.get("efforts"):+ found[model_id] = parsed["efforts"]+ return found+++def test_every_mistral_model_the_snapshot_gives_an_effort_ladder_is_on_the_wire_allowlist():+ """The composer offers a Thinking control whenever the catalog says the model reasons, so an id+ the catalog lists but the wire drops renders a control that silently does nothing."""+ snapshot = _snapshot_reasoning_models("mistral")+ assert (+ snapshot+ ), "the snapshot's mistral bucket has no reasoning entries, so this proves nothing"+ for model, efforts in sorted(snapshot.items()):+ spec = ep_mod._mistral_thinking_spec(model)+ assert spec.style == "reasoning_effort", f"{model} is offered a ladder but sends nothing"+ # The frontend clamps a catalog ladder to CATALOG_REASONING_WIRE.mistral before it renders,+ # so only the values in both sets can ever be selected; those are the ones that must arrive.+ for effort in set(efforts) & set(spec.efforts):+ assert _body("mistral", model, reasoning_effort = effort)["reasoning_effort"] == effortdiff --git a/studio/backend/tests/test_research_runs_hardening.py b/studio/backend/tests/test_research_runs_hardening.pyindex 892dc6ced50..a536c26af4f 100644--- a/studio/backend/tests/test_research_runs_hardening.py+++ b/studio/backend/tests/test_research_runs_hardening.py@@ -3641,3 +3641,14 @@ def test_restoring_many_code_spans_stays_linear():elapsed = time.perf_counter() - startassert restored == "x" * 200_000 + "".join(placeholders.values())assert elapsed < 2.0, f"restoration took {elapsed:.1f}s for 2000 spans in a 200KB report"+++def test_sanitize_config_keeps_the_reasoning_support_flags():+ request = {"model": "m", "supportsReasoning": True, "supportsReasoningOff": False}+ config = _sanitize_config(_make_payload(inferenceRequest = dict(request)), {"modelId": "other"})+ assert config["inferenceRequest"] == request+ with pytest.raises(Exception):+ _sanitize_config(+ _make_payload(inferenceRequest = {"model": "m", "supportsReasoningOff": "no"}),+ {"modelId": "m"},+ )diff --git a/studio/backend/tests/test_research_runs_storage.py b/studio/backend/tests/test_research_runs_storage.pyindex 200fdaa461e..300a734a293 100644--- a/studio/backend/tests/test_research_runs_storage.py+++ b/studio/backend/tests/test_research_runs_storage.py@@ -4352,3 +4352,95 @@ def test_an_attachment_only_turn_with_no_question_is_still_refused(research_home_create_via_route(message_id)assert excinfo.value.status_code == 400assert "non-empty text" in excinfo.value.detail+++def test_planner_opt_out_is_only_sent_where_the_model_has_one(research_home, monkeypatch):+ from core import research_runs as worker++ _create()+ run = research_db.claim_next("worker-1")+ payloads = []++ class FakeResponse:+ def raise_for_status(self):+ return None++ async def aclose(self):+ return None++ async def aiter_lines(self):+ yield 'data: {"choices":[{"delta":{"content":"{}"},"finish_reason":"stop"}]}'+ yield "data: [DONE]"++ class FakeClient:+ def __init__(self, **kwargs):+ pass++ async def __aenter__(self):+ return self++ async def __aexit__(self, exc_type, exc, tb):+ return False++ def build_request(self, *args, **kwargs):+ payloads.append(kwargs["json"])+ return object()++ async def send(self, request, *, stream):+ return FakeResponse()++ monkeypatch.setattr(worker.httpx, "AsyncClient", FakeClient)+ monkeypatch.setattr(+ worker.auth_storage, "create_api_key", lambda **kwargs: ("token", {"id": 1})+ )+ monkeypatch.setattr(worker.auth_storage, "revoke_internal_api_key", lambda key_id: None)+ monkeypatch.setattr(+ worker.db, "append_worker_event", lambda run_id, worker_id, event_type, data: 1+ )+ supervisor = worker.ResearchSupervisor(SimpleNamespace(state = SimpleNamespace(server_port = 1)))+ external = {+ "model": "m",+ "providerId": "p1",+ "providerType": "huggingface",+ "externalModel": "m",+ }++ def planner_payload(**inference):+ run["config"]["inferenceRequest"] = {**external, **inference}+ payloads.clear()+ asyncio.run(+ supervisor._stream_completion(+ run,+ [{"role": "user", "content": "question"}],+ report_progress = False,+ phase = "planning",+ enable_thinking = False,+ )+ )+ return payloads[0]++ # gpt-oss has no "none" effort, so the planner keeps the chat's effort instead.+ no_off = planner_payload(+ supportsReasoning = True, supportsReasoningOff = False, reasoningEffort = "high"+ )+ assert "enable_thinking" not in no_off and no_off["reasoning_effort"] == "high"+ plain = planner_payload(+ supportsReasoning = False, supportsReasoningOff = False, enableThinking = True+ )+ assert "enable_thinking" not in plain and "reasoning_effort" not in plain+ with_off = planner_payload(+ supportsReasoning = True, supportsReasoningOff = True, reasoningEffort = "high"+ )+ assert with_off["enable_thinking"] is False and with_off["reasoning_effort"] == "none"+ # A run queued or retried from before these flags existed carries neither, so the gate has+ # to treat unknown like non-reasoning: a resumed legacy run must not be the one request that+ # sends a field the model may not take.+ older_run = planner_payload(reasoningEffort = "high")+ assert "enable_thinking" not in older_run and "reasoning_effort" not in older_run++ # Mistral documents reasoning_effort for mistral-small-latest and mistral-medium-3-5 only, and the+ # provider branch now writes it for every model, so the planner opt-out must not reach a+ # non-reasoning model such as mistral-large-latest.+ external["providerType"] = "mistral"+ mistral = planner_payload(supportsReasoning = False, supportsReasoningOff = False)+ assert "enable_thinking" not in mistral and "reasoning_effort" not in mistraldiff --git a/studio/frontend/package.json b/studio/frontend/package.jsonindex 03240817fc3..5357a94b86e 100644--- a/studio/frontend/package.json+++ b/studio/frontend/package.json@@ -15,6 +15,7 @@"bundle:check": "node --experimental-strip-types scripts/check-bundle-budget.ts","typecheck": "tsc -b --pretty false && tsc -p tsconfig.test.json --pretty false","i18n:check": "node --experimental-strip-types --no-warnings src/i18n/check-parity.ts",+ "catalog:refresh": "node scripts/refresh-model-catalog-snapshot.mjs","i18n:check:strict": "node --experimental-strip-types --no-warnings src/i18n/check-parity.ts --strict","catalog:check": "node --experimental-strip-types --no-warnings src/features/model-picker/components/model-selector/model-catalog.check.ts","catalog:check:network": "node --experimental-strip-types --no-warnings src/features/model-picker/components/model-selector/model-catalog.check.ts --network",diff --git a/studio/frontend/scripts/refresh-model-catalog-snapshot.mjs b/studio/frontend/scripts/refresh-model-catalog-snapshot.mjsnew file mode 100644index 00000000000..1a97c0b8084--- /dev/null+++ b/studio/frontend/scripts/refresh-model-catalog-snapshot.mjs@@ -0,0 +1,100 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++// Regenerates src/features/chat/model-catalog-snapshot.ts from https://models.dev/api.json.+// Usage: npm run catalog:refresh++import { writeFileSync } from "node:fs";+import { dirname, join } from "node:path";+import { fileURLToPath } from "node:url";++const SOURCE_URL = "https://models.dev/api.json";+const OUTPUT = join(+ dirname(fileURLToPath(import.meta.url)),+ "../src/features/chat/model-catalog-snapshot.ts",+);++const PROVIDER_MAP = {+ openai: "openai",+ anthropic: "anthropic",+ openrouter: "openrouter",+ google: "gemini",+ mistral: "mistral",+ deepseek: "deepseek",+ moonshotai: "kimi",+ cohere: "cohere",+ huggingface: "huggingface",+ alibaba: "qwen",+ "ollama-cloud": "ollama",+ lmstudio: "lmstudio",+};++const EFFORT_SCALE = ["none", "minimal", "low", "medium", "high", "xhigh", "max"];++function trimModel(model) {+ const entry = {};+ if (model.reasoning === true) entry.reasoning = true;+ const options = Array.isArray(model.reasoning_options) ? model.reasoning_options : [];+ const efforts = options.find((option) => option?.type === "effort")?.values;+ if (Array.isArray(efforts)) {+ const known = efforts.filter((level) => EFFORT_SCALE.includes(level));+ if (known.length > 0) {+ entry.efforts = [...known].sort(+ (a, b) => EFFORT_SCALE.indexOf(a) - EFFORT_SCALE.indexOf(b),+ );+ }+ }+ if (options.some((option) => option?.type === "toggle")) entry.toggle = true;+ const input = model.modalities?.input;+ if (Array.isArray(input) && input.length > 0) entry.input = input;+ return entry;+}++const response = await fetch(SOURCE_URL);+if (!response.ok) {+ throw new Error(`${SOURCE_URL} responded ${response.status}`);+}+const catalog = await response.json();++const snapshot = {};+for (const [source, providerType] of Object.entries(PROVIDER_MAP)) {+ const models = catalog[source]?.models;+ if (!models || typeof models !== "object") continue;+ const bucket = snapshot[providerType] ?? {};+ for (const [modelId, model] of Object.entries(models)) {+ bucket[modelId.trim().toLowerCase()] = trimModel(model);+ }+ snapshot[providerType] = Object.fromEntries(+ Object.entries(bucket).sort(([a], [b]) => a.localeCompare(b)),+ );+}++const lines = [+ "// SPDX-License-Identifier: AGPL-3.0-only",+ "// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0",+ "",+ `// Generated by scripts/refresh-model-catalog-snapshot.mjs from ${SOURCE_URL} on ${new Date().toISOString().slice(0, 10)}. Do not edit by hand.`,+ "",+ "export interface ModelCatalogSnapshotEntry {",+ " reasoning?: true;",+ " efforts?: readonly string[];",+ " toggle?: true;",+ " input?: readonly string[];",+ "}",+ "",+ "export const MODEL_CATALOG_SNAPSHOT: Readonly<",+ " Record<string, Readonly<Record<string, ModelCatalogSnapshotEntry>>>",+ "> = {",+];+for (const [providerType, models] of Object.entries(snapshot)) {+ lines.push(` ${JSON.stringify(providerType)}: {`);+ for (const [modelId, entry] of Object.entries(models)) {+ lines.push(` ${JSON.stringify(modelId)}: ${JSON.stringify(entry)},`);+ }+ lines.push(" },");+}+lines.push("};", "");++writeFileSync(OUTPUT, lines.join("\n"));+const total = Object.values(snapshot).reduce((n, models) => n + Object.keys(models).length, 0);+console.log(`wrote ${OUTPUT}: ${total} models across ${Object.keys(snapshot).length} providers`);diff --git a/studio/frontend/src/features/chat/api/chat-adapter.ts b/studio/frontend/src/features/chat/api/chat-adapter.tsindex e5b024f3b8c..197cc5a1491 100644--- a/studio/frontend/src/features/chat/api/chat-adapter.ts+++ b/studio/frontend/src/features/chat/api/chat-adapter.ts@@ -4246,6 +4246,8 @@ export function createOpenAIStreamAdapter(researchExternalProvider.providerType,researchExternalSelection.modelId,),+ supportsReasoning: runtime.supportsReasoning,+ supportsReasoningOff: runtime.supportsReasoningOff,}: undefined,temperature: params.temperature,diff --git a/studio/frontend/src/features/chat/api/providers-api.ts b/studio/frontend/src/features/chat/api/providers-api.tsindex 0dd752085d1..4c86b35d7e6 100644--- a/studio/frontend/src/features/chat/api/providers-api.ts+++ b/studio/frontend/src/features/chat/api/providers-api.ts@@ -4,6 +4,7 @@import forge from "node-forge";import { authFetch } from "@/features/auth/api";import { formatFastApiDetail } from "@/lib/format-fastapi-error";+import type { ModelCatalogSnapshotEntry } from "../model-catalog-snapshot";export type ProviderAuthKind = "api_key" | "chatgpt_oauth";@@ -76,6 +77,11 @@ export interface ProviderModelCapabilityInfo {supported_parameters?: string[] | null;}+export interface ModelCatalogResponse {+ fetched_at: number;+ providers: Record<string, Record<string, ModelCatalogSnapshotEntry>>;+}+export interface ProviderTestResult {success: boolean;message: string;@@ -356,6 +362,11 @@ export async function listProviderModels(payload: {});}+export async function fetchModelCatalog(): Promise<ModelCatalogResponse> {+ const response = await authFetch("/api/providers/model-catalog");+ return parseJsonOrThrow<ModelCatalogResponse>(response);+}+export async function listProviderModelCapabilities(payload: {providerType: string;providerId?: string | null;diff --git a/studio/frontend/src/features/chat/external-providers.ts b/studio/frontend/src/features/chat/external-providers.tsindex 92f54c65759..3aeafbae755 100644--- a/studio/frontend/src/features/chat/external-providers.ts+++ b/studio/frontend/src/features/chat/external-providers.ts@@ -195,6 +195,10 @@ export function pruneProviderModelCapabilities(knownProviderTypes: Iterable<stri}+// The backend registry marks these supports_vision: false and strips image parts before the request, so a catalog+// that lists image input must not open the composer to an attachment the model never receives.+const IMAGE_STRIPPING_PROVIDER_TYPES = new Set<string>(["deepseek"]);+export function providerModelSupportsVision(providerType: string | null | undefined,modelId: string | null | undefined,@@ -205,6 +209,7 @@ export function providerModelSupportsVision(const capability = REGISTRY_MODEL_CAPABILITIES.get(providerType)?.[modelId];if (typeof capability?.vision === "boolean") return capability.vision;}+ if (providerType != null && IMAGE_STRIPPING_PROVIDER_TYPES.has(providerType)) return false;const catalogVision = modelCatalogSupportsVision(providerType, modelId);if (catalogVision != null) return catalogVision;return providerTypeSupportsVision(providerType);diff --git a/studio/frontend/src/features/chat/model-catalog-snapshot.ts b/studio/frontend/src/features/chat/model-catalog-snapshot.tsnew file mode 100644index 00000000000..fd43ba66475--- /dev/null+++ b/studio/frontend/src/features/chat/model-catalog-snapshot.ts@@ -0,0 +1,723 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++// Generated by scripts/refresh-model-catalog-snapshot.mjs from https://models.dev/api.json on 2026-09-14. Do not edit by hand.++export interface ModelCatalogSnapshotEntry {+ reasoning?: true;+ efforts?: readonly string[];+ toggle?: true;+ input?: readonly string[];+}++export const MODEL_CATALOG_SNAPSHOT: Readonly<+ Record<string, Readonly<Record<string, ModelCatalogSnapshotEntry>>>+> = {+ "openai": {+ "chatgpt-image-latest": {"input":["text","image"]},+ "gpt-3.5-turbo": {"input":["text"]},+ "gpt-4": {"input":["text"]},+ "gpt-4-turbo": {"input":["text","image"]},+ "gpt-4.1": {"input":["text","image","pdf"]},+ "gpt-4.1-mini": {"input":["text","image","pdf"]},+ "gpt-4.1-nano": {"input":["text","image"]},+ "gpt-4o": {"input":["text","image","pdf"]},+ "gpt-4o-2024-05-13": {"input":["text","image"]},+ "gpt-4o-2024-08-06": {"input":["text","image"]},+ "gpt-4o-2024-11-20": {"input":["text","image"]},+ "gpt-4o-mini": {"input":["text","image","pdf"]},+ "gpt-5": {"reasoning":true,"efforts":["minimal","low","medium","high"],"input":["text","image"]},+ "gpt-5-mini": {"reasoning":true,"efforts":["minimal","low","medium","high"],"input":["text","image"]},+ "gpt-5-nano": {"reasoning":true,"efforts":["minimal","low","medium","high"],"input":["text","image"]},+ "gpt-5-pro": {"reasoning":true,"efforts":["high"],"input":["text","image"]},+ "gpt-5.1": {"reasoning":true,"efforts":["none","low","medium","high"],"input":["text","image"]},+ "gpt-5.2": {"reasoning":true,"efforts":["none","low","medium","high","xhigh"],"input":["text","image"]},+ "gpt-5.2-chat-latest": {"reasoning":true,"efforts":["medium"],"input":["text","image"]},+ "gpt-5.2-pro": {"reasoning":true,"efforts":["medium","high","xhigh"],"input":["text","image"]},+ "gpt-5.3-chat-latest": {"input":["text","image"]},+ "gpt-5.3-codex": {"reasoning":true,"efforts":["none","low","medium","high","xhigh"],"input":["text","image","pdf"]},+ "gpt-5.3-codex-spark": {"reasoning":true,"efforts":["none","low","medium","high","xhigh"],"input":["text","image","pdf"]},+ "gpt-5.4": {"reasoning":true,"efforts":["none","low","medium","high","xhigh"],"input":["text","image","pdf"]},+ "gpt-5.4-mini": {"reasoning":true,"efforts":["none","low","medium","high","xhigh"],"input":["text","image"]},+ "gpt-5.4-nano": {"reasoning":true,"efforts":["none","low","medium","high","xhigh"],"input":["text","image"]},+ "gpt-5.4-pro": {"reasoning":true,"efforts":["medium","high","xhigh"],"input":["text","image"]},+ "gpt-5.5": {"reasoning":true,"efforts":["none","low","medium","high","xhigh"],"input":["text","image","pdf"]},+ "gpt-5.5-pro": {"reasoning":true,"efforts":["medium","high","xhigh"],"input":["text","image","pdf"]},+ "gpt-5.6": {"reasoning":true,"efforts":["none","low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "gpt-5.6-luna": {"reasoning":true,"efforts":["none","low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "gpt-5.6-sol": {"reasoning":true,"efforts":["none","low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "gpt-5.6-terra": {"reasoning":true,"efforts":["none","low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "gpt-6-astra": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "gpt-image-1": {"input":["text","image"]},+ "gpt-image-1-mini": {"input":["text","image"]},+ "gpt-image-1.5": {"input":["text","image"]},+ "gpt-image-2": {"input":["text","image"]},+ "gpt-realtime-2.1": {"reasoning":true,"efforts":["minimal","low","medium","high","xhigh"],"input":["text","audio","image"]},+ "o1": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image","pdf"]},+ "o1-pro": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image"]},+ "o3": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image","pdf"]},+ "o3-mini": {"reasoning":true,"efforts":["low","medium","high"],"input":["text"]},+ "o3-pro": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image"]},+ "o4-mini": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image"]},+ "text-embedding-3-large": {"input":["text"]},+ "text-embedding-3-small": {"input":["text"]},+ "text-embedding-ada-002": {"input":["text"]},+ },+ "anthropic": {+ "claude-fable-5": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "claude-fable-5-1": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "claude-haiku-4-5": {"reasoning":true,"input":["text","image","pdf"]},+ "claude-haiku-4-5-20251001": {"reasoning":true,"input":["text","image","pdf"]},+ "claude-opus-4-5": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image","pdf"]},+ "claude-opus-4-5-20251101": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image","pdf"]},+ "claude-opus-4-6": {"reasoning":true,"efforts":["low","medium","high","max"],"input":["text","image","pdf"]},+ "claude-opus-4-7": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "claude-opus-4-8": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "claude-opus-5": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "claude-sonnet-4-5": {"reasoning":true,"input":["text","image","pdf"]},+ "claude-sonnet-4-5-20250929": {"reasoning":true,"input":["text","image","pdf"]},+ "claude-sonnet-4-6": {"reasoning":true,"efforts":["low","medium","high","max"],"input":["text","image","pdf"]},+ "claude-sonnet-5": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"toggle":true,"input":["text","image","pdf"]},+ },+ "openrouter": {+ "~anthropic/claude-fable-latest": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "~anthropic/claude-haiku-latest": {"reasoning":true,"toggle":true,"input":["text","image","pdf"]},+ "~anthropic/claude-opus-latest": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"toggle":true,"input":["text","image","pdf"]},+ "~anthropic/claude-sonnet-latest": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"toggle":true,"input":["text","image","pdf"]},+ "~deepseek/deepseek-v4-flash-latest": {"reasoning":true,"efforts":["low","high","max"],"toggle":true,"input":["text"]},+ "~google/gemini-flash-latest": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image","video","pdf","audio"]},+ "~google/gemini-pro-latest": {"reasoning":true,"efforts":["low","medium","high"],"input":["audio","pdf","image","text","video"]},+ "~moonshotai/kimi-latest": {"reasoning":true,"efforts":["low","high","max"],"toggle":true,"input":["text","image","video"]},+ "~openai/gpt-astra-latest": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"input":["pdf","image","text"]},+ "~openai/gpt-luna-latest": {"reasoning":true,"efforts":["none","low","medium","high","xhigh","max"],"input":["pdf","image","text"]},+ "~openai/gpt-mini-latest": {"reasoning":true,"efforts":["none","low","medium","high","xhigh"],"input":["pdf","image","text"]},+ "~openai/gpt-sol-latest": {"reasoning":true,"efforts":["none","low","medium","high","xhigh","max"],"input":["pdf","image","text"]},+ "~openai/gpt-terra-latest": {"reasoning":true,"efforts":["none","low","medium","high","xhigh","max"],"input":["pdf","image","text"]},+ "~x-ai/grok-latest": {"reasoning":true,"efforts":["low","medium","high","xhigh"],"input":["text","image","pdf"]},+ "~z-ai/glm-flash-latest": {"reasoning":true,"efforts":["low","high","max"],"input":["text","image","video"]},+ "~z-ai/glm-latest": {"reasoning":true,"efforts":["low","high","max"],"input":["text"]},+ "aion-labs/aion-2.0": {"reasoning":true,"input":["text"]},+ "aion-labs/aion-3.0": {"reasoning":true,"input":["text"]},+ "aion-labs/aion-3.0-mini": {"reasoning":true,"input":["text"]},+ "aion-labs/aion-rp-llama-3.1-8b": {"input":["text"]},+ "amazon/nova-2-lite-v1": {"reasoning":true,"toggle":true,"input":["text","image","video","pdf"]},+ "amazon/nova-lite-v1": {"input":["text","image"]},+ "amazon/nova-micro-v1": {"input":["text"]},+ "amazon/nova-premier-v1": {"input":["text","image"]},+ "amazon/nova-pro-v1": {"input":["text","image"]},+ "anthracite-org/magnum-v4-72b": {"input":["text"]},+ "anthropic/claude-3-haiku": {"input":["text","image"]},+ "anthropic/claude-fable-5": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "anthropic/claude-fable-5.1": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "anthropic/claude-haiku-4.5": {"reasoning":true,"toggle":true,"input":["text","image","pdf"]},+ "anthropic/claude-opus-4": {"reasoning":true,"toggle":true,"input":["image","text","pdf"]},+ "anthropic/claude-opus-4.1": {"reasoning":true,"toggle":true,"input":["text","image","pdf"]},+ "anthropic/claude-opus-4.5": {"reasoning":true,"toggle":true,"input":["text","image","pdf"]},+ "anthropic/claude-opus-4.6": {"reasoning":true,"efforts":["low","medium","high","max"],"toggle":true,"input":["text","image","pdf"]},+ "anthropic/claude-opus-4.7": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"toggle":true,"input":["text","image","pdf"]},+ "anthropic/claude-opus-4.8": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"toggle":true,"input":["text","image","pdf"]},+ "anthropic/claude-opus-5": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"toggle":true,"input":["text","image","pdf"]},+ "anthropic/claude-sonnet-4": {"reasoning":true,"toggle":true,"input":["image","text","pdf"]},+ "anthropic/claude-sonnet-4.5": {"reasoning":true,"toggle":true,"input":["text","image","pdf"]},+ "anthropic/claude-sonnet-4.6": {"reasoning":true,"efforts":["low","medium","high","max"],"toggle":true,"input":["text","image","pdf"]},+ "anthropic/claude-sonnet-5": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"toggle":true,"input":["text","image","pdf"]},+ "arcee-ai/trinity-large-thinking": {"reasoning":true,"input":["text"]},+ "baidu/ernie-4.5-vl-424b-a47b": {"reasoning":true,"toggle":true,"input":["image","text"]},+ "bytedance-seed/seed-1.6": {"reasoning":true,"toggle":true,"input":["image","text","video"]},+ "bytedance-seed/seed-1.6-flash": {"reasoning":true,"toggle":true,"input":["image","text","video"]},+ "bytedance-seed/seed-2-1-turbo": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "bytedance-seed/seed-2.0-code": {"reasoning":true,"efforts":["low","medium","high"],"toggle":true,"input":["text","image","video"]},+ "bytedance-seed/seed-2.0-lite": {"reasoning":true,"efforts":["minimal","low","medium","high"],"toggle":true,"input":["text","image","video"]},+ "bytedance-seed/seed-2.0-mini": {"reasoning":true,"efforts":["minimal","low","medium","high"],"toggle":true,"input":["text","image","video"]},+ "bytedance/ui-tars-1.5-7b": {"input":["image","text"]},+ "cognitivecomputations/dolphin-mistral-24b-venice-edition": {"input":["text"]},+ "cohere/command-a": {"input":["text"]},+ "cohere/command-r-08-2024": {"input":["text"]},+ "cohere/command-r-plus-08-2024": {"input":["text"]},+ "cohere/command-r7b-12-2024": {"input":["text"]},+ "cohere/north-mini-code:free": {"reasoning":true,"toggle":true,"input":["text"]},+ "deepseek/deepseek-chat": {"input":["text"]},+ "deepseek/deepseek-chat-v3-0324": {"input":["text"]},+ "deepseek/deepseek-chat-v3.1": {"reasoning":true,"toggle":true,"input":["text"]},+ "deepseek/deepseek-r1": {"reasoning":true,"input":["text"]},+ "deepseek/deepseek-r1-0528": {"reasoning":true,"input":["text"]},+ "deepseek/deepseek-r1-distill-llama-70b": {"reasoning":true,"toggle":true,"input":["text"]},+ "deepseek/deepseek-v3.1-terminus": {"reasoning":true,"toggle":true,"input":["text"]},+ "deepseek/deepseek-v3.2": {"reasoning":true,"toggle":true,"input":["text"]},+ "deepseek/deepseek-v3.2-exp": {"reasoning":true,"toggle":true,"input":["text"]},+ "deepseek/deepseek-v4-flash": {"reasoning":true,"efforts":["high","xhigh"],"toggle":true,"input":["text"]},+ "deepseek/deepseek-v4-flash-0731": {"reasoning":true,"efforts":["low","high","max"],"toggle":true,"input":["text"]},+ "deepseek/deepseek-v4-flash-vision-exp": {"reasoning":true,"efforts":["low","high","max"],"toggle":true,"input":["text","image"]},+ "deepseek/deepseek-v4-pro": {"reasoning":true,"efforts":["high","xhigh"],"toggle":true,"input":["text"]},+ "deepseek/deepseek-v4-pro-0813": {"reasoning":true,"efforts":["low","high","max"],"toggle":true,"input":["text"]},+ "deepseek/deepseek-v4.1-flash": {"reasoning":true,"efforts":["low","high","max"],"toggle":true,"input":["text","image"]},+ "dots-studio/dots-3-note-preview:free": {"reasoning":true,"toggle":true,"input":["text","image"]},+ "google/gemini-2.5-flash": {"reasoning":true,"toggle":true,"input":["text","image","audio","video","pdf"]},+ "google/gemini-2.5-flash-image": {"input":["text","image"]},+ "google/gemini-2.5-flash-lite": {"reasoning":true,"toggle":true,"input":["text","image","audio","video","pdf"]},+ "google/gemini-2.5-pro": {"reasoning":true,"input":["text","image","audio","video","pdf"]},+ "google/gemini-2.5-pro-preview": {"reasoning":true,"input":["pdf","image","text","audio"]},+ "google/gemini-2.5-pro-preview-05-06": {"reasoning":true,"input":["text","image","pdf","audio","video"]},+ "google/gemini-3-flash-preview": {"reasoning":true,"efforts":["minimal","low","medium","high"],"toggle":true,"input":["text","image","video","audio","pdf"]},+ "google/gemini-3-pro-image": {"reasoning":true,"input":["text","image"]},+ "google/gemini-3-pro-image-preview": {"reasoning":true,"input":["text","image"]},+ "google/gemini-3.1-flash-image": {"reasoning":true,"efforts":["minimal","high"],"toggle":true,"input":["image","text"]},+ "google/gemini-3.1-flash-image-preview": {"reasoning":true,"efforts":["minimal","high"],"toggle":true,"input":["image","text"]},+ "google/gemini-3.1-flash-lite": {"reasoning":true,"efforts":["minimal","low","medium","high"],"toggle":true,"input":["text","image","video","audio","pdf"]},+ "google/gemini-3.1-flash-lite-image": {"reasoning":true,"efforts":["minimal","high"],"toggle":true,"input":["text","image"]},+ "google/gemini-3.1-flash-lite-preview": {"reasoning":true,"efforts":["minimal","low","medium","high"],"toggle":true,"input":["text","image","video","audio","pdf"]},+ "google/gemini-3.1-pro-preview": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "google/gemini-3.1-pro-preview-customtools": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "google/gemini-3.5-flash": {"reasoning":true,"efforts":["minimal","low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "google/gemini-3.5-flash-lite": {"reasoning":true,"efforts":["minimal","low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "google/gemini-3.6-flash": {"reasoning":true,"efforts":["minimal","low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "google/gemini-3.7-flash": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "google/gemini-3.8-flash": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "google/gemma-2-27b-it": {"input":["text"]},+ "google/gemma-3-12b-it": {"input":["text","image"]},+ "google/gemma-3-27b-it": {"input":["text","image"]},+ "google/gemma-3-4b-it": {"input":["text","image"]},+ "google/gemma-4-26b-a4b-it": {"reasoning":true,"toggle":true,"input":["image","text","video"]},+ "google/gemma-4-26b-a4b-it:free": {"reasoning":true,"toggle":true,"input":["image","text","video"]},+ "google/gemma-4-31b-it": {"reasoning":true,"toggle":true,"input":["image","text","video"]},+ "google/gemma-4-31b-it:free": {"reasoning":true,"toggle":true,"input":["image","text","video"]},+ "google/lyria-3-clip-preview": {"input":["text","image"]},+ "google/lyria-3-pro-preview": {"input":["text","image"]},+ "gryphe/mythomax-l2-13b": {"input":["text"]},+ "ibm-granite/granite-4.0-h-micro": {"input":["text"]},+ "ibm-granite/granite-4.2-8b": {"reasoning":true,"efforts":["none","low","high"],"input":["text"]},+ "inception/mercury-2": {"reasoning":true,"efforts":["none","low","medium","high"],"input":["text"]},+ "inception/mercury-2.5": {"reasoning":true,"efforts":["none","low","medium","high"],"input":["text"]},+ "inclusionai/ling-3.0-flash": {"reasoning":true,"toggle":true,"input":["text"]},+ "inclusionai/ling-3.0-flash-fin": {"reasoning":true,"toggle":true,"input":["text"]},+ "inclusionai/ling-3.0-flash-fin:free": {"reasoning":true,"toggle":true,"input":["text"]},+ "inclusionai/ling-3.0-flash-sante:free": {"reasoning":true,"toggle":true,"input":["text"]},+ "inclusionai/ling-3.0-flash-vl": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "inclusionai/ling-3.0-flash-vl:free": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "inference-net/schematron-v2-small": {"input":["text"]},+ "inference-net/schematron-v2-turbo": {"input":["text"]},+ "kwaipilot/kat-coder-pro-v2": {"input":["text"]},+ "kwaipilot/kat-coder-pro-v2.5": {"input":["text"]},+ "liquid/lfm-2.5-2.6b:free": {"reasoning":true,"input":["text"]},+ "mancer/weaver": {"input":["text"]},+ "meituan/longcat-2.0": {"reasoning":true,"toggle":true,"input":["text"]},+ "meta-llama/llama-3.1-70b-instruct": {"input":["text"]},+ "meta-llama/llama-3.1-8b-instruct": {"input":["text"]},+ "meta-llama/llama-3.2-1b-instruct": {"input":["text"]},+ "meta-llama/llama-3.2-3b-instruct": {"input":["text"]},+ "meta-llama/llama-3.3-70b-instruct": {"input":["text"]},+ "meta-llama/llama-4-maverick": {"input":["text","image"]},+ "meta-llama/llama-4-scout": {"input":["text","image"]},+ "meta-llama/llama-guard-4-12b": {"input":["image","text"]},+ "meta/muse-glimmer-30b": {"reasoning":true,"efforts":["low","medium","high","xhigh"],"input":["text","image"]},+ "meta/muse-spark-1.1": {"reasoning":true,"efforts":["minimal","low","medium","high","xhigh"],"input":["text","image","video","pdf","audio"]},+ "meta/muse-spark-1.2": {"reasoning":true,"efforts":["minimal","low","medium","high","xhigh"],"input":["text","image","video","pdf","audio"]},+ "meta/muse-spark-1.2-contributor": {"reasoning":true,"efforts":["minimal","low","medium","high","xhigh"],"input":["text","image","video","pdf","audio"]},+ "meta/muse-spark-1.3": {"reasoning":true,"efforts":["minimal","low","medium","high","xhigh","max"],"input":["text","image","video","pdf","audio"]},+ "meta/muse-spark-1.3-contributor": {"reasoning":true,"efforts":["minimal","low","medium","high","xhigh","max"],"input":["text","image","video","pdf","audio"]},+ "microsoft/phi-4": {"input":["text"]},+ "microsoft/wizardlm-2-8x22b": {"input":["text"]},+ "minimax/minimax-01": {"input":["text","image"]},+ "minimax/minimax-m1": {"reasoning":true,"toggle":true,"input":["text"]},+ "minimax/minimax-m2": {"reasoning":true,"input":["text"]},+ "minimax/minimax-m2-her": {"input":["text"]},+ "minimax/minimax-m2.1": {"reasoning":true,"input":["text"]},+ "minimax/minimax-m2.5": {"reasoning":true,"input":["text"]},+ "minimax/minimax-m2.7": {"reasoning":true,"input":["text"]},+ "minimax/minimax-m3": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "mistralai/codestral-2508": {"input":["text","pdf"]},+ "mistralai/devstral-2512": {"input":["text","pdf"]},+ "mistralai/ministral-14b-2512": {"input":["text","image"]},+ "mistralai/ministral-3b-2512": {"input":["text","image"]},+ "mistralai/ministral-8b-2512": {"input":["text","image"]},+ "mistralai/mistral-large": {"input":["text","pdf"]},+ "mistralai/mistral-large-2407": {"input":["text","pdf"]},+ "mistralai/mistral-large-2512": {"input":["text","image","pdf"]},+ "mistralai/mistral-medium-3": {"input":["text","image","pdf"]},+ "mistralai/mistral-medium-3-5": {"reasoning":true,"efforts":["none","high"],"input":["text","image","pdf"]},+ "mistralai/mistral-medium-3.1": {"input":["text","image","pdf"]},+ "mistralai/mistral-nemo": {"input":["text"]},+ "mistralai/mistral-saba": {"input":["text","pdf"]},+ "mistralai/mistral-small-24b-instruct-2501": {"input":["text"]},+ "mistralai/mistral-small-2603": {"reasoning":true,"efforts":["none","high"],"input":["text","image"]},+ "mistralai/mistral-small-3.1-24b-instruct": {"input":["text","image"]},+ "mistralai/mistral-small-3.2-24b-instruct": {"input":["image","text"]},+ "mistralai/mixtral-8x22b-instruct": {"input":["text","pdf"]},+ "mistralai/voxtral-small-24b-2507": {"input":["text","audio","pdf"]},+ "moonshotai/kimi-k2": {"input":["text"]},+ "moonshotai/kimi-k2-0905": {"input":["text"]},+ "moonshotai/kimi-k2-thinking": {"reasoning":true,"input":["text"]},+ "moonshotai/kimi-k2.5": {"reasoning":true,"toggle":true,"input":["text","image"]},+ "moonshotai/kimi-k2.6": {"reasoning":true,"toggle":true,"input":["text","image"]},+ "moonshotai/kimi-k2.7-code": {"reasoning":true,"input":["text","image"]},+ "moonshotai/kimi-k3": {"reasoning":true,"efforts":["low","high","max"],"toggle":true,"input":["text","image","video"]},+ "morph/morph-v3-fast": {"input":["text"]},+ "morph/morph-v3-large": {"input":["text"]},+ "nex-agi/nex-n2.5-mini:free": {"reasoning":true,"efforts":["none","medium","high"],"input":["text","image"]},+ "nex-agi/nex-n2.5-pro:free": {"reasoning":true,"efforts":["none","medium","high"],"input":["text","image"]},+ "nousresearch/hermes-3-llama-3.1-405b": {"input":["text"]},+ "nousresearch/hermes-3-llama-3.1-70b": {"input":["text"]},+ "nousresearch/hermes-4-405b": {"reasoning":true,"toggle":true,"input":["text"]},+ "nvidia/nemotron-3-nano-30b-a3b": {"reasoning":true,"toggle":true,"input":["text"]},+ "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free": {"reasoning":true,"toggle":true,"input":["text","image","video","audio"]},+ "nvidia/nemotron-3-super-120b-a12b": {"reasoning":true,"efforts":["low","medium"],"toggle":true,"input":["text"]},+ "nvidia/nemotron-3-super-120b-a12b:free": {"reasoning":true,"efforts":["low","medium"],"toggle":true,"input":["text"]},+ "nvidia/nemotron-3-ultra-550b-a55b": {"reasoning":true,"efforts":["medium","high"],"toggle":true,"input":["text"]},+ "nvidia/nemotron-3-ultra-550b-a55b:free": {"reasoning":true,"efforts":["medium","high"],"toggle":true,"input":["text"]},+ "nvidia/nemotron-3.5-content-safety": {"reasoning":true,"toggle":true,"input":["text","image"]},+ "nvidia/nemotron-3.5-content-safety:free": {"reasoning":true,"toggle":true,"input":["text","image"]},+ "nvidia/nemotron-3.5-lightning": {"reasoning":true,"toggle":true,"input":["text"]},+ "nvidia/nemotron-3.5-lightning:free": {"reasoning":true,"toggle":true,"input":["text"]},+ "openai/gpt-3.5-turbo": {"input":["text"]},+ "openai/gpt-3.5-turbo-0613": {"input":["text"]},+ "openai/gpt-3.5-turbo-16k": {"input":["text"]},+ "openai/gpt-3.5-turbo-instruct": {"input":["text"]},+ "openai/gpt-4": {"input":["text"]},+ "openai/gpt-4-turbo": {"input":["text","image"]},+ "openai/gpt-4-turbo-preview": {"input":["text"]},+ "openai/gpt-4.1": {"input":["text","image","pdf"]},+ "openai/gpt-4.1-mini": {"input":["text","image","pdf"]},+ "openai/gpt-4.1-nano": {"input":["image","text","pdf"]},+ "openai/gpt-4o": {"input":["text","image","pdf"]},+ "openai/gpt-4o-2024-05-13": {"input":["text","image","pdf"]},+ "openai/gpt-4o-2024-08-06": {"input":["text","image","pdf"]},+ "openai/gpt-4o-2024-11-20": {"input":["text","image","pdf"]},+ "openai/gpt-4o-mini": {"input":["text","image","pdf"]},+ "openai/gpt-4o-mini-2024-07-18": {"input":["text","image","pdf"]},+ "openai/gpt-5": {"reasoning":true,"efforts":["minimal","low","medium","high"],"input":["text","image","pdf"]},+ "openai/gpt-5-image": {"reasoning":true,"input":["image","text","pdf"]},+ "openai/gpt-5-image-mini": {"reasoning":true,"input":["pdf","image","text"]},+ "openai/gpt-5-mini": {"reasoning":true,"efforts":["minimal","low","medium","high"],"input":["text","image","pdf"]},+ "openai/gpt-5-nano": {"reasoning":true,"efforts":["minimal","low","medium","high"],"input":["text","image","pdf"]},+ "openai/gpt-5-pro": {"reasoning":true,"efforts":["high"],"input":["image","text","pdf"]},+ "openai/gpt-5.1": {"reasoning":true,"efforts":["none","low","medium","high"],"input":["image","text","pdf"]},+ "openai/gpt-5.1-codex": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image"]},+ "openai/gpt-5.1-codex-max": {"reasoning":true,"efforts":["low","medium","high","xhigh"],"input":["text","image"]},+ "openai/gpt-5.1-codex-mini": {"reasoning":true,"efforts":["low","medium","high"],"toggle":true,"input":["text","image"]},+ "openai/gpt-5.2": {"reasoning":true,"efforts":["none","low","medium","high","xhigh"],"input":["pdf","image","text"]},+ "openai/gpt-5.2-chat": {"input":["pdf","image","text"]},+ "openai/gpt-5.2-codex": {"reasoning":true,"efforts":["low","medium","high","xhigh"],"input":["text","image"]},+ "openai/gpt-5.2-pro": {"reasoning":true,"efforts":["medium","high","xhigh"],"input":["image","text","pdf"]},+ "openai/gpt-5.3-codex": {"reasoning":true,"efforts":["none","low","medium","high","xhigh"],"input":["text","image","pdf"]},+ "openai/gpt-5.4": {"reasoning":true,"efforts":["none","low","medium","high","xhigh"],"input":["text","image","pdf"]},+ "openai/gpt-5.4-image-2": {"reasoning":true,"efforts":["none","low","medium","high","xhigh"],"input":["image","text","pdf"]},+ "openai/gpt-5.4-mini": {"reasoning":true,"efforts":["none","low","medium","high","xhigh"],"input":["pdf","image","text"]},+ "openai/gpt-5.4-nano": {"reasoning":true,"efforts":["none","low","medium","high","xhigh"],"input":["pdf","image","text"]},+ "openai/gpt-5.4-pro": {"reasoning":true,"efforts":["medium","high","xhigh"],"input":["text","image","pdf"]},+ "openai/gpt-5.5": {"reasoning":true,"efforts":["none","low","medium","high","xhigh"],"input":["text","image","pdf"]},+ "openai/gpt-5.5-pro": {"reasoning":true,"efforts":["medium","high","xhigh"],"input":["text","image","pdf"]},+ "openai/gpt-5.6-luna": {"reasoning":true,"efforts":["none","low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "openai/gpt-5.6-luna-pro": {"reasoning":true,"efforts":["none","low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "openai/gpt-5.6-sol": {"reasoning":true,"efforts":["none","low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "openai/gpt-5.6-sol-pro": {"reasoning":true,"efforts":["none","low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "openai/gpt-5.6-terra": {"reasoning":true,"efforts":["none","low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "openai/gpt-5.6-terra-pro": {"reasoning":true,"efforts":["none","low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "openai/gpt-6-astra": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"input":["text","image","pdf"]},+ "openai/gpt-6-astra-pro": {"reasoning":true,"efforts":["low","medium","high","xhigh","max"],"input":["pdf","image","text"]},+ "openai/gpt-audio": {"input":["text","audio"]},+ "openai/gpt-audio-mini": {"input":["text","audio"]},+ "openai/gpt-chat-latest": {"input":["text","image","pdf"]},+ "openai/gpt-oss-120b": {"reasoning":true,"efforts":["low","medium","high"],"input":["text"]},+ "openai/gpt-oss-20b": {"reasoning":true,"efforts":["low","medium","high"],"input":["text"]},+ "openai/gpt-oss-safeguard-20b": {"reasoning":true,"efforts":["low","medium","high"],"input":["text"]},+ "openai/o1": {"reasoning":true,"toggle":true,"input":["text","image","pdf"]},+ "openai/o1-pro": {"reasoning":true,"toggle":true,"input":["text","image","pdf"]},+ "openai/o3": {"reasoning":true,"toggle":true,"input":["text","image","pdf"]},+ "openai/o3-mini": {"reasoning":true,"toggle":true,"input":["text","pdf"]},+ "openai/o3-mini-high": {"reasoning":true,"efforts":["high"],"input":["text","pdf"]},+ "openai/o3-pro": {"reasoning":true,"toggle":true,"input":["text","pdf","image"]},+ "openai/o4-mini": {"reasoning":true,"toggle":true,"input":["image","text","pdf"]},+ "openai/o4-mini-high": {"reasoning":true,"efforts":["high"],"input":["image","text","pdf"]},+ "openrouter/auto": {"reasoning":true,"input":["text","image","audio","pdf","video"]},+ "openrouter/bodybuilder": {"input":["text"]},+ "openrouter/free": {"reasoning":true,"input":["text","image"]},+ "openrouter/fusion": {"input":["text"]},+ "openrouter/pareto-code": {"input":["text"]},+ "perceptron/perceptron-mk1": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "perplexity/sonar": {"input":["text","image"]},+ "perplexity/sonar-deep-research": {"reasoning":true,"toggle":true,"input":["text"]},+ "perplexity/sonar-pro": {"input":["text","image"]},+ "perplexity/sonar-pro-search": {"reasoning":true,"input":["text","image"]},+ "perplexity/sonar-reasoning-pro": {"reasoning":true,"toggle":true,"input":["text","image"]},+ "poolside/laguna-s-2.1": {"reasoning":true,"toggle":true,"input":["text"]},+ "poolside/laguna-s-2.1:free": {"reasoning":true,"toggle":true,"input":["text"]},+ "poolside/laguna-xs-2.1": {"reasoning":true,"toggle":true,"input":["text"]},+ "poolside/laguna-xs-2.1:free": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen/qwen-2.5-72b-instruct": {"input":["text"]},+ "qwen/qwen-2.5-7b-instruct": {"input":["text"]},+ "qwen/qwen-2.5-coder-32b-instruct": {"input":["text"]},+ "qwen/qwen-plus": {"input":["text"]},+ "qwen/qwen-plus-2025-07-28": {"input":["text"]},+ "qwen/qwen2.5-vl-72b-instruct": {"input":["text","image"]},+ "qwen/qwen3-14b": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen/qwen3-235b-a22b": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen/qwen3-235b-a22b-2507": {"input":["text"]},+ "qwen/qwen3-235b-a22b-thinking-2507": {"reasoning":true,"input":["text"]},+ "qwen/qwen3-30b-a3b": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen/qwen3-30b-a3b-instruct-2507": {"input":["text"]},+ "qwen/qwen3-30b-a3b-thinking-2507": {"reasoning":true,"input":["text"]},+ "qwen/qwen3-32b": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen/qwen3-8b": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen/qwen3-coder": {"input":["text"]},+ "qwen/qwen3-coder-30b-a3b-instruct": {"input":["text"]},+ "qwen/qwen3-coder-flash": {"input":["text"]},+ "qwen/qwen3-coder-next": {"input":["text"]},+ "qwen/qwen3-coder-plus": {"input":["text"]},+ "qwen/qwen3-max": {"input":["text"]},+ "qwen/qwen3-max-thinking": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen/qwen3-next-80b-a3b-instruct": {"input":["text"]},+ "qwen/qwen3-next-80b-a3b-thinking": {"reasoning":true,"input":["text"]},+ "qwen/qwen3-vl-235b-a22b-instruct": {"input":["text","image"]},+ "qwen/qwen3-vl-235b-a22b-thinking": {"reasoning":true,"input":["text","image"]},+ "qwen/qwen3-vl-30b-a3b-instruct": {"input":["text","image"]},+ "qwen/qwen3-vl-30b-a3b-thinking": {"reasoning":true,"input":["text","image"]},+ "qwen/qwen3-vl-32b-instruct": {"input":["text","image"]},+ "qwen/qwen3-vl-8b-instruct": {"input":["image","text"]},+ "qwen/qwen3-vl-8b-thinking": {"reasoning":true,"input":["image","text"]},+ "qwen/qwen3.5-122b-a10b": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "qwen/qwen3.5-27b": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "qwen/qwen3.5-35b-a3b": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "qwen/qwen3.5-397b-a17b": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "qwen/qwen3.5-9b": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "qwen/qwen3.5-flash-02-23": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "qwen/qwen3.5-plus-02-15": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "qwen/qwen3.5-plus-20260420": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "qwen/qwen3.6-27b": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "qwen/qwen3.6-35b-a3b": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "qwen/qwen3.6-flash": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "qwen/qwen3.6-max-preview": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen/qwen3.6-plus": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "qwen/qwen3.7-flash": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "qwen/qwen3.7-max": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen/qwen3.7-plus": {"reasoning":true,"toggle":true,"input":["text","image"]},+ "qwen/qwen3.8-2.4t-a95b": {"reasoning":true,"efforts":["low","medium","xhigh"],"input":["text"]},+ "qwen/qwen3.8-27b": {"reasoning":true,"efforts":["low","medium","xhigh"],"toggle":true,"input":["text","image","video"]},+ "qwen/qwen3.8-flash": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "qwen/qwen3.8-max-0902": {"reasoning":true,"efforts":["minimal","low","medium","high","xhigh"],"input":["text","image","video"]},+ "rekaai/reka-edge": {"input":["image","text","video"]},+ "rekaai/reka-flash-3": {"reasoning":true,"input":["text"]},+ "relace/relace-apply-3": {"input":["text"]},+ "relace/relace-search": {"input":["text"]},+ "sakana/fugu-max": {"reasoning":true,"efforts":["high","xhigh","max"],"input":["text","image","pdf"]},+ "sakana/fugu-ultra": {"reasoning":true,"efforts":["high","xhigh","max"],"input":["text","image"]},+ "sakana/fugu-ultra-v2": {"reasoning":true,"efforts":["high","xhigh","max"],"input":["text","image","pdf"]},+ "sakana/sakana-namazu": {"reasoning":true,"efforts":["none","high"],"input":["text","image","pdf"]},+ "sao10k/l3-lunaris-8b": {"input":["text"]},+ "sao10k/l3.1-euryale-70b": {"input":["text"]},+ "sao10k/l3.3-euryale-70b": {"input":["text"]},+ "stepfun/step-3.5-flash": {"reasoning":true,"input":["text"]},+ "stepfun/step-3.7-flash": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image","video"]},+ "tencent/hunyuan-a13b-instruct": {"reasoning":true,"toggle":true,"input":["text"]},+ "tencent/hy-mt2-1.8b": {"input":["text"]},+ "tencent/hy-mt2-30b-a3b": {"input":["text"]},+ "tencent/hy-mt2-7b": {"input":["text"]},+ "tencent/hy3": {"reasoning":true,"efforts":["none","low","high"],"input":["text"]},+ "tencent/hy3-preview": {"reasoning":true,"efforts":["none","low","high"],"input":["text"]},+ "tencent/hy4-preview": {"reasoning":true,"efforts":["none","low","high"],"input":["text"]},+ "thedrummer/cydonia-24b-v4.1": {"input":["text"]},+ "thedrummer/skyfall-36b-v2": {"input":["text"]},+ "thedrummer/unslopnemo-12b": {"input":["text"]},+ "thinkingmachines/inkling": {"reasoning":true,"efforts":["none","minimal","low","medium","high","max"],"input":["text","image","audio"]},+ "thinkingmachines/inkling-small": {"reasoning":true,"efforts":["none","minimal","low","medium","high","max"],"input":["text","image","audio"]},+ "thinkingmachines/inkling-small:free": {"reasoning":true,"efforts":["none","minimal","low","medium","high","max"],"input":["text","image","audio"]},+ "thinkingmachines/inkling:free": {"reasoning":true,"efforts":["none","minimal","low","medium","high","max"],"input":["text","image","audio"]},+ "undi95/remm-slerp-l2-13b": {"input":["text"]},+ "upstage/solar-pro-3": {"reasoning":true,"toggle":true,"input":["text"]},+ "upstage/solar-pro4": {"reasoning":true,"toggle":true,"input":["text"]},+ "writer/palmyra-x5": {"input":["text"]},+ "x-ai/grok-4.20": {"reasoning":true,"toggle":true,"input":["text","image","pdf"]},+ "x-ai/grok-4.20-multi-agent": {"reasoning":true,"efforts":["low","medium","high","xhigh"],"input":["text","image","pdf"]},+ "x-ai/grok-4.3": {"reasoning":true,"efforts":["none","low","medium","high"],"input":["text","image","pdf"]},+ "x-ai/grok-4.5": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image","pdf"]},+ "x-ai/grok-4.6": {"reasoning":true,"efforts":["low","medium","high","xhigh"],"input":["text","image","pdf"]},+ "x-ai/grok-build-0.1": {"reasoning":true,"input":["text","image","pdf"]},+ "xiaomi/mimo-v2.5": {"reasoning":true,"toggle":true,"input":["text","image","audio","video"]},+ "xiaomi/mimo-v2.5-pro": {"reasoning":true,"toggle":true,"input":["text"]},+ "z-ai/glm-4.5": {"reasoning":true,"toggle":true,"input":["text"]},+ "z-ai/glm-4.5-air": {"reasoning":true,"toggle":true,"input":["text"]},+ "z-ai/glm-4.5v": {"reasoning":true,"toggle":true,"input":["text","image"]},+ "z-ai/glm-4.6": {"reasoning":true,"toggle":true,"input":["text"]},+ "z-ai/glm-4.6v": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "z-ai/glm-4.7": {"reasoning":true,"toggle":true,"input":["text"]},+ "z-ai/glm-4.7-flash": {"reasoning":true,"toggle":true,"input":["text"]},+ "z-ai/glm-5": {"reasoning":true,"toggle":true,"input":["text"]},+ "z-ai/glm-5-turbo": {"reasoning":true,"toggle":true,"input":["text"]},+ "z-ai/glm-5.1": {"reasoning":true,"toggle":true,"input":["text"]},+ "z-ai/glm-5.2": {"reasoning":true,"efforts":["high","xhigh"],"toggle":true,"input":["text"]},+ "z-ai/glm-5.3": {"reasoning":true,"efforts":["low","high","max"],"input":["text"]},+ "z-ai/glm-5.3-flash": {"reasoning":true,"efforts":["low","high","max"],"input":["text","image","video"]},+ "z-ai/glm-5v-turbo": {"reasoning":true,"toggle":true,"input":["image","text","video"]},+ },+ "gemini": {+ "deep-research-max-preview-04-2026": {"reasoning":true,"input":["text","image","video","audio","pdf"]},+ "deep-research-preview-04-2026": {"reasoning":true,"input":["text","image","video","audio","pdf"]},+ "gemini-2.5-computer-use-preview-10-2025": {"reasoning":true,"input":["text","image"]},+ "gemini-2.5-flash": {"reasoning":true,"toggle":true,"input":["text","image","audio","video","pdf"]},+ "gemini-2.5-flash-image": {"reasoning":true,"input":["text","image"]},+ "gemini-2.5-flash-lite": {"reasoning":true,"toggle":true,"input":["text","image","audio","video","pdf"]},+ "gemini-2.5-flash-preview-tts": {"input":["text"]},+ "gemini-2.5-pro": {"reasoning":true,"input":["text","image","audio","video","pdf"]},+ "gemini-2.5-pro-preview-tts": {"input":["text"]},+ "gemini-3-flash-preview": {"reasoning":true,"efforts":["minimal","low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "gemini-3-pro-image": {"reasoning":true,"efforts":["low","high"],"input":["text","image"]},+ "gemini-3-pro-image-preview": {"reasoning":true,"input":["text","image"]},+ "gemini-3.1-flash-image": {"reasoning":true,"efforts":["minimal","high"],"input":["text","image","video","pdf"]},+ "gemini-3.1-flash-image-preview": {"reasoning":true,"efforts":["minimal","high"],"input":["text","image","pdf"]},+ "gemini-3.1-flash-lite": {"reasoning":true,"efforts":["minimal","low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "gemini-3.1-flash-lite-image": {"reasoning":true,"efforts":["minimal","high"],"input":["text","image"]},+ "gemini-3.1-flash-lite-preview": {"reasoning":true,"efforts":["minimal","low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "gemini-3.1-flash-live-preview": {"reasoning":true,"efforts":["minimal","low","medium","high"],"input":["text","image","video","audio"]},+ "gemini-3.1-flash-tts-preview": {"reasoning":true,"input":["text"]},+ "gemini-3.1-pro-preview": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "gemini-3.1-pro-preview-customtools": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "gemini-3.5-flash": {"reasoning":true,"efforts":["minimal","low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "gemini-3.5-flash-lite": {"reasoning":true,"efforts":["minimal","low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "gemini-3.5-live-translate-preview": {"input":["audio"]},+ "gemini-3.6-flash": {"reasoning":true,"efforts":["minimal","low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "gemini-3.7-flash": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "gemini-3.8-flash": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "gemini-embedding-001": {"input":["text"]},+ "gemini-embedding-2": {"input":["text","image","audio","video","pdf"]},+ "gemini-flash-latest": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "gemini-flash-lite-latest": {"reasoning":true,"efforts":["minimal","low","medium","high"],"input":["text","image","video","audio","pdf"]},+ "gemini-omni-flash-preview": {"reasoning":true,"input":["text","image","video"]},+ "gemma-4-26b-a4b-it": {"reasoning":true,"toggle":true,"input":["text","image"]},+ "gemma-4-31b-it": {"reasoning":true,"toggle":true,"input":["text","image"]},+ "lyria-3-clip-preview": {"input":["text","image"]},+ "lyria-3-pro-preview": {"input":["text","image"]},+ "veo-3.1-fast-generate-preview": {"input":["text","image","video"]},+ "veo-3.1-generate-preview": {"input":["text","image"]},+ "veo-3.1-lite-generate-preview": {"input":["text","image"]},+ },+ "mistral": {+ "codestral-latest": {"input":["text"]},+ "devstral-2512": {"input":["text"]},+ "devstral-latest": {"input":["text"]},+ "devstral-medium-2507": {"input":["text"]},+ "devstral-medium-latest": {"input":["text"]},+ "devstral-small-2505": {"input":["text"]},+ "devstral-small-2507": {"input":["text"]},+ "labs-devstral-small-2512": {"input":["text","image"]},+ "magistral-medium-latest": {"reasoning":true,"input":["text"]},+ "magistral-small": {"reasoning":true,"input":["text"]},+ "ministral-3b-latest": {"input":["text"]},+ "ministral-8b-latest": {"input":["text"]},+ "mistral-embed": {"input":["text"]},+ "mistral-large-2411": {"input":["text"]},+ "mistral-large-2512": {"input":["text","image"]},+ "mistral-large-latest": {"input":["text","image"]},+ "mistral-medium-2505": {"input":["text","image"]},+ "mistral-medium-2508": {"input":["text","image"]},+ "mistral-medium-2604": {"reasoning":true,"efforts":["none","high"],"input":["text","image"]},+ "mistral-medium-latest": {"reasoning":true,"efforts":["none","high"],"input":["text","image"]},+ "mistral-nemo": {"input":["text"]},+ "mistral-small-2506": {"input":["text","image"]},+ "mistral-small-2603": {"reasoning":true,"efforts":["none","high"],"input":["text","image"]},+ "mistral-small-latest": {"reasoning":true,"efforts":["none","high"],"input":["text","image"]},+ "open-mistral-7b": {"input":["text"]},+ "open-mistral-nemo": {"input":["text"]},+ "open-mixtral-8x22b": {"input":["text"]},+ "open-mixtral-8x7b": {"input":["text"]},+ "pixtral-12b": {"input":["text","image"]},+ "pixtral-large-latest": {"input":["text","image"]},+ "voxtral-mini-latest": {"input":["audio"]},+ "voxtral-mini-tts-latest": {"input":["text"]},+ "voxtral-small-latest": {"input":["text","audio"]},+ "zai-glm-5-2": {"reasoning":true,"efforts":["high","max"],"input":["text"]},+ },+ "deepseek": {+ "deepseek-flash": {"reasoning":true,"efforts":["low","high","max"],"toggle":true,"input":["text","image"]},+ "deepseek-v4-flash": {"reasoning":true,"efforts":["low","high","max"],"toggle":true,"input":["text","image"]},+ "deepseek-v4-flash-vision-exp": {"reasoning":true,"efforts":["low","high","max"],"toggle":true,"input":["text","image"]},+ "deepseek-v4-pro": {"reasoning":true,"efforts":["high","max"],"toggle":true,"input":["text"]},+ },+ "kimi": {+ "kimi-k2.6": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "kimi-k2.7-code": {"reasoning":true,"input":["text","image","video"]},+ "kimi-k2.7-code-highspeed": {"reasoning":true,"input":["text","image","video"]},+ "kimi-k3": {"reasoning":true,"efforts":["low","high","max"],"toggle":true,"input":["text","image","video"]},+ },+ "cohere": {+ "c4ai-aya-expanse-32b": {"input":["text"]},+ "c4ai-aya-expanse-8b": {"input":["text"]},+ "c4ai-aya-vision-32b": {"input":["text","image"]},+ "c4ai-aya-vision-8b": {"input":["text","image"]},+ "command-a-03-2025": {"input":["text"]},+ "command-a-plus-05-2026": {"reasoning":true,"toggle":true,"input":["text","image"]},+ "command-a-reasoning-08-2025": {"reasoning":true,"toggle":true,"input":["text"]},+ "command-a-translate-08-2025": {"input":["text"]},+ "command-a-vision-07-2025": {"input":["text","image"]},+ "command-r-08-2024": {"input":["text"]},+ "command-r-plus-08-2024": {"input":["text"]},+ "command-r7b-12-2024": {"input":["text"]},+ "command-r7b-arabic-02-2025": {"input":["text"]},+ "north-mini-code-1-0": {"reasoning":true,"efforts":["none","high"],"input":["text"]},+ },+ "huggingface": {+ "deepseek-ai/deepseek-r1": {"reasoning":true,"input":["text"]},+ "deepseek-ai/deepseek-r1-0528": {"reasoning":true,"input":["text"]},+ "deepseek-ai/deepseek-v3": {"input":["text"]},+ "deepseek-ai/deepseek-v3-0324": {"input":["text"]},+ "deepseek-ai/deepseek-v3.1": {"reasoning":true,"input":["text"]},+ "deepseek-ai/deepseek-v3.2": {"reasoning":true,"input":["text"]},+ "deepseek-ai/deepseek-v4-flash": {"reasoning":true,"input":["text"]},+ "deepseek-ai/deepseek-v4-flash-0731": {"reasoning":true,"efforts":["high","max"],"input":["text"]},+ "deepseek-ai/deepseek-v4-flash-vision-exp": {"reasoning":true,"efforts":["low","high","max"],"input":["text","image"]},+ "deepseek-ai/deepseek-v4-pro": {"reasoning":true,"efforts":["high"],"input":["text"]},+ "deepseek-ai/deepseek-v4-pro-0813": {"reasoning":true,"efforts":["low","high","max"],"input":["text"]},+ "deepseek-ai/deepseek-v4.1-flash": {"reasoning":true,"efforts":["none","low","high","xhigh","max"],"input":["text","image"]},+ "google/gemma-3-12b-it": {"input":["text","image"]},+ "google/gemma-3-27b-it": {"input":["text","image"]},+ "google/gemma-3-4b-it": {"input":["text","image"]},+ "google/gemma-4-26b-a4b-it": {"reasoning":true,"input":["text","image"]},+ "google/gemma-4-31b-it": {"reasoning":true,"input":["text","image"]},+ "meta-llama/llama-3.1-8b-instruct": {"input":["text"]},+ "meta-llama/llama-3.3-70b-instruct": {"input":["text"]},+ "minimaxai/minimax-m2": {"reasoning":true,"input":["text"]},+ "minimaxai/minimax-m2.1": {"reasoning":true,"input":["text"]},+ "minimaxai/minimax-m2.5": {"reasoning":true,"input":["text"]},+ "minimaxai/minimax-m2.7": {"reasoning":true,"input":["text"]},+ "minimaxai/minimax-m3": {"reasoning":true,"input":["text","image"]},+ "moonshotai/kimi-k2-instruct": {"input":["text"]},+ "moonshotai/kimi-k2-instruct-0905": {"input":["text"]},+ "moonshotai/kimi-k2-thinking": {"reasoning":true,"input":["text"]},+ "moonshotai/kimi-k2.5": {"reasoning":true,"input":["text","image","video"]},+ "moonshotai/kimi-k2.6": {"reasoning":true,"input":["text","image","video"]},+ "moonshotai/kimi-k2.7-code": {"reasoning":true,"input":["text","image"]},+ "moonshotai/kimi-k3": {"reasoning":true,"efforts":["low","high","max"],"input":["text","image"]},+ "openai/gpt-oss-120b": {"reasoning":true,"efforts":["low","medium","high"],"input":["text"]},+ "openai/gpt-oss-20b": {"reasoning":true,"efforts":["low","medium","high"],"input":["text"]},+ "qwen/qwen2.5-coder-32b-instruct": {"input":["text"]},+ "qwen/qwen3-235b-a22b": {"reasoning":true,"input":["text"]},+ "qwen/qwen3-235b-a22b-instruct-2507": {"input":["text"]},+ "qwen/qwen3-235b-a22b-thinking-2507": {"reasoning":true,"input":["text"]},+ "qwen/qwen3-30b-a3b": {"reasoning":true,"input":["text"]},+ "qwen/qwen3-32b": {"reasoning":true,"input":["text"]},+ "qwen/qwen3-coder-30b-a3b-instruct": {"input":["text"]},+ "qwen/qwen3-coder-480b-a35b-instruct": {"input":["text"]},+ "qwen/qwen3-coder-next": {"input":["text"]},+ "qwen/qwen3-embedding-4b": {"input":["text"]},+ "qwen/qwen3-embedding-8b": {"input":["text"]},+ "qwen/qwen3-next-80b-a3b-instruct": {"input":["text"]},+ "qwen/qwen3-next-80b-a3b-thinking": {"input":["text"]},+ "qwen/qwen3-vl-235b-a22b-instruct": {"input":["text","image"]},+ "qwen/qwen3-vl-235b-a22b-thinking": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image"]},+ "qwen/qwen3.5-122b-a10b": {"reasoning":true,"input":["text","image"]},+ "qwen/qwen3.5-27b": {"reasoning":true,"input":["text","image"]},+ "qwen/qwen3.5-35b-a3b": {"reasoning":true,"input":["text","image"]},+ "qwen/qwen3.5-397b-a17b": {"reasoning":true,"efforts":["none","low","medium","high"],"input":["text","image"]},+ "qwen/qwen3.5-9b": {"reasoning":true,"input":["text","image"]},+ "qwen/qwen3.6-27b": {"reasoning":true,"input":["text","image"]},+ "qwen/qwen3.6-35b-a3b": {"reasoning":true,"input":["text","image"]},+ "qwen/qwen3.8-2.4t-a95b": {"reasoning":true,"efforts":["low","medium","xhigh"],"input":["text"]},+ "qwen/qwen3.8-27b": {"reasoning":true,"efforts":["low","medium","xhigh"],"input":["text","image"]},+ "stepfun-ai/step-3.5-flash": {"reasoning":true,"input":["text"]},+ "stepfun-ai/step-3.7-flash": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image","video"]},+ "tencent/hy3": {"reasoning":true,"efforts":["none","low","high"],"input":["text"]},+ "thinkingmachines/inkling": {"reasoning":true,"efforts":["low","medium","high"],"input":["text","image"]},+ "thinkingmachines/inkling-small": {"reasoning":true,"input":["text","image"]},+ "xiaomimimo/mimo-v2-flash": {"reasoning":true,"input":["text"]},+ "xiaomimimo/mimo-v2.5": {"reasoning":true,"efforts":["none","low","medium","high","xhigh"],"toggle":true,"input":["text"]},+ "xiaomimimo/mimo-v2.5-pro": {"reasoning":true,"efforts":["none","low","medium","high","xhigh"],"toggle":true,"input":["text"]},+ "zai-org/glm-4.5": {"reasoning":true,"input":["text"]},+ "zai-org/glm-4.5-air": {"reasoning":true,"input":["text"]},+ "zai-org/glm-4.5v": {"reasoning":true,"input":["text","image"]},+ "zai-org/glm-4.6": {"reasoning":true,"input":["text"]},+ "zai-org/glm-4.6v-flash": {"reasoning":true,"toggle":true,"input":["text","image"]},+ "zai-org/glm-4.7": {"reasoning":true,"input":["text"]},+ "zai-org/glm-4.7-flash": {"reasoning":true,"input":["text"]},+ "zai-org/glm-5": {"reasoning":true,"input":["text"]},+ "zai-org/glm-5.1": {"reasoning":true,"input":["text"]},+ "zai-org/glm-5.2": {"reasoning":true,"input":["text"]},+ "zai-org/glm-5.3": {"reasoning":true,"efforts":["low","high","max"],"input":["text"]},+ "zai-org/glm-5.3-flash": {"reasoning":true,"efforts":["low","high","max"],"input":["text","image"]},+ },+ "qwen": {+ "deepseek-v4-flash-0731": {"reasoning":true,"efforts":["high","max"],"toggle":true,"input":["text"]},+ "glm-5.2": {"reasoning":true,"efforts":["none","minimal","low","medium","high","xhigh","max"],"input":["text"]},+ "qvq-max": {"reasoning":true,"input":["text","image"]},+ "qwen-flash": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen-max": {"input":["text"]},+ "qwen-mt-plus": {"input":["text"]},+ "qwen-mt-turbo": {"input":["text"]},+ "qwen-omni-turbo": {"input":["text","image","audio","video"]},+ "qwen-omni-turbo-realtime": {"input":["text","image","audio"]},+ "qwen-plus": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen-plus-character-ja": {"input":["text"]},+ "qwen-turbo": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen-vl-max": {"input":["text","image"]},+ "qwen-vl-ocr": {"input":["text","image"]},+ "qwen-vl-plus": {"input":["text","image"]},+ "qwen2-5-14b-instruct": {"input":["text"]},+ "qwen2-5-32b-instruct": {"input":["text"]},+ "qwen2-5-72b-instruct": {"input":["text"]},+ "qwen2-5-7b-instruct": {"input":["text"]},+ "qwen2-5-omni-7b": {"input":["text","image","audio","video"]},+ "qwen2-5-vl-72b-instruct": {"input":["text","image"]},+ "qwen2-5-vl-7b-instruct": {"input":["text","image"]},+ "qwen3-14b": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen3-235b-a22b": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen3-32b": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen3-8b": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen3-asr-flash": {"input":["audio"]},+ "qwen3-coder-30b-a3b-instruct": {"input":["text"]},+ "qwen3-coder-480b-a35b-instruct": {"input":["text"]},+ "qwen3-coder-flash": {"input":["text"]},+ "qwen3-coder-plus": {"input":["text"]},+ "qwen3-livetranslate-flash-realtime": {"input":["text","image","audio","video"]},+ "qwen3-max": {"input":["text"]},+ "qwen3-next-80b-a3b-instruct": {"input":["text"]},+ "qwen3-next-80b-a3b-thinking": {"reasoning":true,"input":["text"]},+ "qwen3-omni-flash": {"reasoning":true,"toggle":true,"input":["text","image","audio","video"]},+ "qwen3-omni-flash-realtime": {"input":["text","image","audio","video"]},+ "qwen3-vl-235b-a22b": {"reasoning":true,"input":["text","image"]},+ "qwen3-vl-30b-a3b": {"reasoning":true,"input":["text","image"]},+ "qwen3-vl-plus": {"reasoning":true,"toggle":true,"input":["text","image"]},+ "qwen3.5-122b-a10b": {"reasoning":true,"toggle":true,"input":["text","image","video","audio"]},+ "qwen3.5-27b": {"reasoning":true,"toggle":true,"input":["text","image","video","audio"]},+ "qwen3.5-35b-a3b": {"reasoning":true,"toggle":true,"input":["text","image","video","audio"]},+ "qwen3.5-397b-a17b": {"reasoning":true,"toggle":true,"input":["text","image","video","audio"]},+ "qwen3.5-plus": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "qwen3.6-27b": {"reasoning":true,"toggle":true,"input":["text","image","video","audio"]},+ "qwen3.6-35b-a3b": {"reasoning":true,"toggle":true,"input":["text","image","video","audio"]},+ "qwen3.6-flash": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "qwen3.6-max-preview": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen3.6-plus": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "qwen3.7-max": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen3.7-plus": {"reasoning":true,"toggle":true,"input":["text","image","video"]},+ "qwen3.8-flash": {"reasoning":true,"efforts":["low","medium","xhigh"],"toggle":true,"input":["text","image","video"]},+ "qwen3.8-max": {"reasoning":true,"efforts":["low","medium","xhigh"],"toggle":true,"input":["text","image","video","pdf"]},+ "qwq-plus": {"reasoning":true,"input":["text"]},+ },+ "ollama": {+ "deepseek-v4-flash": {"reasoning":true,"efforts":["high","max"],"toggle":true,"input":["text"]},+ "deepseek-v4-flash:0731": {"reasoning":true,"efforts":["high","max"],"toggle":true,"input":["text"]},+ "deepseek-v4-pro": {"reasoning":true,"efforts":["high","max"],"toggle":true,"input":["text"]},+ "deepseek-v4-pro:0813": {"reasoning":true,"efforts":["high","max"],"toggle":true,"input":["text"]},+ "deepseek-v4.1-flash": {"reasoning":true,"efforts":["low","high","max"],"toggle":true,"input":["text","image"]},+ "gemma4:31b": {"reasoning":true,"toggle":true,"input":["text","image"]},+ "glm-5.1": {"reasoning":true,"toggle":true,"input":["text"]},+ "glm-5.2": {"reasoning":true,"efforts":["high","max"],"input":["text"]},+ "glm-5.3": {"reasoning":true,"efforts":["low","high","max"],"input":["text"]},+ "glm-5.3-flash": {"reasoning":true,"efforts":["low","high","max"],"input":["text","image","video","pdf"]},+ "gpt-oss:120b": {"reasoning":true,"efforts":["low","medium","high"],"input":["text"]},+ "gpt-oss:20b": {"reasoning":true,"efforts":["low","medium","high"],"input":["text"]},+ "kimi-k2.5": {"reasoning":true,"toggle":true,"input":["text","image"]},+ "kimi-k2.6": {"reasoning":true,"toggle":true,"input":["text","image"]},+ "kimi-k2.7-code": {"reasoning":true,"toggle":true,"input":["text","image"]},+ "kimi-k3": {"reasoning":true,"efforts":["low","high","max"],"toggle":true,"input":["text","image"]},+ "minimax-m2.5": {"reasoning":true,"input":["text"]},+ "minimax-m2.7": {"reasoning":true,"toggle":true,"input":["text"]},+ "minimax-m3": {"reasoning":true,"efforts":["low","medium","high","max"],"toggle":true,"input":["text","image","video"]},+ "mistral-large-3:675b": {"input":["text","image"]},+ "nemotron-3-nano:30b": {"reasoning":true,"toggle":true,"input":["text"]},+ "nemotron-3-super": {"reasoning":true,"toggle":true,"input":["text"]},+ "nemotron-3-ultra": {"reasoning":true,"toggle":true,"input":["text"]},+ "qwen3.5:397b": {"reasoning":true,"toggle":true,"input":["text","image"]},+ },+ "lmstudio": {+ "openai/gpt-oss-20b": {"reasoning":true,"efforts":["low","medium","high"],"input":["text"]},+ "qwen/qwen3-30b-a3b-2507": {"input":["text"]},+ "qwen/qwen3-coder-30b": {"input":["text"]},+ },+};diff --git a/studio/frontend/src/features/chat/model-catalog.ts b/studio/frontend/src/features/chat/model-catalog.tsindex ec2bfdc6e85..9fae61b5791 100644--- a/studio/frontend/src/features/chat/model-catalog.ts+++ b/studio/frontend/src/features/chat/model-catalog.ts@@ -1,7 +1,11 @@// SPDX-License-Identifier: AGPL-3.0-only// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0-import type { ProviderModelCapabilityInfo } from "./api/providers-api";+import type { ModelCatalogResponse, ProviderModelCapabilityInfo } from "./api/providers-api";+import {+ MODEL_CATALOG_SNAPSHOT,+ type ModelCatalogSnapshotEntry,+} from "./model-catalog-snapshot.ts";export type ReasoningEffortLevel =| "none"@@ -42,6 +46,10 @@ const LIVE_CATALOG_KEY = "unsloth_chat_provider_model_catalog";const LIVE_CATALOG = new Map<string, LiveCatalogRecord>();let liveCatalogHydrated = false;+const MODELS_DEV_KEY = "unsloth_chat_models_dev_catalog";+let modelsDev: ModelCatalogResponse | null = null;+let modelsDevHydrated = false;+const catalogListeners = new Set<() => void>();let catalogVersion = 0;@@ -119,6 +127,67 @@ function persistLiveCatalog(): void {}}+function hydrateModelsDev(): void {+ if (modelsDevHydrated) return;+ modelsDevHydrated = true;+ if (!canUseStorage()) return;+ try {+ const parsed = JSON.parse(localStorage.getItem(MODELS_DEV_KEY) ?? "null") as ModelCatalogResponse | null;+ if (+ parsed &&+ typeof parsed === "object" &&+ typeof parsed.fetched_at === "number" &&+ parsed.providers &&+ typeof parsed.providers === "object"+ ) {+ modelsDev = parsed;+ }+ } catch {+ // Invalid browser state; the next refresh rewrites it.+ }+}++export function setModelsDevCatalog(catalog: ModelCatalogResponse): void {+ hydrateModelsDev();+ modelsDev = catalog;+ nameIndex = null;+ familyIndex = null;+ mergedNamespaces = null;+ notifyCatalogChange();+ if (!canUseStorage()) return;+ try {+ localStorage.setItem(MODELS_DEV_KEY, JSON.stringify(catalog));+ } catch {+ // Storage failures leave the in-memory copy valid for this session.+ }+}++export function modelsDevCatalogFetchedAt(): number | null {+ hydrateModelsDev();+ return modelsDev?.fetched_at ?? null;+}++// Merged namespaces, rebuilt whenever a served catalog lands.+let mergedNamespaces: Map<string, Readonly<Record<string, ModelCatalogSnapshotEntry>>> | null = null;++function snapshotNamespace(+ providerType: string,+): Readonly<Record<string, ModelCatalogSnapshotEntry>> | undefined {+ hydrateModelsDev();+ const served = modelsDev?.providers[providerType];+ const bundled = MODEL_CATALOG_SNAPSHOT[providerType];+ if (!served) return bundled;+ if (!bundled) return served;+ // Per MODEL, not per namespace: a cache that survived an upgrade, or the expired copy served+ // offline, would otherwise hide models the newer bundled snapshot knows.+ if (!mergedNamespaces) mergedNamespaces = new Map();+ const cached = mergedNamespaces.get(providerType);+ if (cached) return cached;+ const merged = { ...bundled, ...served };+ mergedNamespaces.set(providerType, merged);+ return merged;+}+function fromLiveModel(model: ProviderModelCapabilityInfo): ModelCatalogEntry {const reasoning = model.reasoning ?? null;const defaultEffort = reasoning?.default_effort;@@ -137,6 +206,20 @@ function fromLiveModel(model: ProviderModelCapabilityInfo): ModelCatalogEntry {};}+function fromSnapshotEntry(entry: ModelCatalogSnapshotEntry): ModelCatalogEntry {+ const reasoning = entry.reasoning === true;+ const efforts = sortReasoningEfforts(entry.efforts ?? []);+ return {+ reasoning,+ efforts,+ mandatory:+ reasoning && entry.toggle !== true && !efforts.includes("none"),+ defaultEffort: null,+ inputModalities: entry.input ?? null,+ maxOutputTokens: null,+ };+}+export function setProviderModelCatalog(providerType: string,models: readonly ProviderModelCapabilityInfo[],@@ -175,9 +258,24 @@ function lookupCandidates(providerType: string, modelId: string): string[] {const variant = bare.indexOf(":");if (variant > 0) candidates.push(bare.slice(0, variant));}+ if (providerType === "ollama") {+ const tag = normalized.indexOf(":");+ if (tag > 0) candidates.push(normalized.slice(0, tag));+ }return candidates;}+function findByBaseName(+ models: Readonly<Record<string, unknown>>,+ baseName: string,+): string | null {+ for (const id of Object.keys(models)) {+ const tag = id.indexOf(":");+ if ((tag > 0 ? id.slice(0, tag) : id) === baseName) return id;+ }+ return null;+}+export function resolveModelCatalogEntry(providerType: string | null | undefined,modelId: string | null | undefined,@@ -194,9 +292,79 @@ export function resolveModelCatalogEntry(if (entry) return entry;}}+ const snapshot = snapshotNamespace(normalizedProvider);+ if (!snapshot) return null;+ for (const candidate of candidates) {+ const entry = snapshot[candidate];+ if (entry) return fromSnapshotEntry(entry);+ }+ if (normalizedProvider === "ollama") {+ // An instruct-only tag has no thinking even when a sibling does, and Ollama 400s a thinking request on it.+ if (modelId.toLowerCase().includes("instruct")) return null;+ const match = findByBaseName(snapshot, candidates[candidates.length - 1]);+ if (match) return fromSnapshotEntry(snapshot[match]);+ return resolveModelCatalogEntryByName(modelId);+ }return null;}+const NAME_INDEX_NAMESPACES = [+ "openrouter",+ "huggingface",+ "lmstudio",+ "ollama",+ "openai",+ "deepseek",+ "qwen",+ "kimi",+ "mistral",+ "gemini",+ "anthropic",+];+let nameIndex: Map<string, ModelCatalogSnapshotEntry> | null = null;+let familyIndex: Map<string, ModelCatalogSnapshotEntry> | null = null;++function bareModelName(modelId: string): string {+ let name = modelId.trim().toLowerCase();+ name = name.split("/").at(-1) ?? name;+ name = name.replace(/\.gguf$/, "");+ const tag = name.indexOf(":");+ if (tag > 0) name = name.slice(0, tag);+ return name.replace(/-(?:ud-)?(?:i?q\d[a-z0-9_]*|f16|bf16|fp16|fp8)$/, "");+}++function modelFamily(bareName: string): string {+ return bareName+ .split("-")+ .filter((part) => !/^(?:\d+(?:\.\d+)?[bm]|a\d+b)$/.test(part))+ .join("-");+}++function buildNameIndexes(): void {+ nameIndex = new Map();+ familyIndex = new Map();+ for (const namespace of NAME_INDEX_NAMESPACES) {+ const models = snapshotNamespace(namespace);+ if (!models) continue;+ for (const [id, entry] of Object.entries(models)) {+ const name = bareModelName(id);+ if (!nameIndex.has(name)) nameIndex.set(name, entry);+ const family = modelFamily(name);+ if (family !== name && !familyIndex.has(family)) familyIndex.set(family, entry);+ }+ }+}++export function resolveModelCatalogEntryByName(+ modelId: string | null | undefined,+): ModelCatalogEntry | null {+ if (!modelId) return null;+ if (!nameIndex || !familyIndex) buildNameIndexes();+ const name = bareModelName(modelId);+ const entry = nameIndex?.get(name) ?? familyIndex?.get(modelFamily(name));+ return entry ? fromSnapshotEntry(entry) : null;+}+export function modelCatalogSupportsVision(providerType: string | null | undefined,modelId: string | null | undefined,diff --git a/studio/frontend/src/features/chat/provider-capabilities.ts b/studio/frontend/src/features/chat/provider-capabilities.tsindex 2e825d4f1a2..ae04c225c61 100644--- a/studio/frontend/src/features/chat/provider-capabilities.ts+++ b/studio/frontend/src/features/chat/provider-capabilities.ts@@ -10,6 +10,7 @@ import {REASONING_EFFORT_SCALE,type ReasoningEffortLevel,resolveModelCatalogEntry,+ resolveModelCatalogEntryByName,sortReasoningEfforts,} from "./model-catalog";@@ -170,7 +171,7 @@ const EXTERNAL_MAX_OUTPUT_TOKENS_BY_MODEL: Array<{prefixes: ["gemini-3", "gemini-pro", "gemini-flash"],cap: 65536,},- // DeepSeek (V4: deepseek-chat / deepseek-reasoner alias V4-flash).+ // DeepSeek (deepseek-flash / deepseek-v4-pro).{ providerType: "deepseek", prefixes: ["deepseek"], cap: 384000 },];@@ -709,13 +710,36 @@ const ANTHROPIC_REASONING_MODELS = [supportsOff: true,levels: ["none", "low", "medium", "high"],},+ {+ // Earlier Claude 4 and 3.7 Sonnet: manual budget_tokens only, after the 4-5..4-8 entries so+ // those match first. models.dev has no entry for these ids, so the catalog cannot cover them.+ prefixes: [+ "claude-opus-4-1",+ "claude-opus-4-0",+ "claude-opus-4-2025",+ "claude-sonnet-4-0",+ "claude-sonnet-4-2025",+ "claude-3-7-sonnet",+ ],+ supportsOff: true,+ levels: ["none", "low", "medium", "high"],+ },] as const;function matchesModelPrefix(modelId: string,prefixes: readonly string[],): boolean {- return prefixes.some((prefix) => modelId.startsWith(prefix));+ // Mirrors `_anthropic_spec_prefix_matches` in external_provider.py: a version prefix stops at a+ // boundary, a date-truncated one ("claude-opus-4-2025") runs on.+ return prefixes.some((prefix) => {+ if (modelId === prefix) return true;+ if (!modelId.startsWith(prefix)) return false;+ const rest = modelId.slice(prefix.length);+ if (rest.startsWith("-")) return true;+ const trailingDigits = /\d+$/.exec(prefix)?.[0] ?? "";+ return trailingDigits.length >= 4 && /^\d/.test(rest);+ });}function resolveAnthropicReasoningEffortCapabilities(modelId: string): ReasoningCaps {@@ -1005,10 +1029,28 @@ type ReasoningWire = {off: "unified" | "none-level";};-/** What the OpenRouter branch in external_provider.py can put on the wire: the whole effort scale, with one- * unified off switch. */+const LOCAL_SERVER_WIRE: ReasoningWire = {+ levels: ["low", "medium", "high"],+ aliases: { minimal: "low", xhigh: "high", max: "high" },+ off: "unified",+};++/** What each backend branch in external_provider.py can put on the wire. `levels: null` forwards+ * the whole scale; `levels: []` means the provider only has an on/off switch. */const CATALOG_REASONING_WIRE: Record<string, ReasoningWire> = {openrouter: { levels: null, off: "unified" },+ openai: { levels: null, off: "none-level" },+ openai_codex: { levels: null, off: "none-level" },+ anthropic: { levels: null, off: "unified" },+ gemini: { levels: ["minimal", "low", "medium", "high", "xhigh", "max"], off: "unified" },+ mistral: { levels: ["high"], off: "unified" },+ kimi: { levels: [], off: "unified" },+ deepseek: { levels: ["low", "high", "max"], aliases: { minimal: "low", medium: "high", xhigh: "high" }, off: "unified" },+ qwen: { levels: [], off: "unified" },+ huggingface: { levels: null, off: "unified" },+ ollama: { levels: null, off: "unified" },+ vllm: LOCAL_SERVER_WIRE,+ llama_cpp: LOCAL_SERVER_WIRE,};function projectCatalogEntry(@@ -1045,6 +1087,9 @@ function projectCatalogEntry(supportsReasoningOff: supportsOff,reasoningEffortLevels: ladder,}),+ // After the spread: withReasoningEffortStyle hardcodes reasoningAlwaysOn to false, so a+ // mandatory catalog model with an effort ladder would lose its always-on state.+ reasoningAlwaysOn: entry.mandatory,defaultEffort,};}@@ -1052,10 +1097,13 @@ function projectCatalogEntry(function catalogCapabilities(providerType: string,modelId: string,+ byName = false,): ExternalReasoningCapabilities | null {const wire = CATALOG_REASONING_WIRE[providerType];if (!wire) return null;- const entry = resolveModelCatalogEntry(providerType, modelId);+ const entry = byName+ ? resolveModelCatalogEntryByName(modelId)+ : resolveModelCatalogEntry(providerType, modelId);return entry ? projectCatalogEntry(entry, wire) : null;}@@ -1067,8 +1115,8 @@ const OPENROUTER_GENERIC_TOGGLE: ExternalReasoningCapabilities = {reasoningEffortLevels: DEFAULT_EFFORT_LEVELS,};-/** Resolve external-model thinking capabilities: the connection pin, then the live OpenRouter catalog for- * OpenRouter routes, then the hand-maintained per-provider tables; anything else has no reasoning controls. */+/** Resolve external-model thinking capabilities: the connection pin, then the hand-maintained+ * provider tables, then the model catalog (live OpenRouter data or the models.dev snapshot). */export function getExternalReasoningCapabilities(providerType: string | null | undefined,modelId: string | null | undefined,@@ -1108,36 +1156,67 @@ export function getExternalReasoningCapabilities(? normalizedModel.split("/").at(-1) ?? normalizedModel: normalizedModel;- const isOpenAIProvider =- normalizedProvider === "openai" || normalizedProvider === "openai_codex";- const isAnthropicProvider = normalizedProvider === "anthropic";- if (normalizedProvider === "openrouter") {- // OpenRouter's unified `reasoning` param is accepted everywhere and no-ops for non-reasoning- // models, so a route the live catalog does not know still gets a toggleable control.- return OPENROUTER_GENERIC_TOGGLE;- }- if (normalizedProvider === "kimi") return resolveKimiReasoningCapabilities(modelForMatching);- if (normalizedProvider === "mistral") return resolveMistralReasoningCapabilities(modelForMatching);- if (normalizedProvider === "gemini") {- // Custom Gemini OAI-compat gateways route through /chat/completions, which drops the native- // thinkingConfig payload, so hide the ladder.- if (isGeminiCustomOpenAICompatBase(options?.baseUrl)) {- return withEnableThinkingStyle();+ switch (normalizedProvider) {+ case "openrouter": {+ // OpenRouter's unified `reasoning` param is accepted everywhere and no-ops for non-reasoning+ // models, so a route the live catalog does not know still gets a toggleable control. The+ // catalog lookup itself already ran above.+ return OPENROUTER_GENERIC_TOGGLE;}- return resolveGeminiReasoningCapabilities(modelForMatching);- }- if (!isOpenAIProvider && !isAnthropicProvider) {- return withEnableThinkingStyle();- }-- const providerCaps = isOpenAIProvider- ? resolveOpenAIReasoningEffortCapabilities(modelForMatching)- : resolveAnthropicReasoningEffortCapabilities(modelForMatching);- if (providerCaps.supportsReasoning) {- return withReasoningEffortStyle(providerCaps);+ case "kimi": {+ const table = resolveKimiReasoningCapabilities(modelForMatching);+ return table.supportsReasoning+ ? table+ : (catalogCapabilities("kimi", normalizedModel) ?? table);+ }+ case "mistral": {+ const table = resolveMistralReasoningCapabilities(modelForMatching);+ return table.supportsReasoning+ ? table+ : (catalogCapabilities("mistral", normalizedModel) ?? table);+ }+ case "gemini": {+ // Custom Gemini OAI-compat gateways route through /chat/completions, which drops the native+ // thinkingConfig payload, so hide the ladder.+ if (isGeminiCustomOpenAICompatBase(options?.baseUrl)) {+ return withEnableThinkingStyle();+ }+ const table = resolveGeminiReasoningCapabilities(modelForMatching);+ // Image models take no thinkingConfig (the backend strips it), so the table's "no control" is deliberate.+ if (table.supportsReasoning || GEMINI_IMAGE_HINTS.some((hint) => normalizedModel.includes(hint))) {+ return table;+ }+ return catalogCapabilities("gemini", normalizedModel) ?? table;+ }+ case "ollama":+ case "deepseek":+ case "qwen":+ case "huggingface":+ return catalogCapabilities(normalizedProvider, normalizedModel) ?? withEnableThinkingStyle();+ case "vllm":+ case "llama_cpp":+ return catalogCapabilities(normalizedProvider, normalizedModel, true) ?? withEnableThinkingStyle();+ case "openai":+ case "openai_codex":+ case "anthropic": {+ const isOpenAIProvider = normalizedProvider !== "anthropic";+ const providerCaps = isOpenAIProvider+ ? resolveOpenAIReasoningEffortCapabilities(modelForMatching)+ : resolveAnthropicReasoningEffortCapabilities(modelForMatching);+ if (providerCaps.supportsReasoning) {+ return withReasoningEffortStyle(providerCaps);+ }+ if (isOpenAIProvider && OPENAI_NON_REASONING_CHAT_ALIAS.test(modelForMatching)) {+ return withEnableThinkingStyle();+ }+ return (+ catalogCapabilities(isOpenAIProvider ? "openai" : "anthropic", modelForMatching) ??+ withEnableThinkingStyle()+ );+ }+ default:+ return withEnableThinkingStyle();}-- return withEnableThinkingStyle();}export type RuntimeReasoningFields = Pick<diff --git a/studio/frontend/src/features/chat/research-inference-request.ts b/studio/frontend/src/features/chat/research-inference-request.tsindex 6e431847554..d8426a30b38 100644--- a/studio/frontend/src/features/chat/research-inference-request.ts+++ b/studio/frontend/src/features/chat/research-inference-request.ts@@ -24,6 +24,8 @@ export interface ResearchInferenceRequest {maxOutputTokensPublished?: number;enableThinking?: boolean;reasoningEffort?: string;+ supportsReasoning?: boolean;+ supportsReasoningOff?: boolean;}export function buildResearchInferenceRequest(input: {@@ -38,6 +40,9 @@ export function buildResearchInferenceRequest(input: {maxOutputTokensFromSavedCap: boolean;/** The model's own published limit, before the connection override is folded in. */maxOutputTokensPublished: number | null;+ /** The model's resolved reasoning control, so the backend never sends a field the model lacks. */+ supportsReasoning?: boolean;+ supportsReasoningOff?: boolean;};temperature: number;topP: number;@@ -59,6 +64,12 @@ export function buildResearchInferenceRequest(input: {providerId: input.external.providerId,providerType: input.external.providerType,externalModel: input.external.modelId,+ ...(typeof input.external.supportsReasoning === "boolean"+ ? { supportsReasoning: input.external.supportsReasoning }+ : {}),+ ...(typeof input.external.supportsReasoningOff === "boolean"+ ? { supportsReasoningOff: input.external.supportsReasoningOff }+ : {}),...(input.external.maxOutputTokens != null &&Number.isFinite(input.external.maxOutputTokens) &&input.external.maxOutputTokens > 0diff --git a/studio/frontend/src/features/chat/sync-external-providers.ts b/studio/frontend/src/features/chat/sync-external-providers.tsindex 4f85de54f45..6e9aadbda2f 100644--- a/studio/frontend/src/features/chat/sync-external-providers.ts+++ b/studio/frontend/src/features/chat/sync-external-providers.ts@@ -8,6 +8,7 @@ import {import {type ProviderRegistryEntry,+ fetchModelCatalog,listProviderConfigs,listProviderModelCapabilities,listProviderRegistry,@@ -15,7 +16,9 @@ import {updateProviderConfig,} from "./api/providers-api";import {+ modelsDevCatalogFetchedAt,providerModelCatalogFetchedAt,+ setModelsDevCatalog,setProviderModelCatalog,} from "./model-catalog";import {@@ -338,6 +341,19 @@ export async function refreshProviderModelCatalogs(providers: readonly ExternalProviderConfig[],isCurrent?: () => boolean,): Promise<void> {+ const modelsDevAge = modelsDevCatalogFetchedAt();+ if (+ providers.length > 0 &&+ (modelsDevAge == null || Date.now() - modelsDevAge * 1000 >= MODEL_CATALOG_TTL_MS)+ ) {+ try {+ const catalog = await fetchModelCatalog();+ if (isCurrent && !isCurrent()) return;+ setModelsDevCatalog(catalog);+ } catch {+ // Offline: the bundled snapshot answers until the next sync.+ }+ }for (const provider of providers) {const providerType = provider.providerType;if (!usesProviderCatalogEndpoint(provider)) continue;diff --git a/studio/frontend/tests/external-thinking-wire.test.ts b/studio/frontend/tests/external-thinking-wire.test.tsindex 7abe602baee..9edf3bb1424 100644--- a/studio/frontend/tests/external-thinking-wire.test.ts+++ b/studio/frontend/tests/external-thinking-wire.test.ts@@ -9,7 +9,6 @@ import { installLocalStorageFake, readSrc, registerBundlerResolver } from "./helregisterBundlerResolver();installLocalStorageFake();-const { clearProviderModelCatalog, setProviderModelCatalog } = await import("../src/features/chat/model-catalog.ts");const { getExternalReasoningCapabilities } = await import("../src/features/chat/provider-capabilities.ts");@@ -35,15 +34,10 @@ function externalReasoningFields(caps: Caps, reasoningEnabled: boolean): unknown}test("an always-on catalog model sends thinking on even when the chat stored it off", () => {- setProviderModelCatalog("openrouter", [{ id: "acme/always-thinking", reasoning: { mandatory: true } }], 1);- try {- const caps = getExternalReasoningCapabilities("openrouter", "acme/always-thinking");- assert.equal(caps.reasoningStyle, "enable_thinking");- assert.equal(caps.supportsReasoningOff, false);- assert.deepEqual(externalReasoningFields(caps, false), { thinking: { type: "enabled" } });- } finally {- clearProviderModelCatalog("openrouter");- }+ const magistral = getExternalReasoningCapabilities("mistral", "magistral-small");+ assert.equal(magistral.reasoningStyle, "enable_thinking");+ assert.equal(magistral.supportsReasoningOff, false);+ assert.deepEqual(externalReasoningFields(magistral, false), { thinking: { type: "enabled" } });});test("every Thinking control resolves reasoning for the id the adapter sends, not the router's last pick", () => {@@ -60,14 +54,9 @@ test("every Thinking control resolves reasoning for the id the adapter sends, no});test("a toggleable catalog model still sends the stored choice", () => {- setProviderModelCatalog("openrouter", [{ id: "acme/toggle-thinking", reasoning: { mandatory: false } }], 1);- try {- const caps = getExternalReasoningCapabilities("openrouter", "acme/toggle-thinking");- assert.equal(caps.reasoningStyle, "enable_thinking");- assert.equal(caps.supportsReasoningOff, true);- assert.deepEqual(externalReasoningFields(caps, false), { thinking: { type: "disabled" } });- assert.deepEqual(externalReasoningFields(caps, true), { thinking: { type: "enabled" } });- } finally {- clearProviderModelCatalog("openrouter");- }+ const qwen = getExternalReasoningCapabilities("qwen", "qwen3.5-plus");+ assert.equal(qwen.reasoningStyle, "enable_thinking");+ assert.equal(qwen.supportsReasoningOff, true);+ assert.deepEqual(externalReasoningFields(qwen, false), { thinking: { type: "disabled" } });+ assert.deepEqual(externalReasoningFields(qwen, true), { thinking: { type: "enabled" } });});diff --git a/studio/frontend/tests/model-catalog.test.ts b/studio/frontend/tests/model-catalog.test.tsindex 3f4f7b24168..13148e6db0c 100644--- a/studio/frontend/tests/model-catalog.test.ts+++ b/studio/frontend/tests/model-catalog.test.ts@@ -11,11 +11,9 @@ installLocalStorageFake();const {clearProviderModelCatalog,- modelCatalogVersion,providerModelCatalogFetchedAt,resolveModelCatalogEntry,setProviderModelCatalog,- subscribeModelCatalog,} = await import("../src/features/chat/model-catalog.ts");const {getExternalReasoningCapabilities,@@ -26,100 +24,289 @@ const { providerModelSupportsVision } = await import("../src/features/chat/external-providers.ts");-const LIVE = [- {- id: "deepseek/deepseek-v4-pro",- input_modalities: ["text"],- reasoning: { supported_efforts: ["max", "high", "bogus"], mandatory: false, default_effort: "high" },- max_output_tokens: 65536,- },- { id: "acme/plain-chat", input_modalities: ["text", "image"], reasoning: null },- { id: "acme/always-thinking", input_modalities: ["text"], reasoning: { mandatory: true } },-];--function withLiveCatalog(run: () => void): void {- setProviderModelCatalog("openrouter", LIVE, 1234);- try {- run();- } finally {- clearProviderModelCatalog("openrouter");- }-}+test("an OpenRouter route exposes the snapshot's effort ladder", () => {+ const caps = getExternalReasoningCapabilities("openrouter", "deepseek/deepseek-v4-pro");+ assert.equal(caps.supportsReasoning, true);+ assert.equal(caps.reasoningStyle, "reasoning_effort");+ assert.deepEqual([...caps.reasoningEffortLevels], ["none", "high", "xhigh"]);+ assert.equal(caps.supportsReasoningOff, true);+ assert.equal(caps.reasoningAlwaysOn, false);+});-test("without a live catalog every OpenRouter route keeps the generic toggle", () => {- assert.equal(providerModelCatalogFetchedAt("openrouter"), null);- for (const model of ["openrouter/free", "openrouter/auto", "acme/never-heard-of-it", "deepseek/deepseek-v4-pro"]) {+test("a mandatory-reasoning route keeps the always-on toggle", () => {+ const caps = getExternalReasoningCapabilities("openrouter", "deepseek/deepseek-r1");+ assert.equal(caps.supportsReasoning, true);+ assert.equal(caps.reasoningStyle, "enable_thinking");+ assert.equal(caps.reasoningAlwaysOn, true);+ assert.equal(caps.supportsReasoningOff, false);+});++test("a known non-reasoning route hides the control", () => {+ const entry = resolveModelCatalogEntry("openrouter", "openai/gpt-4o");+ assert.ok(entry);+ assert.equal(entry.reasoning, false);+ assert.equal(getExternalReasoningCapabilities("openrouter", "openai/gpt-4o").supportsReasoning, false);+});++test("meta-routers and unknown ids keep the generic OpenRouter toggle", () => {+ for (const model of ["openrouter/free", "openrouter/auto", "acme/never-heard-of-it"]) {const caps = getExternalReasoningCapabilities("openrouter", model);assert.equal(caps.supportsReasoning, true, model);assert.equal(caps.reasoningStyle, "enable_thinking", model);assert.equal(caps.supportsReasoningOff, true, model);assert.equal(caps.reasoningAlwaysOn, false, model);}- assert.equal(getPublishedExternalMaxOutputTokens("openrouter", "deepseek/deepseek-v4-pro"), null);});-test("the live catalog carries the effort ladder, default effort, output cap and mandatory routes", () => {- withLiveCatalog(() => {+test("variant suffixes and the ~ prefix resolve through the base id", () => {+ const base = getExternalReasoningCapabilities("openrouter", "deepseek/deepseek-v4-pro");+ for (const model of ["~deepseek/deepseek-v4-pro", "deepseek/deepseek-v4-pro:nitro", "DeepSeek/DeepSeek-V4-Pro"]) {+ assert.deepEqual(getExternalReasoningCapabilities("openrouter", model), base, model);+ }+});++test("the live catalog wins over the snapshot and carries the default effort and output cap", () => {+ assert.equal(providerModelCatalogFetchedAt("openrouter"), null);+ setProviderModelCatalog(+ "openrouter",+ [+ {+ id: "deepseek/deepseek-v4-pro",+ input_modalities: ["text"],+ reasoning: { supported_efforts: ["max", "high", "bogus"], mandatory: false, default_effort: "high" },+ max_output_tokens: 65536,+ },+ { id: "acme/plain-chat", input_modalities: ["text", "image"], reasoning: null },+ {+ id: "acme/always-thinking",+ input_modalities: ["text"],+ reasoning: { mandatory: true },+ },+ ],+ 1234,+ );+ try {assert.equal(providerModelCatalogFetchedAt("openrouter"), 1234);const caps = getExternalReasoningCapabilities("openrouter", "deepseek/deepseek-v4-pro");- assert.equal(caps.reasoningStyle, "reasoning_effort");assert.deepEqual([...caps.reasoningEffortLevels], ["none", "high", "max"]);assert.equal(caps.defaultEffort, "high");assert.equal(getPublishedExternalMaxOutputTokens("openrouter", "deepseek/deepseek-v4-pro"), 65536);assert.equal(getExternalReasoningCapabilities("openrouter", "acme/plain-chat").supportsReasoning, false);+ assert.equal(providerModelSupportsVision("openrouter", "acme/plain-chat"), true);const mandatory = getExternalReasoningCapabilities("openrouter", "acme/always-thinking");assert.equal(mandatory.reasoningStyle, "enable_thinking");assert.equal(mandatory.reasoningAlwaysOn, true);assert.equal(mandatory.supportsReasoningOff, false);- assert.equal(- getExternalReasoningCapabilities("openrouter", "openrouter/free").reasoningStyle,- "enable_thinking",- "meta-routers keep the generic toggle",- );- });+ } finally {+ clearProviderModelCatalog("openrouter");+ }assert.equal(providerModelCatalogFetchedAt("openrouter"), null);- assert.equal(- getExternalReasoningCapabilities("openrouter", "deepseek/deepseek-v4-pro").reasoningStyle,- "enable_thinking",+ assert.deepEqual(+ [...getExternalReasoningCapabilities("openrouter", "deepseek/deepseek-v4-pro").reasoningEffortLevels],+ ["none", "high", "xhigh"],);+ assert.equal(getPublishedExternalMaxOutputTokens("openrouter", "deepseek/deepseek-v4-pro"), null);});-test("variant suffixes and the ~ prefix resolve through the base id", () => {- withLiveCatalog(() => {- const base = getExternalReasoningCapabilities("openrouter", "deepseek/deepseek-v4-pro");- for (const model of ["~deepseek/deepseek-v4-pro", "deepseek/deepseek-v4-pro:nitro", "DeepSeek/DeepSeek-V4-Pro"]) {- assert.deepEqual(getExternalReasoningCapabilities("openrouter", model), base, model);- }- assert.ok(resolveModelCatalogEntry("openrouter", "deepseek/deepseek-v4-pro:nitro"));+test("vision follows the model rather than the provider type", () => {+ assert.equal(providerModelSupportsVision("openrouter", "deepseek/deepseek-r1"), false);+ assert.equal(providerModelSupportsVision("openrouter", "openai/gpt-5.5"), true);+ assert.equal(providerModelSupportsVision("openrouter", "acme/never-heard-of-it"), true);+ // The catalog lists image input for v4-flash, but the backend strips DeepSeek images before sending.+ assert.equal(providerModelSupportsVision("deepseek", "deepseek-v4-flash"), false);+ assert.equal(providerModelSupportsVision("deepseek", "deepseek-v4-pro"), false);+ assert.equal(providerModelSupportsVision("deepseek", "deepseek-unknown"), false);+});++test("Ollama models resolve by tag then by base name", () => {+ const exact = getExternalReasoningCapabilities("ollama", "gpt-oss:120b");+ assert.equal(exact.reasoningStyle, "reasoning_effort");+ assert.deepEqual([...exact.reasoningEffortLevels], ["low", "medium", "high"]);+ assert.equal(exact.supportsReasoningOff, false);++ const byBase = getExternalReasoningCapabilities("ollama", "gpt-oss:7b-custom");+ assert.deepEqual(byBase, exact);++ const toggle = getExternalReasoningCapabilities("ollama", "kimi-k2.6:latest");+ assert.equal(toggle.reasoningStyle, "enable_thinking");+ assert.equal(toggle.supportsReasoning, true);+ assert.equal(toggle.supportsReasoningOff, true);++ const qwen3 = getExternalReasoningCapabilities("ollama", "qwen3:0.6b");+ assert.equal(qwen3.reasoningStyle, "enable_thinking");+ assert.equal(qwen3.supportsReasoning, true);+ assert.equal(getExternalReasoningCapabilities("ollama", "mystery:7b").supportsReasoning, false);+});++test("an Ollama instruct-only tag never inherits thinking from a sibling or another provider", () => {+ for (const id of ["qwen3-vl:8b-instruct", "qwen3:4b-instruct-2507"]) {+ assert.equal(getExternalReasoningCapabilities("ollama", id).supportsReasoning, false, id);+ }+});++test("OpenAI ids missing from the prefix tables fall back to the snapshot without an off switch", () => {+ const caps = getExternalReasoningCapabilities("openai", "o4-mini");+ assert.equal(caps.reasoningStyle, "reasoning_effort");+ assert.deepEqual([...caps.reasoningEffortLevels], ["low", "medium", "high"]);+ assert.equal(caps.supportsReasoningOff, false);+ assert.equal(getExternalReasoningCapabilities("openai", "gpt-5.1-chat-latest").supportsReasoning, false);+ assert.equal(getExternalReasoningCapabilities("openai", "gpt-99-unknown").supportsReasoning, false);+});++test("the hand-maintained tables still win for the models they cover", () => {+ const caps = getExternalReasoningCapabilities("anthropic", "claude-opus-5");+ assert.deepEqual([...caps.reasoningEffortLevels], ["none", "low", "medium", "high", "xhigh", "max"]);+ assert.equal(caps.supportsReasoningOff, true);+});++test("DeepSeek direct maps the snapshot ladder onto its low / high / max wire", () => {+ const caps = getExternalReasoningCapabilities("deepseek", "deepseek-v4-flash");+ assert.equal(caps.reasoningStyle, "reasoning_effort");+ assert.deepEqual([...caps.reasoningEffortLevels], ["none", "low", "high", "max"]);+ assert.equal(caps.supportsReasoningOff, true);+ assert.equal(getExternalReasoningCapabilities("deepseek", "deepseek-unknown").supportsReasoning, false);+});++test("Qwen and Kimi only have a wire toggle, so a ladder collapses to on/off", () => {+ for (const [provider, model] of [["qwen", "qwen3.5-plus"], ["kimi", "kimi-k3"]] as const) {+ const caps = getExternalReasoningCapabilities(provider, model);+ assert.equal(caps.reasoningStyle, "enable_thinking", model);+ assert.equal(caps.supportsReasoning, true, model);+ assert.equal(caps.supportsReasoningOff, true, model);+ }+ assert.equal(getExternalReasoningCapabilities("kimi", "kimi-k2.6").supportsReasoning, true);+});++test("Mistral models outside the table get the documented none / high form", () => {+ const caps = getExternalReasoningCapabilities("mistral", "mistral-medium-latest");+ assert.equal(caps.reasoningStyle, "reasoning_effort");+ assert.deepEqual([...caps.reasoningEffortLevels], ["none", "high"]);+ const known = getExternalReasoningCapabilities("mistral", "mistral-small-latest");+ assert.deepEqual([...known.reasoningEffortLevels], ["none", "high"]);+ const magistral = getExternalReasoningCapabilities("mistral", "magistral-small");+ assert.equal(magistral.reasoningStyle, "enable_thinking");+ assert.equal(magistral.reasoningAlwaysOn, true);+ assert.equal(magistral.supportsReasoningOff, false);+ assert.equal(getExternalReasoningCapabilities("mistral", "mistral-large-latest").supportsReasoning, false);+});++test("Hugging Face router forwards the snapshot ladder verbatim", () => {+ const caps = getExternalReasoningCapabilities("huggingface", "openai/gpt-oss-120b");+ assert.deepEqual([...caps.reasoningEffortLevels], ["low", "medium", "high"]);+ assert.equal(caps.supportsReasoningOff, false);+});++test("vLLM and llama.cpp resolve by bare model name and clamp to low / medium / high", () => {+ const vllm = getExternalReasoningCapabilities("vllm", "openai/gpt-oss-20b");+ assert.deepEqual([...vllm.reasoningEffortLevels], ["low", "medium", "high"]);+ const gguf = getExternalReasoningCapabilities("llama_cpp", "gpt-oss-20b-Q4_K_M.gguf");+ assert.deepEqual(gguf, vllm);+ const qwen = getExternalReasoningCapabilities("vllm", "Qwen/Qwen3-14B");+ assert.equal(qwen.reasoningStyle, "enable_thinking");+ assert.equal(qwen.supportsReasoningOff, true);+ const family = getExternalReasoningCapabilities("llama_cpp", "Qwen3-0.6B-Q4_K_M.gguf");+ assert.equal(family.reasoningStyle, "enable_thinking");+ assert.equal(family.supportsReasoning, true);+ assert.equal(getExternalReasoningCapabilities("llama_cpp", "Llama-3.2-1B-Instruct-Q4_K_M.gguf").supportsReasoning, false);+ assert.equal(getExternalReasoningCapabilities("llama_cpp", "mystery-7b.gguf").supportsReasoning, false);+ assert.equal(getExternalReasoningCapabilities("custom", "openai/gpt-oss-20b").supportsReasoning, false);+});++test("Gemini aliases outside the prefix tables fall back to the snapshot", () => {+ const caps = getExternalReasoningCapabilities("gemini", "gemini-omni-flash-preview");+ assert.equal(caps.supportsReasoning, true);+ assert.equal(caps.reasoningStyle, "enable_thinking");+ assert.equal(getExternalReasoningCapabilities("gemini", "gemini-3.1-pro-preview").reasoningStyle, "reasoning_effort");+});++test("a served models.dev catalog outranks the bundled snapshot and feeds the name index", async () => {+ const { modelsDevCatalogFetchedAt, setModelsDevCatalog } = await import(+ "../src/features/chat/model-catalog.ts"+ );+ assert.equal(modelsDevCatalogFetchedAt(), null);+ assert.equal(getExternalReasoningCapabilities("deepseek", "deepseek-v9-ultra").supportsReasoning, false);+ setModelsDevCatalog({+ fetched_at: 1_700_000_000,+ providers: {+ deepseek: { "deepseek-v9-ultra": { reasoning: true, toggle: true, efforts: ["low", "max"], input: ["text"] } },+ openrouter: { "deepseek/deepseek-v4-pro": { reasoning: true, toggle: true, efforts: ["low"], input: ["text", "image"] } },+ huggingface: { "acme/newmodel-70b": { reasoning: true, efforts: ["low", "high"], input: ["text"] } },+ },});+ try {+ assert.equal(modelsDevCatalogFetchedAt(), 1_700_000_000);+ const fresh = getExternalReasoningCapabilities("deepseek", "deepseek-v9-ultra");+ assert.deepEqual([...fresh.reasoningEffortLevels], ["none", "low", "max"]);+ assert.deepEqual(+ [...getExternalReasoningCapabilities("openrouter", "deepseek/deepseek-v4-pro").reasoningEffortLevels],+ ["none", "low"],+ );+ assert.equal(providerModelSupportsVision("openrouter", "deepseek/deepseek-v4-pro"), true);+ const local = getExternalReasoningCapabilities("llama_cpp", "newmodel-8b-Q4_K_M.gguf");+ assert.deepEqual([...local.reasoningEffortLevels], ["low", "high"]);+ assert.equal(getExternalReasoningCapabilities("ollama", "gpt-oss:120b").supportsReasoning, true);+ } finally {+ setModelsDevCatalog({ fetched_at: 0, providers: {} });+ }+ assert.equal(getExternalReasoningCapabilities("deepseek", "deepseek-v9-ultra").supportsReasoning, false);});-test("OpenRouter vision follows the live catalog's input modalities", () => {- withLiveCatalog(() => {- assert.equal(providerModelSupportsVision("openrouter", "acme/plain-chat"), true);- assert.equal(providerModelSupportsVision("openrouter", "deepseek/deepseek-v4-pro"), false);- assert.equal(providerModelSupportsVision("openrouter", "acme/never-heard-of-it"), true);+test("a served bucket overrides its own models without hiding the rest of the bundled one", async () => {+ // The browser cache survives an app upgrade and the backend serves an expired disk copy+ // while offline, so a bucket written by an older release can omit models the newer+ // bundled snapshot knows. Replacing the namespace wholesale dropped their controls.+ // DeepSeek, not Ollama: the Ollama branch has a by-name fallback that hides the defect.+ const { setModelsDevCatalog } = await import("../src/features/chat/model-catalog.ts");+ const bundled = getExternalReasoningCapabilities("deepseek", "deepseek-v4-pro");+ assert.deepEqual([...bundled.reasoningEffortLevels], ["none", "high", "max"]);+ setModelsDevCatalog({+ fetched_at: 1_700_000_000,+ providers: { deepseek: { "deepseek-v5": { reasoning: true, efforts: ["low"], toggle: true, input: ["text"] } } },});- assert.equal(providerModelSupportsVision("openrouter", "deepseek/deepseek-v4-pro"), true);-});--test("providers other than OpenRouter keep their existing resolvers", () => {- withLiveCatalog(() => {- const opus = getExternalReasoningCapabilities("anthropic", "claude-opus-5");- assert.deepEqual([...opus.reasoningEffortLevels], ["none", "low", "medium", "high", "xhigh", "max"]);- for (const [provider, model] of [- ["deepseek", "deepseek-v4-pro"],- ["ollama", "gpt-oss:120b"],- ["vllm", "openai/gpt-oss-20b"],- ["llama_cpp", "Qwen3-0.6B-Q4_K_M.gguf"],- ["anthropic", "claude-3-7-sonnet-20250219"],- ] as const) {- assert.equal(getExternalReasoningCapabilities(provider, model).supportsReasoning, false, `${provider} ${model}`);- }- assert.equal(providerModelSupportsVision("deepseek", "deepseek-v4-pro"), false);+ try {+ const served = getExternalReasoningCapabilities("deepseek", "deepseek-v5");+ assert.deepEqual([...served.reasoningEffortLevels], ["none", "low"]);+ const survivor = getExternalReasoningCapabilities("deepseek", "deepseek-v4-pro");+ assert.deepEqual([...survivor.reasoningEffortLevels], ["none", "high", "max"]);+ } finally {+ setModelsDevCatalog({ fetched_at: 0, providers: {} });+ }+});++test("every catalog write notifies subscribers, so a composer already on screen re-renders", async () => {+ const { modelCatalogVersion, setModelsDevCatalog, subscribeModelCatalog } = await import(+ "../src/features/chat/model-catalog.ts"+ );+ let notified = 0;+ const unsubscribe = subscribeModelCatalog(() => {+ notified += 1;});+ const before = modelCatalogVersion();+ try {+ setProviderModelCatalog("openrouter", [{ id: "acme/late", reasoning: { supported_efforts: ["high"] } }], 1);+ assert.equal(notified, 1);+ clearProviderModelCatalog("openrouter");+ assert.equal(notified, 2);+ clearProviderModelCatalog("openrouter");+ assert.equal(notified, 2, "clearing an absent catalog changes nothing");+ setModelsDevCatalog({ fetched_at: 0, providers: {} });+ assert.equal(notified, 3);+ } finally {+ unsubscribe();+ }+ assert.notEqual(modelCatalogVersion(), before);+ setProviderModelCatalog("openrouter", [{ id: "acme/late" }], 1);+ clearProviderModelCatalog("openrouter");+ assert.equal(notified, 3, "an unsubscribed listener is not called");+});++test("Gemini image models keep no reasoning control even though the catalog lists one", () => {+ for (const model of ["gemini-3-pro-image", "gemini-2.5-flash-image"]) {+ assert.equal(resolveModelCatalogEntry("gemini", model)?.reasoning, true, model);+ assert.equal(getExternalReasoningCapabilities("gemini", model).supportsReasoning, false, model);+ }});test("a live catalog default of none survives when the model can switch reasoning off", () => {@@ -149,33 +336,17 @@ test("a live catalog default of none survives when the model can switch reasonin}});-test("every catalog write notifies subscribers, so a composer already on screen re-renders", () => {- let notified = 0;- const unsubscribe = subscribeModelCatalog(() => {- notified += 1;- });- const before = modelCatalogVersion();- try {- setProviderModelCatalog("openrouter", [{ id: "acme/late", reasoning: { supported_efforts: ["high"] } }], 1);- assert.equal(notified, 1);- clearProviderModelCatalog("openrouter");- assert.equal(notified, 2);- clearProviderModelCatalog("openrouter");- assert.equal(notified, 2, "clearing an absent catalog changes nothing");- } finally {- unsubscribe();- }- assert.notEqual(modelCatalogVersion(), before);- setProviderModelCatalog("openrouter", [{ id: "acme/late" }], 1);- clearProviderModelCatalog("openrouter");- assert.equal(notified, 2, "an unsubscribed listener is not called");-});-test("a catalog that lands after selection refreshes the stored reasoning fields without resetting a valid effort", () => {- const generic = getExternalReasoningCapabilities("openrouter", "deepseek/deepseek-v4-pro");- assert.equal(generic.reasoningStyle, "enable_thinking");- withLiveCatalog(() => {- const caps = getExternalReasoningCapabilities("openrouter", "deepseek/deepseek-v4-pro");+ setProviderModelCatalog(+ "openrouter",+ [+ { id: "acme/late-ladder", reasoning: { supported_efforts: ["none", "high", "max"], mandatory: false } },+ { id: "acme/always-thinking", reasoning: { mandatory: true } },+ ],+ 1,+ );+ try {+ const caps = getExternalReasoningCapabilities("openrouter", "acme/late-ladder");const kept = reasoningFieldsAfterCatalogRefresh({ reasoningEffort: "high", reasoningEnabled: false }, caps);assert.equal(kept.supportsReasoning, true);assert.equal(kept.reasoningStyle, "reasoning_effort");@@ -192,7 +363,9 @@ test("a catalog that lands after selection refreshes the stored reasoning fields);assert.equal(alwaysOn.reasoningAlwaysOn, true);assert.equal(alwaysOn.reasoningEnabled, true, "a model without an off switch is forced on");- });+ } finally {+ clearProviderModelCatalog("openrouter");+ }});test("a mandatory OpenRouter alias keeps its catalog effort ladder", () => {diff --git a/studio/frontend/tests/provider-capabilities-current-models.test.ts b/studio/frontend/tests/provider-capabilities-current-models.test.tsindex a7750187951..bf18b60af34 100644--- a/studio/frontend/tests/provider-capabilities-current-models.test.ts+++ b/studio/frontend/tests/provider-capabilities-current-models.test.ts@@ -376,3 +376,28 @@ test("a connection override cannot raise a documented per-model cap", () => {// a vLLM server hosting an id borrowed from OpenAI has no documented cap of its ownassert.equal(getExternalMaxOutputTokens("vllm", "gpt-5.6-sol", 131072), 131072);});++test("earlier Claude 4 and 3.7 Sonnet keep a Thinking control the backend can serve", () => {+ // The backend sends these ids manual budget_tokens, but models.dev has no entry for them,+ // so leaving them to the catalog left the picker with no control at all and the backend+ // path unreachable. The 4-1 prefix must not claim a two-digit minor either.+ for (const id of [+ "claude-opus-4-1-20250805",+ "claude-opus-4-20250514",+ "claude-sonnet-4-20250514",+ "claude-3-7-sonnet-20250219",+ ]) {+ const caps = getExternalReasoningCapabilities("anthropic", id);+ assert.equal(caps.supportsReasoning, true, id);+ assert.equal(caps.reasoningStyle, "reasoning_effort", id);+ assert.deepEqual([...caps.reasoningEffortLevels], ["none", "low", "medium", "high"], id);+ }+ assert.deepEqual(+ [...getExternalReasoningCapabilities("anthropic", "claude-opus-4-5-20251101").reasoningEffortLevels],+ ["none", "low", "medium", "high"],+ );+ assert.deepEqual(+ [...getExternalReasoningCapabilities("anthropic", "claude-sonnet-4-6-20260219").reasoningEffortLevels],+ ["none", "low", "medium", "high", "max"],+ );+});diff --git a/studio/frontend/tests/provider-catalog-refresh.test.ts b/studio/frontend/tests/provider-catalog-refresh.test.tsindex 49e8bcd8f3d..0bb0760feb2 100644--- a/studio/frontend/tests/provider-catalog-refresh.test.ts+++ b/studio/frontend/tests/provider-catalog-refresh.test.ts@@ -22,6 +22,7 @@ test("a failing OpenRouter connection leaves the catalog for the next connection"/src/features/chat/sync-external-providers.ts",);const catalog = await vite.ssrLoadModule("/src/features/chat/model-catalog.ts");+ catalog.setModelsDevCatalog({ fetched_at: Date.now() / 1000, providers: {} });const asked: string[] = [];const realFetch = globalThis.fetch;globalThis.fetch = (async (_input: RequestInfo | URL, init?: RequestInit) => {@@ -50,6 +51,7 @@ test("an OpenRouter connection on a gateway base URL never writes the shared cat"/src/features/chat/sync-external-providers.ts",);const catalog = await vite.ssrLoadModule("/src/features/chat/model-catalog.ts");+ catalog.setModelsDevCatalog({ fetched_at: Date.now() / 1000, providers: {} });const asked: string[] = [];const realFetch = globalThis.fetch;globalThis.fetch = (async (_input: RequestInfo | URL, init?: RequestInit) => {diff --git a/studio/frontend/tests/research-inference-request.test.ts b/studio/frontend/tests/research-inference-request.test.tsindex f1dadbe1ef2..842938ebbc8 100644--- a/studio/frontend/tests/research-inference-request.test.ts+++ b/studio/frontend/tests/research-inference-request.test.ts@@ -5,6 +5,7 @@ import assert from "node:assert/strict";import test from "node:test";import { buildResearchInferenceRequest } from "../src/features/chat/research-inference-request.ts";+import { readSrc } from "./helpers/kit.ts";const clamp = (effort: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max") =>effort === "xhigh" ? "high" as const : effort;@@ -216,3 +217,33 @@ test("the published ceiling rides along, unfolded, when the model has one", () =assert.equal(request.maxOutputTokens, 8192);assert.equal(request.maxOutputTokensPublished, 65536);});++test("an external run records whether the model reasons and can turn it off", () => {+ const request = buildResearchInferenceRequest({+ checkpoint: "external::p1::openai/gpt-oss-120b",+ external: {+ providerId: "p1",+ providerType: "huggingface",+ modelId: "openai/gpt-oss-120b",+ maxOutputTokens: null,+ maxOutputTokensFromSavedCap: false,+ maxOutputTokensPublished: null,+ supportsReasoning: true,+ supportsReasoningOff: false,+ },+ temperature: 0.2,+ topP: 0.9,+ maxTokens: 4096,+ reasoningRequested: true,+ reasoningStyle: "reasoning_effort",+ reasoningEffort: "high",+ reasoningEffortLevels: ["low", "medium", "high"],+ clampReasoningEffort: clamp,+ });+ assert.equal(request.supportsReasoning, true);+ assert.equal(request.supportsReasoningOff, false);+ assert.match(+ readSrc("features/chat/api/chat-adapter.ts"),+ /supportsReasoning: runtime\.supportsReasoning,\s*supportsReasoningOff: runtime\.supportsReasoningOff,/,+ );+});diff --git a/tests/studio/studiobench/sweep/selftest/test_studiobench_parity_shots.py b/tests/studio/studiobench/sweep/selftest/test_studiobench_parity_shots.pyindex 3c9baaf3010..ea170d206d7 100644--- a/tests/studio/studiobench/sweep/selftest/test_studiobench_parity_shots.py+++ b/tests/studio/studiobench/sweep/selftest/test_studiobench_parity_shots.py@@ -549,6 +549,8 @@ NOT_GATED: dict[str, str] = {"studio/backend/core/inference/pricing.py": "cost figures, which the scene never renders","studio/backend/core/inference/provider_model_capabilities.py": "OpenRouter and models.dev ""capability catalogs; studiobench registers a custom provider, which neither catalog describes",+ "studio/backend/utils/paths/storage_roots.py": "path helpers imported across the backend; "+ "providers.py only uses it to place the model catalog cache, which the scene never reads","studio/backend/utils/utils.py": "generic helpers imported by most of the backend; gating on ""it would run this workflow on nearly every PR and defeat the filter","studio/backend/utils/account_context.py": "request identity ContextVar imported across the "