mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-23 16:35:59 +00:00
Previously, the list endpoint always returned soul=null because
_agent_config_to_response() was called without include_soul=True.
This caused confusion since PUT /api/agents/{name} and GET /api/agents/{name}
both returned the soul content, but the list endpoint silently omitted it.
Co-authored-by: octo-patch <octo-patch@users.noreply.github.com>
This commit is contained in:
@@ -439,6 +439,15 @@ class TestAgentsAPI:
|
||||
assert "agent-one" in names
|
||||
assert "agent-two" in names
|
||||
|
||||
def test_list_agents_includes_soul(self, agent_client):
|
||||
agent_client.post("/api/agents", json={"name": "soul-agent", "soul": "My soul content"})
|
||||
|
||||
response = agent_client.get("/api/agents")
|
||||
assert response.status_code == 200
|
||||
agents = response.json()["agents"]
|
||||
soul_agent = next(a for a in agents if a["name"] == "soul-agent")
|
||||
assert soul_agent["soul"] == "My soul content"
|
||||
|
||||
def test_get_agent(self, agent_client):
|
||||
agent_client.post("/api/agents", json={"name": "test-agent", "soul": "Hello world"})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user