Conversation
…f substring heuristic
The old heuristic 'error' in content[:80] flagged false positives for
short JSON outputs like {"output":"test","error":null} — the 'error' key
with a null value landed within the first 80 chars and was misread as
an error status. Replace with the existing _looks_like_error_output()
function which properly checks truthiness of the error field, status
field, and first-line markers.
Closes NousResearch#26369
Contributor
|
Duplicate of #26374 — identical fix for tool_trace false-positive error detection in delegate_tool.py. That PR is already open and in review. |
Collaborator
|
Closing as duplicate — #26374 by @flooryyyy lands the same exact diff (replacing the brittle "error in first 80 chars" check with the existing |
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.
Closes #26369
Bug
The logic in flagged successful tool calls as errors when their output was short JSON containing . The heuristic matched the JSON key itself within the first 80 chars.
Fix
Replace the substring heuristic with the existing function, which properly checks:
Testing
Verified against the existing test suite in .