You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using an agent network (routing agent hands off to a specialized weather agent), the first weather request works correctly, but subsequent requests that call the tool fail with the following error:
Invalid parameter: messages with role 'tool' must be a response to a preceding message with 'tool_calls'
Reproduction steps:
Setup - Create an agent network with:
A routing agent that receives user prompts and forwards to a specialized agent.
A weather agent that calls an external tool (the weather tool) and returns a response.
Interaction
Ask the routing agent for weather in location A (e.g., "Is it snowing in Dallas TX?").
Routing agent forwards to the weather agent.
Weather agent calls the tool and returns a message with role "tool" (this succeeds).
Ask the routing agent for weather in a different location B (e.g., "How about Tampa FL?")
Routing agent forwards to the weather agent again and the weather agent attempts to call the same tool.
Note
Sometimes this succeeds and you'll need to ask it a few more times. See the recording.
Model is azure/gpt-5 and azure/gpt-5-mini