The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(hermes_cli): hug docstring closers (text-verified)
Tekniumb7157691f193
diff --git a/hermes_cli/moa_config.py b/hermes_cli/moa_config.pyindex 54bc880adda..46e65086174 100644--- a/hermes_cli/moa_config.py+++ b/hermes_cli/moa_config.py@@ -29,8 +29,7 @@ def _coerce_number(value: Any, cast, default=None, *, positive: bool = False):"""Coerce ``value`` with ``cast`` (float/int); ``default`` when unset/blank/invalid.``int`` also accepts float-looking strings ("3.0"). With ``positive`` the result must be > 0- (and finite for floats) or ``default`` is returned.- """+ (and finite for floats) or ``default`` is returned."""if value is None or value == "":return defaulttry:@@ -50,8 +49,7 @@ def _coerce_number(value: Any, cast, default=None, *, positive: bool = False):def _coerce_reference_timeout(value: Any) -> float | None:"""Finite positive advisor timeout, or None to inherit ``auxiliary.moa_reference.timeout``.- No artificial cap: long-thinking advisor models legitimately run far beyond five minutes.- """+ No artificial cap: long-thinking advisor models legitimately run far beyond five minutes."""if isinstance(value, bool):return DEFAULT_MOA_REFERENCE_TIMEOUTreturn _coerce_number(value, float, DEFAULT_MOA_REFERENCE_TIMEOUT, positive=True)@@ -84,8 +82,7 @@ def coerce_privacy_filter(value: Any) -> str:``false``/``None``/unknown values land on '' so a hand-edited config degrades to priorbehavior. 'display' redacts user-visible surfaces only (reference blocks in the UI and saved- MoA trace records).- """+ MoA trace records)."""if value is True:return "full"if value is None or value is False:@@ -118,8 +115,7 @@ def _slot_problem(slot: Any) -> str | None:"""Human-readable problem for a slot ``_clean_slot`` would drop; None when complete and valid.Mirrors ``_clean_slot`` exactly so the write-boundary validator (``validate_moa_payload``) and- the tolerant runtime normalizer can never disagree about what is acceptable.- """+ the tolerant runtime normalizer can never disagree about what is acceptable."""if not isinstance(slot, dict):return "must be an object with 'provider' and 'model'"provider = str(slot.get("provider") or "").strip()@@ -172,8 +168,7 @@ def validate_moa_payload(raw: Any) -> list[str]:"""Return the problems ``normalize_moa_config`` would silently paper over (empty = safe to save).Read-time tolerance (a hand-edited config degrades to defaults instead of crashing) is a- corruption engine at write time: a half-filled slot would silently replace the whole preset.- """+ corruption engine at write time: a half-filled slot would silently replace the whole preset."""if not isinstance(raw, dict):return ["MoA config must be an object"]@@ -285,8 +280,7 @@ def exact_moa_preset_name(config: Any, text: str) -> str | None:Used by the no-explicit-provider switch path for a bare ``/model <preset>``. Because the matchis implicit it honors the per-preset ``enabled`` opt-out: a plain model switch that collideswith a disabled preset's name must not silently pivot onto the MoA provider. Explicit- ``--provider moa`` / picker selection bypasses this, so disabled presets stay reachable.- """+ ``--provider moa`` / picker selection bypasses this, so disabled presets stay reachable."""wanted = str(text or "").strip()if not wanted:return Nonediff --git a/hermes_cli/model_switch.py b/hermes_cli/model_switch.pyindex 59e383a62a8..683e6f13ea3 100644--- a/hermes_cli/model_switch.py+++ b/hermes_cli/model_switch.py@@ -2,8 +2,7 @@Pipeline: parse flags -> alias resolution -> provider resolution -> credential resolution ->normalize model name -> metadata lookup -> build result. Provider switching uses ``--provider``-exclusively; colons are reserved for OpenRouter variant suffixes (``:free``, ``:extended``).-"""+exclusively; colons are reserved for OpenRouter variant suffixes (``:free``, ``:extended``)."""from __future__ import annotations@@ -64,8 +63,7 @@ def _entry_models_discovered(entry: Any) -> bool:"""True when the entry's ``models`` mapping was auto-discovered by Hermes.Current shape: entry-level ``models_discovered: true``. Older versions wrote an in-mapping- ``__discovered_model_catalog__: true`` sentinel — accepted on read (the next save migrates it).- """+ ``__discovered_model_catalog__: true`` sentinel — accepted on read (the next save migrates it)."""if not isinstance(entry, dict):return Falsemodels = entry.get("models")@@ -80,8 +78,7 @@ def _models_config_is_allowlist(value: Any, discovered: bool = False) -> bool:``_save_custom_provider`` / the wizard, not a catalog narrow (treating it as one made GUIpickers show only the saved default for keyless Ollama while the CLI live-probed). List andstring shapes remain allowlists for no-key endpoints; pin a dict catalog with- ``discover_models: false``. A catalog Hermes itself persisted (``discovered``) is never a pin.- """+ ``discover_models: false``. A catalog Hermes itself persisted (``discovered``) is never a pin."""if discovered:return Falseif isinstance(value, str):@@ -183,8 +180,7 @@ class DirectAlias(NamedTuple):``api_key`` / ``key_env`` carry the alias endpoint's OWN credential. Without them the switchwould keep the *default* provider's key, which 401s against the alias host and sends thatprovider's secret to an unrelated third party. Both default so positional- ``DirectAlias(model, provider, base_url)`` keeps working.- """+ ``DirectAlias(model, provider, base_url)`` keeps working."""model: strprovider: strbase_url: str@@ -211,8 +207,7 @@ def _load_direct_aliases() -> dict[str, DirectAlias]:``api_key`` — literal or ``"${VAR}"`` — / ``key_env``); with neither credential field the keyis resolved from the alias HOST, never from the previously active provider. ``model.aliases``never overrides ``model_aliases``; its string entries (``ds-flash: deepseek/deepseek-v4-flash``)- take the provider from the ``provider/`` prefix, else the current provider.- """+ take the provider from the ``provider/`` prefix, else the current provider."""merged = dict(_BUILTIN_DIRECT_ALIASES)try:from hermes_cli.config import load_config@@ -283,8 +278,7 @@ def _ensure_direct_aliases() -> None:"""Load direct aliases for the ACTIVE profile, caching per config identity.Mutates DIRECT_ALIASES in place (never rebinds) so ``from ... import DIRECT_ALIASES``- references in callers stay valid.- """+ references in callers stay valid."""global _DIRECT_ALIAS_IDENTITY, _DIRECT_ALIAS_LOADEDidentity = _direct_alias_source_identity()if DIRECT_ALIASES and (@@ -305,8 +299,7 @@ def direct_alias_api_key(alias: DirectAlias) -> str:Precedence: ``api_key: "${VAR}"`` (env indirection) > literal ``api_key`` > ``key_env``.Env reads go through the per-profile secret scope: a raw ``os.environ`` read hands this- profile whatever key the process env holds — another profile's, under the multiplexed gateway.- """+ profile whatever key the process env holds — another profile's, under the multiplexed gateway."""raw = (alias.api_key or "").strip()if raw.startswith("${") and raw.endswith("}"):return _scoped_key_env(raw[2:-1].strip())@@ -323,8 +316,7 @@ def direct_alias_runtime_request(alias: DirectAlias) -> tuple[str, Optional[str]would otherwise reach that provider's explicit-runtime branch and put the live vendor tokenon the foreign wire. Bare ``custom`` is host-gated, so an authoritative URL still resolvesits vendor key and a foreign one resolves none. An alias with no base_url keeps its label —- there is no foreign host, and the label is the only routing information.- """+ there is no foreign host, and the label is the only routing information."""return ("custom" if alias.base_url else (alias.provider or "custom")), direct_alias_api_key(alias) or None@@ -337,8 +329,7 @@ def _may_reuse_session_credential(session_base_url: str, alias_base_url: str) ->Same hostname is NOT sufficient: ``http://h`` and ``https://h:8443`` are different trustboundaries, and an alias that drops the scheme would put a live bearer secret on the wire in- the clear. Require an identical (scheme, host, port) and refuse plaintext outside loopback.- """+ the clear. Require an identical (scheme, host, port) and refuse plaintext outside loopback."""session = base_url_origin(session_base_url)alias = base_url_origin(alias_base_url)if not session[1] or session != alias:@@ -366,8 +357,7 @@ def resolve_startup_model_route(model. ``provider/model`` strings are consumed only for providers present in user config. When``current_provider`` is a routing aggregator and the raw string is an aggregator-native slug(``anthropic/claude-opus-4.6`` on OpenRouter) the input stays on the aggregator — a- ``providers:`` block for the same vendor must not steal the route.- """+ ``providers:`` block for the same vendor must not steal the route."""raw = _clean(raw_model)if not raw:return None@@ -464,8 +454,7 @@ def parse_model_flags_detailed(raw_args: str) -> ModelFlagParseResult:``--once`` is parsed here but interpreted by each caller (each frontend has its ownlive-session restore hook). ``is_global`` / ``is_session`` are raw flag presences; the- effective persistence decision belongs to :func:`resolve_persist_behavior`.- """+ effective persistence decision belongs to :func:`resolve_persist_behavior`."""# Telegram/iOS auto-convert ``--`` to an em/en dash: normalize a single Unicode dash before# a flag keyword.raw_args = re.sub(r'[\u2012\u2013\u2014\u2015](provider|global|session|refresh|once)', r'--\1', raw_args)@@ -501,8 +490,7 @@ def resolve_persist_behavior(the pick does not evaporate into whatever ``*_API_KEY`` is lying around on the next launch;``--provider`` without a persist flag -> False (exploratory); else``model.persist_switch_by_default`` (default False). A flat-string ``model`` IS a configured- default; an unreadable config -> False.- """+ default; an unreadable config -> False."""if is_once or is_session:return Falseif is_global:@@ -544,8 +532,7 @@ class ModelSwitchRequest:``"session"`` | ``"global"`` | ``"default"`` (the effective decision then belongs to:func:`resolve_persist_behavior`). ``errors`` carries ``MODEL_SWITCH_ERR_*`` codes renderedvia :data:`MODEL_SWITCH_ERROR_TEXT`. ``model_input`` keeps it a drop-in for- :class:`ModelFlagParseResult` consumers.- """+ :class:`ModelFlagParseResult` consumers."""raw: strtarget: strexplicit_provider: str = ""@@ -570,8 +557,7 @@ def parse_model_switch_args(raw: str) -> ModelSwitchRequest:``--once`` + ``--global`` -> ``MODEL_SWITCH_ERR_ONCE_WITH_GLOBAL``; ``--once`` with neithera model nor ``--provider`` -> ``MODEL_SWITCH_ERR_ONCE_REQUIRES_TARGET``. Targets pass through- untouched (bare names, ``vendor/model``, ``vendor:model``) for :func:`switch_model`.- """+ untouched (bare names, ``vendor/model``, ``vendor:model``) for :func:`switch_model`."""raw = str(raw or "")parsed = parse_model_flags_detailed(raw)@@ -604,8 +590,7 @@ def resolve_effective_model(Single owner of the precedence rule gateway/run.py and api_server.py each used to encode.Each argument may be a model string, a dict with a ``"model"`` key, or an object with a- ``.model`` attribute; empty entries fall through to the next tier.- """+ ``.model`` attribute; empty entries fall through to the next tier."""for tier in (session_overrides, channel_config, global_config):candidate = _effective_model_candidate(tier)if candidate:@@ -619,8 +604,7 @@ def _model_sort_key(model_id: str, prefix: str) -> tuple:"""Sort key preferring higher versions after the family prefix, then ranked suffix tokens.With prefix ``"mimo"``: ``mimo-v2.5-pro`` -> (-2.5, 0, 'pro'), ``mimo-v2.5`` -> (-2.5, 1, ''),- ``mimo-v2-omni`` -> (-2.0, 1, 'omni').- """+ ``mimo-v2-omni`` -> (-2.0, 1, 'omni')."""# Strip the prefix (and optional "/" separator for aggregator slugs)rest = model_id[len(prefix):].removeprefix("/").lstrip("-").strip()nums, suffix_buf = _split_version_suffix(rest)@@ -645,8 +629,7 @@ def _split_version_suffix(rest: str) -> tuple[list[float], str]:"""``"v2.5-pro"`` -> ``([2.5], "pro")``; ``"-omni"`` -> ``([], "omni")``.Version tokens are ``v``-optional digit/dot runs separated by ``-``/``_``; a second dot inside- a run starts a new component; the first character that is neither starts the suffix.- """+ a run starts a new component; the first character that is neither starts the suffix."""nums: list[float] = []run, pos = "", 0@@ -683,8 +666,7 @@ class AmbiguousAliasError(Exception):"""Alias family-matches multiple catalog models; caller must disambiguate.Raised by :func:`resolve_alias` instead of silently picking one via version-sort heuristics.- ``candidates`` is sorted best-guess-first (see :func:`_model_sort_key`) for display only.- """+ ``candidates`` is sorted best-guess-first (see :func:`_model_sort_key`) for display only."""def __init__(self, alias: str, provider: str, candidates: list[str]):self.alias = aliasself.provider = provider@@ -710,8 +692,7 @@ def resolve_alias(raw_input: str, current_provider: str) -> Optional[tuple[str,Direct aliases (and reverse lookup by exact model id) win; then :data:`MODEL_ALIASES` ismatched against the provider's models.dev catalog by ``vendor/family`` prefix (``family``for non-aggregators). Returns ``(provider, resolved_model_id, alias_name)`` or None; raises- :class:`AmbiguousAliasError` when several catalog models match.- """+ :class:`AmbiguousAliasError` when several catalog models match."""key = raw_input.strip().lower()_ensure_direct_aliases()@@ -771,8 +752,7 @@ def _resolve_alias_fallback("""Resolve an alias on the user's authenticated providers (``("openrouter", "nous")`` when none given).AmbiguousAliasError propagates: the alias exists on this provider, the user just has to- choose — trying the next provider would silently switch them somewhere they didn't ask for.- """+ choose — trying the next provider would silently switch them somewhere they didn't ask for."""results = (resolve_alias(raw_input, p) for p in authenticated_providers or ("openrouter", "nous"))return next((r for r in results if r is not None), None)@@ -788,8 +768,7 @@ def resolve_display_context_length(models.dev reports per-vendor context but provider-enforced limits can be lower (Codex OAuthcaps gpt-5.5 at 272k), so ``agent.model_metadata.get_model_context_length`` is authoritative(it also honors ``custom_providers[].models.<id>.context_length``); ``model_info.context_window``- is the fallback. A ``config_context_length`` pin is dropped when the route changed.- """+ is the fallback. A ``config_context_length`` pin is dropped when the route changed."""if config_context_length is not None and (configured_model or configured_provider or configured_base_url):try:from hermes_cli.route_identity import should_clear_context_pin@@ -968,8 +947,7 @@ def _apply_direct_alias_endpoint(st: "_Switch", da: DirectAlias) -> None:endpoint both 401s and ships the default provider's secret to an unrelated host. The alias'sown endpoint decides: its declared key; else the session key only for the SAME ORIGIN; else afresh resolution against the alias base_url (env-key fallbacks are host-gated: OLLAMA_API_KEY- resolves for ollama.com, OPENROUTER_API_KEY never reaches an unrelated host).- """+ resolves for ollama.com, OPENROUTER_API_KEY never reaches an unrelated host)."""from hermes_cli.models import _same_ollama_native_rootfrom hermes_cli.runtime_provider import resolve_runtime_provideralias_key = direct_alias_api_key(da)@@ -1026,8 +1004,7 @@ class _Switch:The routing steps settle ``target_provider`` / ``new_model`` / ``resolved_alias`` (and maypromote a config-routed ``providers.<slug>`` to ``explicit_provider`` so the credential stepresolves its block); the credential step fills ``api_key`` / ``base_url`` / ``api_mode`` /- ``validation_headers``.- """+ ``validation_headers``."""raw_input: strcurrent_provider: strcurrent_model: str@@ -1243,8 +1220,7 @@ def _creds_for_switched_provider(st: _Switch) -> Optional[ModelSwitchResult]:``providers.<name>`` blocks carry their own base_url + transport + key reference;resolve_runtime_provider() resolves by provider NAME and would re-resolve a block named- "openai" from scratch (or hop to an aggregator), so use the pdef's endpoint directly.- """+ "openai" from scratch (or hop to an aggregator), so use the pdef's endpoint directly."""user_pdef = Noneexplicit_norm = st.explicit_provider.strip().lower()if st.explicit_provider and st.user_providers:@@ -1444,8 +1420,7 @@ def switch_model(Route (PATH A with ``--provider``, else PATH B) -> credentials -> validation -> result; eachstep returns a failure :class:`ModelSwitchResult` to stop the chain, or ``None`` to continue.``user_providers`` / ``custom_providers`` are the config.yaml ``providers:`` dict and- ``custom_providers:`` list.- """+ ``custom_providers:`` list."""st = _Switch(raw_input=raw_input, current_provider=current_provider, current_model=current_model,current_base_url=current_base_url, current_api_key=current_api_key, is_global=is_global,@@ -1473,8 +1448,7 @@ def _scoped_key_env(name: str) -> str:current profile whatever key happens to be in the process environment — another profile's.Identical to ``os.getenv`` when multiplexing is off. A fail-closed ``UnscopedSecretError``(multiplexing on, no scope installed) means "no credential visible for this profile here",- which is exactly how the picker already treats a missing key.- """+ which is exactly how the picker already treats a missing key."""try:from agent.secret_scope import get_secretreturn (get_secret(name, "") or "").strip() if name else ""diff --git a/hermes_cli/model_switch_providers.py b/hermes_cli/model_switch_providers.pyindex 43b0f94bcd3..a80b6b6392f 100644--- a/hermes_cli/model_switch_providers.py+++ b/hermes_cli/model_switch_providers.py@@ -2,8 +2,7 @@list_authenticated_providers / list_picker_providers, and the parallel cache prefetch.Split out of ``hermes_cli/model_switch.py``; every moved name is re-imported there so-``hermes_cli.model_switch.<name>`` keeps resolving (and monkeypatching) as before.-"""+``hermes_cli.model_switch.<name>`` keeps resolving (and monkeypatching) as before."""from __future__ import annotations@@ -30,8 +29,7 @@ def _save_discovered_models_to_config("""Persist a successful ``/v1/models`` probe into the matching ``custom_providers`` entry.Matches by base_url (slash-normalised), api_mode and headers. A failed config write is- swallowed — the picker still shows the live models for this session.- """+ swallowed — the picker still shows the live models for this session."""from hermes_cli.model_switch import _extra_headers_from_configif not api_url or not model_ids:return@@ -71,8 +69,7 @@ def _discovered_catalog_stale(entry: dict, model_ids: list[str]) -> bool:A ``models`` mapping or list of dicts is user-curated per-model metadata — never replaced.A mapping Hermes itself discovered (entry flag or legacy in-mapping sentinel) is ours torefresh, but only when stale; a legacy-shape entry is always rewritten so the save migrates- it to the clean entry-level flag.- """+ it to the clean entry-level flag."""existing = entry.get("models")legacy_discovered = isinstance(existing, dict) and existing.get("__discovered_model_catalog__") is Trueentry_discovered = entry.get("models_discovered") is True or legacy_discovered@@ -138,8 +135,7 @@ def _credential_pool_is_usable(provider: str, *, raw_pool_present: bool = False)Legacy opaque ``auth.json`` pool values that do not deserialize into ``PooledCredential``stay visible (``raw_pool_present``); a real pool's availability is authoritative — an- all-exhausted/dead pool is not authenticated.- """+ all-exhausted/dead pool is not authenticated."""try:from agent.credential_pool import load_poolpool = load_pool(provider)@@ -155,8 +151,7 @@ def prewarm_picker_cache_async() -> Optional["_threading.Thread"]:The first ``/model`` open (or the first after the 1h TTL) otherwise blocks ~1-2s on seriallive ``/v1/models`` fetches. Fire-and-forget, at most once per process, fully- exception-isolated. Returns the thread (for tests) or None if already warmed.- """+ exception-isolated. Returns the thread (for tests) or None if already warmed."""from hermes_cli.model_switch import list_authenticated_providersif _picker_prewarm_done.is_set():return None@@ -185,8 +180,7 @@ def _prefetch_provider_models_parallel(provider_slugs: list[str]) -> None:On a cold cache the serial loop would block 1-8s per provider; after the prefetch the wait isthe slowest single provider. Each worker re-persists through the thread-safe- ``update_provider_cache_entry`` so concurrent writes cannot clobber each other.- """+ ``update_provider_cache_entry`` so concurrent writes cannot clobber each other."""from hermes_cli.models import (_PROVIDER_MODELS_CACHE_TTL, _credential_fingerprint, _load_provider_models_cache,cached_provider_model_ids, normalize_provider)@@ -245,8 +239,7 @@ def _iter_builtin_candidates(models_dev_data: dict, excluded: set, seen: set):Skips vendor names that alias through an aggregator (bare "openai" -> "openrouter" wouldsilently switch a user onto an endpoint they may have no key for), aliases of another canonicalprofile ("kimi" -> "kimi-coding"), non-api_key auth types (section 2 handles them) and- unroutable providers. PROVIDER_REGISTRY env var names win over models.dev's.- """+ unroutable providers. PROVIDER_REGISTRY env var names win over models.dev's."""from agent.models_dev import PROVIDER_TO_MODELS_DEVfrom hermes_cli.auth import PROVIDER_REGISTRY, is_runtime_provider_routablefrom hermes_cli.models import _AGGREGATOR_PROVIDERS@@ -315,8 +308,7 @@ def _overlay_has_env_creds(pid: str, hermes_slug: str, overlay, read_env) -> boo"""Section-2 env/SDK credential check shared by the picker and the prefetch scan.Vertex authenticates via OAuth2 (service-account JSON / ADC), not an API key, so it gets its- own probe; otherwise the provider is hidden from the picker even when fully configured.- """+ own probe; otherwise the provider is hidden from the picker even when fully configured."""from hermes_cli.auth import PROVIDER_REGISTRYhas_creds = Falseif overlay.auth_type == "vertex":@@ -339,8 +331,7 @@ def _has_fast_aws_sdk_signal() -> bool:"""True when explicit AWS auth config is present in the environment.Deliberately avoids botocore's full credential chain: picker discovery runs for non-Bedrock- providers too, and botocore may probe EC2 IMDS (169.254.169.254) before giving up.- """+ providers too, and botocore may probe EC2 IMDS (169.254.169.254) before giving up."""def _set(name: str) -> bool:return bool(os.environ.get(name, "").strip())return (@@ -510,8 +501,7 @@ def _discover_endpoint_models(warm same-fingerprint cache entry still serves the full catalog with no round-trip.``has_explicit_models`` gates the *probe* (a network-cost guard for keyless endpoints thatdeclare a catalog), never the cache read — applying it to the read re-pins the endpoint to- its declared subset. Returns ``(None, False)`` when nothing usable was found.- """+ its declared subset. Returns ``(None, False)`` when nothing usable was found."""from hermes_cli.model_switch import _fetch_picker_live_modelstimeout = 1.5 if for_picker else 5.0if probe_live:@@ -544,8 +534,7 @@ def _collect_authed_provider_slugs(Mirrors the credential checks of sections 1, 2 and 2b of :func:`list_authenticated_providers`but never calls ``cached_provider_model_ids``; feeds :func:`_prefetch_provider_models_parallel`.Env vars are read through the per-profile secret scope. AWS SDK providers are skipped- (heavier detection).- """+ (heavier detection)."""from hermes_cli.model_switch import _scoped_key_envfrom agent.models_dev import PROVIDER_TO_MODELS_DEVfrom hermes_cli.auth import PROVIDER_REGISTRY@@ -1034,8 +1023,7 @@ def list_authenticated_providers(``force_fresh_nous_tier`` bypasses the short Nous tier cache (account-sensitive flows only);``refresh`` busts the model-id disk cache up front (explicit user action only);``probe_custom_providers`` enables live ``/models`` discovery for saved custom endpoints (CLI- true, GUI false); ``probe_current_custom_provider`` probes only the selected custom endpoint.- """+ true, GUI false); ``probe_current_custom_provider`` probes only the selected custom endpoint."""from hermes_cli.model_switch import _collect_authed_provider_slugs, _prefetch_provider_models_parallelfrom agent.models_dev import fetch_models_devfrom hermes_cli.config import coerce_provider_id, stringify_provider_map@@ -1128,8 +1116,7 @@ def _prepend_moa_picker_provider(providers: List[dict], current_provider: str =``list_authenticated_providers()`` only returns real/auth-backed providers; the CLI inventoryadds MoA separately, so gateway pickers need the same virtual row here. Reuses the- inventory's single row builder so the row shape stays defined in one place.- """+ inventory's single row builder so the row shape stays defined in one place."""try:from hermes_cli.inventory import _moa_provider_rowmoa_row = _moa_provider_row(current_provider)@@ -1148,8 +1135,7 @@ def list_picker_providers(OpenRouter's list is replaced with :func:`hermes_cli.models.fetch_openrouter_models` (curatedsnapshot filtered against the live catalog) and rows left with no models are dropped — except- custom endpoints, where the user may supply their own model set through config.- """+ custom endpoints, where the user may supply their own model set through config."""from hermes_cli.model_switch import list_authenticated_providersfrom hermes_cli.models import fetch_openrouter_modelsproviders = list_authenticated_providers(