From 52cbceea448a05d151434d2063bd79f92e5fdbb9 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Tue, 21 Apr 2026 14:43:55 -0700 Subject: [PATCH] fix(vision): restore tier-aware Nous vision model selection (#13703) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Revert two overreaches from #13699 that forced paid Nous vision to xiaomi/mimo-v2-omni instead of the tier-appropriate gemini-3-flash-preview: 1. Remove "nous": "xiaomi/mimo-v2-omni" from _PROVIDER_VISION_MODELS — #13696 already routes nous main-provider vision through the strict backend, and this entry caused any direct resolve_provider_client( "nous", ...) aggregator-lookup path to pick the wrong model for paid. 2. Drop the 'elif vision' paid override in _try_nous() that forced mimo-v2-omni on every Nous vision call regardless of tier. Paid accounts now keep gemini-3-flash-preview for vision as well as text. Free-tier behavior unchanged: still uses mimo-v2-omni for vision, mimo-v2-pro for text (check_nous_free_tier() branch). E2E verified: paid vision → google/gemini-3-flash-preview free vision → xiaomi/mimo-v2-omni paid text → google/gemini-3-flash-preview free text → xiaomi/mimo-v2-pro --- agent/auxiliary_client.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/agent/auxiliary_client.py b/agent/auxiliary_client.py index 2854873b..5195b095 100644 --- a/agent/auxiliary_client.py +++ b/agent/auxiliary_client.py @@ -152,7 +152,6 @@ _API_KEY_PROVIDER_AUX_MODELS: Dict[str, str] = { _PROVIDER_VISION_MODELS: Dict[str, str] = { "xiaomi": "mimo-v2-omni", "zai": "glm-5v-turbo", - "nous": "xiaomi/mimo-v2-omni", } # OpenRouter app attribution headers @@ -934,23 +933,16 @@ def _try_nous(vision: bool = False) -> Tuple[Optional[OpenAI], Optional[str]]: model = _NOUS_MODEL # Free-tier users can't use paid auxiliary models — use the free # models instead: mimo-v2-omni for vision, mimo-v2-pro for text tasks. - # For vision tasks, always use mimo-v2-omni regardless of tier — - # Nous inference API does not support image inputs for gemini models. + # Paid accounts keep their tier-appropriate models: gemini-3-flash-preview + # for both text and vision tasks. try: from hermes_cli.models import check_nous_free_tier if check_nous_free_tier(): model = _NOUS_FREE_TIER_VISION_MODEL if vision else _NOUS_FREE_TIER_AUX_MODEL logger.debug("Free-tier Nous account — using %s for auxiliary/%s", model, "vision" if vision else "text") - elif vision: - model = _NOUS_FREE_TIER_VISION_MODEL - logger.debug("Nous vision task — using %s (gemini models lack " - "image support on Nous inference API)", model) except Exception: - if vision: - model = _NOUS_FREE_TIER_VISION_MODEL - if vision: - logger.debug("Nous vision: final model = %s", model) + pass if runtime is not None: api_key, base_url = runtime else: