test(moa): reconcile slot-survives-resolution test with anthropic name-preserve

#54609 moves anthropic into the _slot_runtime name-preservation set (it must
NOT forward base_url/api_key — OAuth sk-ant-oat* needs the provider branch's
Bearer + anthropic-beta header). The pre-existing parametrized
test_moa_provider_backed_slot_survives_aux_resolution still listed anthropic
asserting the forward path, contradicting the new behavior. anthropic is now
covered by test_slot_runtime_anthropic_oauth_routes_through_provider_branch;
drop it from the forward-path parametrize (minimax-oauth/qwen-oauth remain).
This commit is contained in:
teknium1
2026-06-30 13:58:00 -07:00
committed by Teknium
parent 7cb85733b8
commit 8337d45c05

View File

@@ -200,7 +200,7 @@ def test_moa_codex_slot_preserves_provider_identity(monkeypatch):
assert rt == {"provider": "openai-codex", "model": "gpt-5.5"}
@pytest.mark.parametrize("provider", ["anthropic", "minimax-oauth", "qwen-oauth"])
@pytest.mark.parametrize("provider", ["minimax-oauth", "qwen-oauth"])
def test_moa_provider_backed_slot_survives_aux_resolution(monkeypatch, provider):
"""MoA can pass resolved endpoints for provider-backed slots without
call_llm flattening them to generic custom endpoints.
@@ -211,6 +211,11 @@ def test_moa_provider_backed_slot_survives_aux_resolution(monkeypatch, provider)
via ``_resolve_task_provider_model`` (which takes everything except
``api_mode``, handled separately). The provider identity must survive that
resolution rather than being flattened to ``custom``.
NOTE: providers in the ``_slot_runtime`` name-preservation set (anthropic,
bedrock, nous, openai-codex, xai-oauth) are intentionally NOT forwarded —
they're covered by their own dedicated tests. This case covers the
forward-the-resolved-endpoint path for providers that are NOT in the set.
"""
from agent import moa_loop
from agent.auxiliary_client import _resolve_task_provider_model