fix(api): align kb extractor ollama model
This commit is contained in:
16
apps/api/tests/test_knowledge_extractor_model.py
Normal file
16
apps/api/tests/test_knowledge_extractor_model.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from src.core.config import settings
|
||||
from src.services import knowledge_extractor_service
|
||||
|
||||
|
||||
def test_extract_model_uses_configured_ollama_tool_model(monkeypatch):
|
||||
"""KB extractor must use a configured model that exists on GCP Ollama."""
|
||||
monkeypatch.setattr(settings, "OLLAMA_TOOL_MODEL", "hermes3:latest")
|
||||
|
||||
assert knowledge_extractor_service._get_extract_model() == "hermes3:latest"
|
||||
|
||||
|
||||
def test_extract_model_falls_back_to_hermes_when_config_empty(monkeypatch):
|
||||
"""Empty runtime config should not fall back to the removed llama3.2 model."""
|
||||
monkeypatch.setattr(settings, "OLLAMA_TOOL_MODEL", "")
|
||||
|
||||
assert knowledge_extractor_service._get_extract_model() == "hermes3:latest"
|
||||
Reference in New Issue
Block a user