mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-28 06:32:00 +00:00
fix
This commit is contained in:
parent
cad1c9b4c9
commit
12dfcd11d9
3 changed files with 21 additions and 9 deletions
|
|
@ -589,6 +589,15 @@ class OpenAIResponsesImpl:
|
|||
chat_tools.append(ChatCompletionToolParam(type="function", function=input_tool.model_dump()))
|
||||
elif input_tool.type == "web_search":
|
||||
tool_name = "web_search"
|
||||
|
||||
# we need to list all the toolgroups so tools can be found. avoid MCPs because they
|
||||
# may need authentication.
|
||||
groups = await self.tool_groups_api.list_tool_groups()
|
||||
for group in groups:
|
||||
if not group.mcp_endpoint:
|
||||
continue
|
||||
_ = await self.tool_groups_api.list_tools(group.identifier)
|
||||
|
||||
tool = await self.tool_groups_api.get_tool(tool_name)
|
||||
if not tool:
|
||||
raise ValueError(f"Tool {tool_name} not found")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue