28 lines
1.5 KiB
Python
28 lines
1.5 KiB
Python
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
def test_qwen3_is_active_runtime_model_not_unused_ollama_weight():
|
|
openclaw_source = (ROOT / "services" / "openclaw_strategist_service.py").read_text(encoding="utf-8")
|
|
nemotron_source = (ROOT / "services" / "nemoton_dispatcher_service.py").read_text(encoding="utf-8")
|
|
candidate_source = (ROOT / "services" / "nemotron_runtime_candidate_service.py").read_text(encoding="utf-8")
|
|
router_source = (ROOT / "services" / "llm_model_router.py").read_text(encoding="utf-8")
|
|
|
|
assert "OPENCLAW_QA_OLLAMA_MODEL = os.getenv('OPENCLAW_QA_OLLAMA_MODEL', 'qwen3:14b')" in openclaw_source
|
|
assert "def _call_qwen3_qa(" in openclaw_source
|
|
assert "OllamaService(model=OPENCLAW_QA_OLLAMA_MODEL)" in openclaw_source
|
|
assert "OPENCLAW_QA_OLLAMA_HOST" not in openclaw_source
|
|
assert "OPENCLAW_STRATEGY_OLLAMA_KEEP_ALIVE = os.getenv('OPENCLAW_STRATEGY_OLLAMA_KEEP_ALIVE', '5m')" in openclaw_source
|
|
assert "keep_alive=OPENCLAW_STRATEGY_OLLAMA_KEEP_ALIVE" in openclaw_source
|
|
assert 'keep_alive="24h"' not in openclaw_source
|
|
assert "NEMOTRON_OLLAMA_MODEL = PRIMARY_MODEL" in nemotron_source
|
|
assert "def _call_qwen3_dispatch(" in nemotron_source
|
|
assert "for candidate in build_nemotron_runtime_candidates(" in nemotron_source
|
|
assert "inspect_nemotron_model_identity(" in nemotron_source
|
|
assert '"qwen3:14b"' in candidate_source
|
|
assert '"qwen3:8b"' in candidate_source
|
|
assert 'label="ollama_111_fallback"' in candidate_source
|
|
assert "'qwen3:14b'" in router_source
|