The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(providers): stop forwarding provider_routing prefs to Nous Portal
webtecnicaba7d2a863346
diff --git a/plugins/model-providers/nous/__init__.py b/plugins/model-providers/nous/__init__.pyindex 1c28cef37f2..2e37e3d4a3f 100644--- a/plugins/model-providers/nous/__init__.py+++ b/plugins/model-providers/nous/__init__.py@@ -29,9 +29,10 @@ class NousProfile(ProviderProfile):sticky_key = _cache_scope_from_session_id(get_affinity_scope() or get_conversation_context() or session_id)if sticky_key:body["session_id"] = sticky_key- provider_preferences = context.get("provider_preferences")- if provider_preferences:- body["provider"] = provider_preferences+ # Nous Portal inference rejects caller-supplied provider routing prefs+ # (only/ignore/order/sort/data_collection/zdr/require_parameters) with+ # HTTP 400 — routing is decided centrally per model. provider_routing+ # from config.yaml is OpenRouter-only, so it is not forwarded here.return body@staticmethoddiff --git a/tests/providers/test_provider_profiles.py b/tests/providers/test_provider_profiles.pyindex e28445abde0..1507dbdf855 100644--- a/tests/providers/test_provider_profiles.py+++ b/tests/providers/test_provider_profiles.py@@ -225,6 +225,15 @@ class TestNousProfile:assert first["session_id"] == "cron_job42"assert first["session_id"] == second["session_id"]+ def test_extra_body_ignores_provider_preferences(self):+ """Nous Portal rejects caller-supplied provider routing prefs (HTTP 400)."""+ p = get_provider_profile("nous")+ body = p.build_extra_body(+ provider_preferences={"allow": ["anthropic"], "sort": "price"}+ )+ assert "provider" not in body+ assert "tags" in body+