diff --git a/tests/gateway/test_fast_command.py b/tests/gateway/test_fast_command.py index c904b659d1b..58db9faf05e 100644 --- a/tests/gateway/test_fast_command.py +++ b/tests/gateway/test_fast_command.py @@ -148,6 +148,15 @@ async def test_run_agent_passes_priority_processing_to_gateway_agent(monkeypatch monkeypatch.setattr(gateway_run, "_env_path", tmp_path / ".env") monkeypatch.setattr(gateway_run, "load_dotenv", lambda *args, **kwargs: None) monkeypatch.setattr(gateway_run, "_load_gateway_config", lambda: {}) + # ``_load_service_tier`` was refactored to call ``_load_gateway_runtime_config`` + # (which wraps ``_load_gateway_config`` plus env-expansion). Since the test + # stubs ``_load_gateway_config`` to ``{}``, also stub the runtime wrapper + # directly so the priority routing assertions still exercise the live tier. + monkeypatch.setattr( + gateway_run, + "_load_gateway_runtime_config", + lambda: {"agent": {"service_tier": "fast"}}, + ) monkeypatch.setattr(gateway_run, "_resolve_gateway_model", lambda config=None: "gpt-5.4") monkeypatch.setattr( gateway_run,