Skip to content

Function Tool verification callback before throwing "Tool xxxx is not found in the tools_dict" exception #2050

@holance

Description

@holance

** Please make sure you read the contribution guide and file the issues in the right place. **
Contribution guide.

Is your feature request related to a problem? Please describe.
LLM (Gemini2.5 Pro) keeps hallucinating and creates non-exist tool names. I tried to use before_tool_callback, but "Tool xxxx is not found in the tools_dict" exception is throw before this callback getting called.

Describe the solution you'd like
I would like to have another callback for tool verification before throwing this exception. Or is there any better way to handle this issue?

Describe alternatives you've considered
Need suggestions.

Additional context
None.

Metadata

Metadata

Labels

core[Component] This issue is related to the core interface and implementation

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions