Skip to content

The agent that grows with you

refactor(inventory): build the gated-Astra warning tail instead of string-replacing a sentence

kshitijk4poorf850bc58edc6
diff --git a/hermes_cli/inventory.py b/hermes_cli/inventory.py
index 8d84ecdadd2..eefb2f853cc 100644
--- a/hermes_cli/inventory.py
+++ b/hermes_cli/inventory.py
@@ -421,15 +421,15 @@ def _append_unconfigured_rows(
if entry.slug.lower() == cur:
saved_model = "" if _model_requires_account_discovery(entry.slug, cur_model) else cur_model
auth_type, key_env = _provider_auth_hint(entry.slug)
+ tail = (
+ "Astra requires successful account-scoped model discovery."
+ if cur_model and not saved_model else "Showing the saved model only."
+ )
warning = (
- f"Configured provider missing usable credentials; paste {key_env} to reactivate. "
- "Showing the saved model only."
+ f"Configured provider missing usable credentials; paste {key_env} to reactivate. {tail}"
if auth_type == "api_key" and key_env
- else "Configured provider is not authenticated; run `hermes model` to reactivate. "
- "Showing the saved model only."
+ else f"Configured provider is not authenticated; run `hermes model` to reactivate. {tail}"
)
- if cur_model and not saved_model:
- warning = warning.replace("Showing the saved model only.", "Astra requires successful account-scoped model discovery.")
extras.append(_canonical_row(
entry, cur, models=[saved_model] if saved_model else [], total_models=1 if saved_model else 0,
source="configured-current", authenticated=False, auth_type=auth_type, key_env=key_env,