fix: Enhanced error handling for tool not found errors (v1.3)#1041
Open
gdeyoung wants to merge 2 commits intoagent0ai:mainfrom
Open
fix: Enhanced error handling for tool not found errors (v1.3)#1041gdeyoung wants to merge 2 commits intoagent0ai:mainfrom
gdeyoung wants to merge 2 commits intoagent0ai:mainfrom
Conversation
- Fixed rfind bug in extract_tools.py - proper nested brace tracking - Fixed escape handling for escaped quotes in JSON strings - Added HandledException class for graceful loop termination - Added consecutive_misformat counter (5 attempt limit) - Fixed tool_args TypeError - ensure dict before unpacking
Adds improved error message that lists available tools when a tool cannot be found, helping users debug tool-related issues more easily. This is v1.3 of the patch series.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds enhanced error handling for when a tool is not found in agent.py.
Changes
Testing
This is v1.3 of the patch series. Previous patches:
Notes
This fix helps users understand which tools are available when they encounter a tool not found error, making debugging easier.