mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-29 15:23:51 +00:00
Narrow the scope of toolgroup exception catching
Signed-off-by: Ben Browning <bbrownin@redhat.com>
This commit is contained in:
parent
4867ed21b5
commit
c5f65b08bb
1 changed files with 13 additions and 13 deletions
|
@ -52,10 +52,9 @@ class ToolGroupsRoutingTable(CommonRoutingTableImpl, ToolGroups):
|
||||||
|
|
||||||
all_tools = []
|
all_tools = []
|
||||||
for toolgroup in toolgroups:
|
for toolgroup in toolgroups:
|
||||||
try:
|
|
||||||
if toolgroup.identifier not in self.toolgroups_to_tools:
|
if toolgroup.identifier not in self.toolgroups_to_tools:
|
||||||
|
try:
|
||||||
await self._index_tools(toolgroup)
|
await self._index_tools(toolgroup)
|
||||||
all_tools.extend(self.toolgroups_to_tools[toolgroup.identifier])
|
|
||||||
except AuthenticationRequiredError:
|
except AuthenticationRequiredError:
|
||||||
# Send authentication errors back to the client so it knows
|
# Send authentication errors back to the client so it knows
|
||||||
# that it needs to supply credentials for remote MCP servers.
|
# that it needs to supply credentials for remote MCP servers.
|
||||||
|
@ -66,6 +65,7 @@ class ToolGroupsRoutingTable(CommonRoutingTableImpl, ToolGroups):
|
||||||
logger.warning(f"Error listing tools for toolgroup {toolgroup.identifier}: {e}")
|
logger.warning(f"Error listing tools for toolgroup {toolgroup.identifier}: {e}")
|
||||||
logger.debug(e, exc_info=True)
|
logger.debug(e, exc_info=True)
|
||||||
continue
|
continue
|
||||||
|
all_tools.extend(self.toolgroups_to_tools[toolgroup.identifier])
|
||||||
|
|
||||||
return ListToolsResponse(data=all_tools)
|
return ListToolsResponse(data=all_tools)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue