Repository navigation
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Please read this first
- Have you read the docs?Agents SDK docs
- Have you searched for related issues? Others may have faced similar issues.
Describe the bug
when using chatcompletionmodel with multiple hosted tools
triage_agent = Agent(
name='Triage Agent',
model=OpenAIChatCompletionsModel(
model='gpt-4.1-mini',
openai_client=client,
),
instructions=config.triage_agent_instruction,
model_settings=model_settings,
tools=[weather_info, query_tourist_flow_rate],
handoffs=[rag_agent],
)if user ask for multiple tool calls, it generates error
agents.exceptions.ModelBehaviorError: Tool weather_infoquery_tourist_flow_rate not found in agent Triage Agentwhich has tools name concatted
it seems items don't have index but different id
** [ChoiceDeltaToolCall(index=0, id='call_cPe57YrMaFpbXhQYRIBFTbmO', function=ChoiceDeltaToolCallFunction(arguments='', name='weather_info'), type='function')]
* ChoiceDeltaToolCall(index=0, id='call_cPe57YrMaFpbXhQYRIBFTbmO', function=ChoiceDeltaToolCallFunction(arguments='', name='weather_info'), type='function')
** [ChoiceDeltaToolCall(index=0, id=None, function=ChoiceDeltaToolCallFunction(arguments='{"administrative_district":"abc"}', name=None), type='function')]
* ChoiceDeltaToolCall(index=0, id=None, function=ChoiceDeltaToolCallFunction(arguments='{"administrative_district":"abc"}', name=None), type='function')
** [ChoiceDeltaToolCall(index=0, id='call_oiLhVNjG001wkgGmIthY6lxg', function=ChoiceDeltaToolCallFunction(arguments='', name='query_tourist_flow_rate'), type='function')]
* ChoiceDeltaToolCall(index=0, id='call_oiLhVNjG001wkgGmIthY6lxg', function=ChoiceDeltaToolCallFunction(arguments='', name='query_tourist_flow_rate'), type='function')
** [ChoiceDeltaToolCall(index=0, id=None, function=ChoiceDeltaToolCallFunction(arguments='{"scenic_areas":["ddd"]}', name=None), type='function')]
* ChoiceDeltaToolCall(index=0, id=None, function=ChoiceDeltaToolCallFunction(arguments='{"scenic_areas":["ddd"]}', name=None), type='function')should fix the index or make use of the id?
Debug information
- Agents SDK version: (e.g.
v0.1.0) - Python version (e.g. Python 3.12)
Repro steps
make an agent with multiple hosted tools and ask for them
Expected behavior
should produce two tools
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity
DeoLeung commentedon Jul 2, 2025
argh, i think it should be the problem of my gateway