fix(agent): scope Nous tags to Nous auxiliary calls

This commit is contained in:
achaljhawar
2026-06-13 13:24:40 -07:00
committed by Teknium
parent 08890d77e6
commit 819def44c7
3 changed files with 43 additions and 1 deletions
+41
View File
@@ -146,6 +146,47 @@ class TestBuildCallKwargsMaxTokens:
assert "max_completion_tokens" not in kwargs
class TestNousTagsScoping:
def test_tags_injected_when_provider_is_nous(self, monkeypatch):
import agent.auxiliary_client as aux
monkeypatch.setattr(aux, "auxiliary_is_nous", False)
kwargs = aux._build_call_kwargs(
provider="nous",
model="hermes-4",
messages=[{"role": "user", "content": "hi"}],
)
assert kwargs["extra_body"]["tags"] == aux._nous_portal_tags()
def test_tags_not_injected_for_gemini_when_main_is_nous(self, monkeypatch):
import agent.auxiliary_client as aux
monkeypatch.setattr(aux, "auxiliary_is_nous", True)
kwargs = aux._build_call_kwargs(
provider="gemini",
model="gemini-2.5-flash",
messages=[{"role": "user", "content": "hi"}],
)
assert "extra_body" not in kwargs
def test_tags_not_injected_for_openrouter_when_main_is_nous(self, monkeypatch):
import agent.auxiliary_client as aux
monkeypatch.setattr(aux, "auxiliary_is_nous", True)
kwargs = aux._build_call_kwargs(
provider="openrouter",
model="openai/gpt-5.4",
messages=[{"role": "user", "content": "hi"}],
)
assert "extra_body" not in kwargs
class TestNormalizeAuxProvider:
def test_maps_github_copilot_aliases(self):
assert _normalize_aux_provider("github") == "copilot"