refactor: unify skills+cli runtime and streamline ag-ui flow
This commit is contained in:
@@ -5,27 +5,20 @@ import pytest
|
||||
from schemas.agent.system_agent import SystemAgentLLMConfig
|
||||
|
||||
|
||||
def test_system_agent_llm_config_normalizes_enabled_tools_aliases() -> None:
|
||||
def test_system_agent_llm_config_normalizes_enabled_skills() -> None:
|
||||
config = SystemAgentLLMConfig.model_validate(
|
||||
{
|
||||
"enabled_tools": [
|
||||
"calendar.write",
|
||||
"calendar_write",
|
||||
"user.lookup",
|
||||
]
|
||||
"enabled_skills": ["calendar", "calendar", "contacts"]
|
||||
}
|
||||
)
|
||||
|
||||
assert [tool.value for tool in config.enabled_tools] == [
|
||||
"calendar.write",
|
||||
"user.lookup",
|
||||
]
|
||||
assert [skill.value for skill in config.enabled_skills] == ["calendar", "contacts"]
|
||||
|
||||
|
||||
def test_system_agent_llm_config_rejects_unknown_enabled_tool() -> None:
|
||||
with pytest.raises(ValueError, match="unknown enabled tool"):
|
||||
def test_system_agent_llm_config_rejects_unknown_enabled_skill() -> None:
|
||||
with pytest.raises(ValueError):
|
||||
SystemAgentLLMConfig.model_validate(
|
||||
{
|
||||
"enabled_tools": ["calendar.remove"],
|
||||
"enabled_skills": ["calendar.remove"],
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user