Spaces:
Running
Running
File size: 1,169 Bytes
65ba59e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | """Test that practice_generation task type is properly routed to a model."""
from __future__ import annotations
import os
import sys
import pytest
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from services.inference_client import get_model_for_task
class TestPracticeRouting:
"""Verify practice_generation routing."""
def test_practice_generation_resolves_to_model(self):
"""get_model_for_task('practice_generation') should return a model string."""
model = get_model_for_task("practice_generation")
assert model is not None
assert isinstance(model, str)
assert len(model) > 0
def test_practice_generation_not_same_as_quiz_generation_alias(self):
"""practice_generation and quiz_generation are distinct task types."""
practice_model = get_model_for_task("practice_generation")
quiz_model = get_model_for_task("quiz_generation")
# Both route to deepseek-chat but via separate config keys
# The important thing is they map through different env vars
assert "deepseek" in practice_model.lower()
assert "deepseek" in quiz_model.lower() |