Files
PlantAI-rag/tests/test_qa_v1_1_73_agentic_config.py

18 lines
557 B
Python

from src.rag.qa_v1_1_73.config import QAConfig
def test_agentic_controller_is_enabled_by_default(monkeypatch):
monkeypatch.delenv("QA_V1_ENABLE_AGENTIC_CONTROLLER", raising=False)
monkeypatch.delenv("QA_V1_AGENTIC_MAX_REPLANS", raising=False)
config = QAConfig.from_env()
assert config.enable_agentic_controller is True
assert config.agentic_max_replans == 2
def test_agentic_replans_are_clamped_to_two(monkeypatch):
monkeypatch.setenv("QA_V1_AGENTIC_MAX_REPLANS", "9")
assert QAConfig.from_env().agentic_max_replans == 2