from __future__ import annotations import pytest from schemas.agent.system_agent import SystemAgentLLMConfig def test_system_agent_llm_config_normalizes_enabled_tools_aliases() -> None: config = SystemAgentLLMConfig.model_validate( { "enabled_tools": [ "calendar.write", "calendar_write", "user.lookup", ] } ) assert [tool.value for tool in config.enabled_tools] == [ "calendar.write", "user.lookup", ] def test_system_agent_llm_config_rejects_unknown_enabled_tool() -> None: with pytest.raises(ValueError, match="unknown enabled tool"): SystemAgentLLMConfig.model_validate( { "enabled_tools": ["calendar.remove"], } )