From a3671787b0858784fae5b3567f17effc2479f263 Mon Sep 17 00:00:00 2001 From: Victor Nogueira Date: Tue, 25 Aug 2026 22:30:55 +0800 Subject: [PATCH] fix(cli): clarify unverified custom model warning --- hermes_cli/models_validate.py | 6 ++++++ tests/hermes_cli/test_model_validation.py | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/hermes_cli/models_validate.py b/hermes_cli/models_validate.py index fd9a34f9cf..ede53fa602 100644 --- a/hermes_cli/models_validate.py +++ b/hermes_cli/models_validate.py @@ -276,6 +276,12 @@ def _validate_custom(req: _Request) -> dict[str, Any]: if anthropic_style: message += ("\n Many Anthropic-compatible proxies do not implement the Models API (GET /v1/models). " "The model name has been accepted without verification.") + if req.api_mode == "chat_completions": + message += ( + "\n The model name was accepted without verification — inference may fail " + "if this provider does not serve it. Check the provider's model catalog " + "or model name." + ) if probe.get("suggested_base_url"): message += f"\n If this server expects `/v1`, try base URL: `{probe.get('suggested_base_url')}`" # Chat-completions and Anthropic-style proxies may both omit /v1/models. diff --git a/tests/hermes_cli/test_model_validation.py b/tests/hermes_cli/test_model_validation.py index a6d5b6f5b1..bdd8c4ec51 100644 --- a/tests/hermes_cli/test_model_validation.py +++ b/tests/hermes_cli/test_model_validation.py @@ -836,6 +836,9 @@ class TestValidateCustomUnreachableFallback: assert result["persist"] is True assert result["recognized"] is False assert "could not reach" in result["message"] + assert "accepted without verification" in result["message"] + assert "inference may fail" in result["message"] + assert "provider's model catalog" in result["message"] def test_named_custom_chat_completions_accepted_when_unreachable(self): result = self._validate( @@ -846,6 +849,9 @@ class TestValidateCustomUnreachableFallback: assert result["persist"] is True assert result["recognized"] is False assert "could not reach" in result["message"] + assert "accepted without verification" in result["message"] + assert "inference may fail" in result["message"] + assert "provider's model catalog" in result["message"] def test_unreachable_warning_includes_suggested_base_url_hint(self): result = self._validate( @@ -854,6 +860,9 @@ class TestValidateCustomUnreachableFallback: ) assert result["accepted"] is True assert "If this server expects `/v1`" in result["message"] + assert "accepted without verification" in result["message"] + assert "inference may fail" in result["message"] + assert "provider's model catalog" in result["message"] def test_anthropic_messages_fallback_unchanged(self): result = self._validate(