From cf3fe5e0a544384c37cc00b0cd1a1595d8a39721 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Sat, 16 May 2026 13:38:06 -0400 Subject: [PATCH] fix: await get_all() in registry router and align get_all key names The /registry/agents endpoint was 500 on every call because AgentRegistry.get_all() is async but was called without await. Also aligns get_all() dict keys (name, domain) with what the router reads. Co-Authored-By: Claude Sonnet 4.6 --- agent_service/agents/registry.py | 3 ++- agent_service/routers/registry.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/agent_service/agents/registry.py b/agent_service/agents/registry.py index 97821f6..7f6c70a 100644 --- a/agent_service/agents/registry.py +++ b/agent_service/agents/registry.py @@ -62,9 +62,10 @@ class AgentRegistry: async def get_all(self): return [ { + 'name': k, 'agent_key': k, + 'domain': self._capabilities.get(k, ''), 'active': k in self._active, - 'capabilities_summary': self._capabilities.get(k, ''), 'has_instance': k in self._agents, } for k in self._agents diff --git a/agent_service/routers/registry.py b/agent_service/routers/registry.py index ba98385..028b9a1 100644 --- a/agent_service/routers/registry.py +++ b/agent_service/routers/registry.py @@ -31,7 +31,7 @@ async def list_agents(): llm_router = get_llm_router() if registry is None: raise HTTPException(status_code=status.HTTP_503_SERVICE_UNAVAILABLE, detail='Registry not ready') - agents = registry.get_all() + agents = await registry.get_all() result = [] for agent in agents: backend = 'ollama'