diff --git a/cli.py b/cli.py index 723a7554d..7f2b2394a 100755 --- a/cli.py +++ b/cli.py @@ -2795,7 +2795,11 @@ class HermesCLI: base_url_for_probe = runtime.get("base_url", "") except Exception as e: provider_label = _PROVIDER_LABELS.get(target_provider, target_provider) - print(f"(>_<) Could not resolve credentials for provider '{provider_label}': {e}") + if target_provider == "custom": + print(f"(>_<) Custom endpoint not configured. Set OPENAI_BASE_URL and OPENAI_API_KEY,") + print(f" or run: hermes setup → Custom OpenAI-compatible endpoint") + else: + print(f"(>_<) Could not resolve credentials for provider '{provider_label}': {e}") print(f"(^_^) Current model unchanged: {self.model}") return True diff --git a/hermes_cli/models.py b/hermes_cli/models.py index 0df1d3095..54d4e3c16 100644 --- a/hermes_cli/models.py +++ b/hermes_cli/models.py @@ -276,6 +276,15 @@ def validate_requested_model( "message": "Model names cannot contain spaces.", } + # Custom endpoints can serve any model — skip validation + if normalized == "custom": + return { + "accepted": True, + "persist": True, + "recognized": False, + "message": None, + } + # Probe the live API to check if the model actually exists api_models = fetch_api_models(api_key, base_url)