From 8337d45c052d0d4ec96e8cea53986396c4265c20 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Tue, 30 Jun 2026 13:58:00 -0700 Subject: [PATCH] test(moa): reconcile slot-survives-resolution test with anthropic name-preserve MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #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). --- tests/run_agent/test_moa_loop_mode.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/run_agent/test_moa_loop_mode.py b/tests/run_agent/test_moa_loop_mode.py index 19057b21b..ff2f31b7e 100644 --- a/tests/run_agent/test_moa_loop_mode.py +++ b/tests/run_agent/test_moa_loop_mode.py @@ -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