fix(cli): warn when --provider default_model cannot be resolved

A named --provider without -m used to swallow lookup failures and
silently keep the global model.default. Log the resolution error so
the fallback is visible.
This commit is contained in:
Christopher
2026-08-15 22:27:04 +02:00
committed by Teknium
parent d6688adcc2
commit 3cbd86aac8
2 changed files with 34 additions and 1 deletions
+7 -1
View File
@@ -4865,7 +4865,13 @@ class HermesCLI(CLIAgentSetupMixin, CLICommandsMixin, CLIBillingMixin):
from hermes_cli.runtime_provider import _get_named_custom_provider
_named_custom = _get_named_custom_provider(provider)
except Exception:
except Exception as exc:
logger.warning(
"Could not resolve --provider %s default model; "
"keeping global model.default (%s)",
provider,
exc,
)
_named_custom = None
_provider_default = str((_named_custom or {}).get("model") or "").strip()
if _provider_default: