feat(api): route the npc role to its own model

This commit is contained in:
2026-07-10 12:11:54 -05:00
parent 69729f7673
commit 6cd5003930
3 changed files with 18 additions and 0 deletions

View File

@@ -19,3 +19,11 @@ def test_env_overrides_model(monkeypatch):
def test_unknown_role_raises():
with pytest.raises(KeyError):
for_role("wizard")
def test_npc_role_routes_to_npc_model(monkeypatch):
monkeypatch.setenv("OLLAMA_NPC_MODEL", "some-npc-model")
cfg = for_role("npc")
assert cfg.model == "some-npc-model"
assert cfg.think is False
assert "num_predict" in cfg.options