The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
docs: correct the free-tier narrative the removal left behind
kshitijk4poor66a29c3e9d6f
diff --git a/agent/auxiliary_client.py b/agent/auxiliary_client.pyindex 450d1d33372..9c3f9a0e471 100644--- a/agent/auxiliary_client.py+++ b/agent/auxiliary_client.py@@ -5104,8 +5104,6 @@ def _resolve_api_key_branch(req: _ResolveRequest, pconfig: Any, resolve_creds: Craw_base_url = str(creds.get("base_url", "")).strip().rstrip("/") or pconfig.inference_base_urlif req.explicit_base_url:raw_base_url = req.explicit_base_url.strip().rstrip("/")- # Keyless OpenCode free-tier routing was removed (OpenCode 403s anonymous traffic, so -free- # slugs now resolve with the caller's own Zen/Go credentials).if provider == "actual":with contextlib.suppress(Exception):from hermes_cli.auth import (diff --git a/gateway/run.py b/gateway/run.pyindex 60a67d88b6b..5b57bf83040 100644--- a/gateway/run.py+++ b/gateway/run.py@@ -2340,8 +2340,8 @@ def _resolve_runtime_agent_kwargs_for_provider(provider: str, target_model: Opti"""Resolve runtime credentials for a specific provider (e.g. from channel override).``target_model`` is the model the override will actually send: the ladder's model-keyed rungs- (OpenCode free tier, Zen/Go relay + api_mode) must see it rather than config's ``default``,- or a ``*-free`` default routes a Go-only override to the keyless Zen relay (#112600)."""+ (Zen/Go relay + api_mode) must see it rather than config's ``default``, or a Go-only override+ resolves an api_mode/base_url the sent model cannot use (#112600)."""from hermes_cli.runtime_provider import resolve_runtime_provider, format_runtime_provider_errortry:runtime = resolve_runtime_provider(requested=provider, target_model=target_model or None)diff --git a/hermes_cli/cli_agent_setup_mixin.py b/hermes_cli/cli_agent_setup_mixin.pyindex ec8e0cd91b0..338b9391f40 100644--- a/hermes_cli/cli_agent_setup_mixin.py+++ b/hermes_cli/cli_agent_setup_mixin.py@@ -183,10 +183,10 @@ class CLIAgentSetupMixin:_primary_exc = Noneruntime = Nonetry:- # target_model: the ladder's model-keyed rungs (OpenCode free tier, Zen/Go api_mode,- # Copilot/Nous api_mode) must see the model this CLI will actually send, not- # config's `default` -- otherwise `hermes -m mimo-v2.5 --provider opencode-go` with a- # *-free default is routed to the keyless Zen relay (#112600).+ # target_model: the ladder's model-keyed rungs (Zen/Go api_mode, Copilot/Nous+ # api_mode) must see the model this CLI will actually send, not config's `default`,+ # or `hermes -m mimo-v2.5 --provider opencode-go` resolves an api_mode/base_url the+ # sent model cannot use (#112600).runtime = resolve_runtime_provider(requested=self.requested_provider, explicit_api_key=self._explicit_api_key,explicit_base_url=self._explicit_base_url, target_model=self.model or None)diff --git a/hermes_cli/models.py b/hermes_cli/models.pyindex 598b34850cd..da2da355c6b 100644--- a/hermes_cli/models.py+++ b/hermes_cli/models.py@@ -1434,9 +1434,8 @@ _PROVIDER_CATALOG_FETCHERS: dict[str, Any] = {# ``-free`` slugs the relay still LISTS but no longer serves (or that are keyed twins, not-# anonymous-servable). The keyless free-tier catalog is gone, but the live-first keyed Zen/Go-# pickers still filter through this so a stale live listing can never route into a 400/403-# (#111749). Kept as the extension point for future relay delistings.+# anonymous-servable). The live-first keyed Zen/Go pickers filter through this so a stale live+# listing can never route into a 400/403 (#111749)._OPENCODE_FREE_EXCLUDED_MODELS = frozenset({"ox-alpha-free", "deepseek-v4-flash-free"})@@ -1458,7 +1457,7 @@ def _profile_live_catalog(normalized: str) -> Optional[list[str]]:live = profile.fetch_models(api_key=api_key, base_url=base_url or profile.base_url or None) if api_key else Noneif live and normalized in _LIVE_FIRST_PICKER_PROVIDERS:# The relay still LISTS delisted ids it no longer serves; the keyed Zen/Go picker is- # live-first, so it takes the same exclusion as the keyless catalog (#111749).+ # live-first, so it filters them out here (#111749).live = [m for m in live if str(m).lower() not in _OPENCODE_FREE_EXCLUDED_MODELS]if not live:return list(profile.fallback_models) if profile.fallback_models else Nonediff --git a/hermes_cli/models_catalog_static.py b/hermes_cli/models_catalog_static.pyindex 3565e55b9a9..c6461cdb440 100644--- a/hermes_cli/models_catalog_static.py+++ b/hermes_cli/models_catalog_static.py@@ -237,7 +237,7 @@ _PROVIDER_MODELS: dict[str, list[str]] = {],# Synced against opencode.ai/docs/go + live GET /zen/go/v1/models. Known-delisted models are# REMOVED (the live-first merge would otherwise keep offering a model that 401s): "ox-alpha-free"- # — the Go-subscription twin of Zen's keyless Ox Alpha — was delisted 2026-09-09.+ # — the Go-subscription twin of Zen's Ox Alpha — was delisted 2026-09-09."opencode-go": ["kimi-k3", "kimi-k2.7-code", "kimi-k2.6", "kimi-k2.5", "gpt-5.6-luna", "grok-4.5", "glm-5.3","glm-5.3-flash", "glm-5.2", "glm-5.1", "glm-5", "mimo-v2.5-pro", "mimo-v2.5", "mimo-v2-pro",diff --git a/hermes_cli/runtime_provider.py b/hermes_cli/runtime_provider.pyindex 35da50a91d1..09e3baa6d59 100644--- a/hermes_cli/runtime_provider.py+++ b/hermes_cli/runtime_provider.py@@ -846,7 +846,7 @@ def resolve_runtime_provider(*, requested: Optional[str] = None, explicit_api_ke2. requested-name shortcuts: moa, anthropic@azure, azure-foundry, vertex3. named custom provider / llamacpp alias / bare-custom direct alias4. local-endpoint bypass (no explicit creds, config base_url at a non-cloud host)- 5. ``auth.resolve_provider`` → OpenCode free tier → explicit --api-key/--base-url path+ 5. ``auth.resolve_provider`` → explicit --api-key/--base-url path6. credential pool (OpenRouter pool only without custom endpoint/override)7. OAuth specs (nous/codex/xai/qwen; "auto" swallows AuthError and logs) → minimax-oauth→ external-process → anthropic env → bedrock → registry api_key providersdiff --git a/tests/gateway/test_runtime_provider_override_target_model.py b/tests/gateway/test_runtime_provider_override_target_model.pyindex efccf5d9c72..078430084f7 100644--- a/tests/gateway/test_runtime_provider_override_target_model.py+++ b/tests/gateway/test_runtime_provider_override_target_model.py@@ -2,8 +2,8 @@Channel overrides, persisted ``/model`` switches and API-server provider refreshes all resolvecredentials through ``gateway.run._resolve_runtime_agent_kwargs_for_provider``; without the model-the ladder keys off config's ``default`` and a ``*-free`` default sends a Go-only model to the-keyless Zen relay ("Model ... is not supported")."""+the ladder keys off config's ``default`` and a ``*-free`` default decides the api_mode/base_url+for a Go-only model ("Model ... is not supported")."""import pytestdiff --git a/tests/hermes_cli/test_cli_provider_resolution.py b/tests/hermes_cli/test_cli_provider_resolution.pyindex 6ab1942e4b9..1cb6c0450b7 100644--- a/tests/hermes_cli/test_cli_provider_resolution.py+++ b/tests/hermes_cli/test_cli_provider_resolution.py@@ -314,9 +314,8 @@ def test_runtime_resolution_failure_is_not_sticky(monkeypatch):def test_ensure_runtime_credentials_passes_cli_model_as_target_model(monkeypatch):"""`hermes -m mimo-v2.5 --provider opencode-go` must resolve credentials for the model the- CLI will send: the OpenCode free-tier rung keys off the effective model, and without- target_model a `*-free` config default routes an explicit paid model to the keyless Zen- relay (#112600)."""+ CLI will send: the Zen/Go rungs key off the effective model, and without target_model a+ `*-free` config default decides the api_mode/base_url for an explicit paid model (#112600)."""cli = _import_cli()seen = {}@@ -342,8 +341,8 @@ def test_ensure_runtime_credentials_passes_cli_model_as_target_model(monkeypatchdef test_fallback_runtime_resolves_the_fallback_entry_model(monkeypatch, tmp_path):"""The auth-fallback rung must resolve credentials for the ENTRY's model, exactly like the- primary path does for `-m`: with a `*-free` config default and no target_model, the OpenCode- free-tier rung wins and a Go-only fallback entry is built against the Zen relay (#112600)."""+ primary path does for `-m`: a `*-free` config default must not decide the api_mode/base_url+ a Go-only fallback entry is built with (#112600)."""from hermes_cli.auth import AuthErrorfrom hermes_cli.cli_agent_setup_mixin import CLIAgentSetupMixin