-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
Description
Describe the bug
For the OpenAI Realtime model, when the model hallucinates a tool that is not hooked into the tool list, and platforms SDK fails and raises an exception, causing teardown of the session.
Tool hallucination is very likely to happen in complex prompts, as well as OpenAI's text mode.
Made-up tool errors are also opened with other bugs but closed due to inactivity; #1671
Debug information
- Agents SDK version: v0.6.3
- Python version: Python 3.11
Repro steps
- Add a system instruction for a made-up or non-existent tool. (also a tool name similar but not an exact one of the one added to the system)
- During the execution, when the tool fails exception is raised, the following log is raised, and the whole session is down.
``agents.exceptions.ModelBehaviorError: Tool xxxx not found.
Expected behavior
As the tool fails, this error can be logged and propagated as a message or handler, allowing the session to continue with the error handled by the application.
m-gangloff, sandsc, aligokalppeker and riddhimanarravula-glean