From 48ee9f22e5ca66f154803bde40ff12cf1de1fcc5 Mon Sep 17 00:00:00 2001 From: OoO Date: Wed, 13 May 2026 21:28:33 +0800 Subject: [PATCH] test: pin nemotron fallback to nim path --- tests/test_nemotron_fallback.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/test_nemotron_fallback.py b/tests/test_nemotron_fallback.py index 57d5c79..789e78b 100644 --- a/tests/test_nemotron_fallback.py +++ b/tests/test_nemotron_fallback.py @@ -1,5 +1,18 @@ from dataclasses import dataclass +import pytest + + +@pytest.fixture(autouse=True) +def _force_legacy_nim_first(monkeypatch): + """Fallback tests cover the legacy NIM path, not live qwen3/Ollama routing.""" + import services.nemoton_dispatcher_service as module + + module._ALERT_CACHE.clear() + monkeypatch.setattr(module, "NEMOTRON_OLLAMA_FIRST", False) + yield + module._ALERT_CACHE.clear() + @dataclass class FakeThreat: