feat: use mimo-v2-pro for non-vision auxiliary tasks on Nous free tier (#6018)
Free-tier Nous Portal users were getting mimo-v2-omni (a multimodal model) for all auxiliary tasks including compression, session search, and web extraction. Now routes non-vision tasks to mimo-v2-pro (a text model) which is better suited for those workloads. - Added _NOUS_FREE_TIER_AUX_MODEL constant for text auxiliary tasks - _try_nous() accepts vision=False param to select the right model - Vision path (_resolve_strict_vision_backend) passes vision=True - All other callers default to vision=False → mimo-v2-pro
This commit is contained in:
@@ -92,6 +92,7 @@ auxiliary_is_nous: bool = False
|
|||||||
_OPENROUTER_MODEL = "google/gemini-3-flash-preview"
|
_OPENROUTER_MODEL = "google/gemini-3-flash-preview"
|
||||||
_NOUS_MODEL = "google/gemini-3-flash-preview"
|
_NOUS_MODEL = "google/gemini-3-flash-preview"
|
||||||
_NOUS_FREE_TIER_VISION_MODEL = "xiaomi/mimo-v2-omni"
|
_NOUS_FREE_TIER_VISION_MODEL = "xiaomi/mimo-v2-omni"
|
||||||
|
_NOUS_FREE_TIER_AUX_MODEL = "xiaomi/mimo-v2-pro"
|
||||||
_NOUS_DEFAULT_BASE_URL = "https://inference-api.nousresearch.com/v1"
|
_NOUS_DEFAULT_BASE_URL = "https://inference-api.nousresearch.com/v1"
|
||||||
_ANTHROPIC_DEFAULT_BASE_URL = "https://api.anthropic.com"
|
_ANTHROPIC_DEFAULT_BASE_URL = "https://api.anthropic.com"
|
||||||
_AUTH_JSON_PATH = get_hermes_home() / "auth.json"
|
_AUTH_JSON_PATH = get_hermes_home() / "auth.json"
|
||||||
@@ -713,7 +714,7 @@ def _try_openrouter() -> Tuple[Optional[OpenAI], Optional[str]]:
|
|||||||
default_headers=_OR_HEADERS), _OPENROUTER_MODEL
|
default_headers=_OR_HEADERS), _OPENROUTER_MODEL
|
||||||
|
|
||||||
|
|
||||||
def _try_nous() -> Tuple[Optional[OpenAI], Optional[str]]:
|
def _try_nous(vision: bool = False) -> Tuple[Optional[OpenAI], Optional[str]]:
|
||||||
nous = _read_nous_auth()
|
nous = _read_nous_auth()
|
||||||
if not nous:
|
if not nous:
|
||||||
return None, None
|
return None, None
|
||||||
@@ -725,12 +726,13 @@ def _try_nous() -> Tuple[Optional[OpenAI], Optional[str]]:
|
|||||||
else:
|
else:
|
||||||
model = _NOUS_MODEL
|
model = _NOUS_MODEL
|
||||||
# Free-tier users can't use paid auxiliary models — use the free
|
# Free-tier users can't use paid auxiliary models — use the free
|
||||||
# multimodal model instead so vision/browser-vision still works.
|
# models instead: mimo-v2-omni for vision, mimo-v2-pro for text tasks.
|
||||||
try:
|
try:
|
||||||
from hermes_cli.models import check_nous_free_tier
|
from hermes_cli.models import check_nous_free_tier
|
||||||
if check_nous_free_tier():
|
if check_nous_free_tier():
|
||||||
model = _NOUS_FREE_TIER_VISION_MODEL
|
model = _NOUS_FREE_TIER_VISION_MODEL if vision else _NOUS_FREE_TIER_AUX_MODEL
|
||||||
logger.debug("Free-tier Nous account — using %s for auxiliary/vision", model)
|
logger.debug("Free-tier Nous account — using %s for auxiliary/%s",
|
||||||
|
model, "vision" if vision else "text")
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
return (
|
return (
|
||||||
@@ -1400,7 +1402,7 @@ def _resolve_strict_vision_backend(provider: str) -> Tuple[Optional[Any], Option
|
|||||||
if provider == "openrouter":
|
if provider == "openrouter":
|
||||||
return _try_openrouter()
|
return _try_openrouter()
|
||||||
if provider == "nous":
|
if provider == "nous":
|
||||||
return _try_nous()
|
return _try_nous(vision=True)
|
||||||
if provider == "openai-codex":
|
if provider == "openai-codex":
|
||||||
return _try_codex()
|
return _try_codex()
|
||||||
if provider == "anthropic":
|
if provider == "anthropic":
|
||||||
|
|||||||
Reference in New Issue
Block a user