The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test: the two remaining native-wire contracts select nous.anthropic_wire=native explicitly
Teknium335ecf9f4a0f
diff --git a/tests/run_agent/test_provider_fallback.py b/tests/run_agent/test_provider_fallback.pyindex 434ee306e6e..8fffe2dda71 100644--- a/tests/run_agent/test_provider_fallback.py+++ b/tests/run_agent/test_provider_fallback.py@@ -215,13 +215,16 @@ class TestFallbackChainAdvancement:assert mock_rpc.call_args.kwargs["explicit_api_key"] == "env-secret"- def test_nous_anthropic_fallback_uses_the_messages_wire(self):- """Portal Claude fallbacks must not stay on chat_completions.+ def test_nous_anthropic_fallback_uses_the_messages_wire(self, monkeypatch):+ """Portal Claude fallbacks must not stay on chat_completions when the native wire is selected.``resolve_provider_client`` still returns an OpenAI client for Nous;activation has to re-derive api_mode from the model and rebuild the- Anthropic client — otherwise the turn POSTs /chat/completions.+ Anthropic client — otherwise the turn POSTs /chat/completions. The wire+ is opt-in since 2026-09-06 (``nous.anthropic_wire``, see ``nous_api_mode``)."""+ from hermes_cli import providers as _providers+ monkeypatch.setattr(_providers, "_nous_anthropic_wire", lambda: "native")portal = "https://inference-api.nousresearch.com/v1"fbs = [{diff --git a/tests/tools/test_delegate.py b/tests/tools/test_delegate.pyindex 63d28cc121d..58cb77fdc88 100644--- a/tests/tools/test_delegate.py+++ b/tests/tools/test_delegate.py@@ -423,7 +423,12 @@ class TestDelegateTask(unittest.TestCase):def test_nous_child_rederives_api_mode_from_model(self):"""Portal is dual-wire — same provider + different model prefix must- not inherit the parent's Messages/chat_completions mode verbatim."""+ not inherit the parent's Messages/chat_completions mode verbatim.+ Native wire selected (opt-in since 2026-09-06, ``nous.anthropic_wire``)."""+ with patch("hermes_cli.providers._nous_anthropic_wire", return_value="native"):+ self._nous_child_rederives_api_mode_from_model()++ def _nous_child_rederives_api_mode_from_model(self):parent = _make_mock_parent(depth=0)parent.base_url = "https://inference-api.nousresearch.com/v1"parent.api_key = "portal-jwt"