Repository navigation
feat(evals): tools_called require_args param to catch empty tool arguments - #947
Merged
Merged
Conversation
tools_called now supports require_args: true which only counts tool calls that have non-empty arguments. This catches the #940 failure mode where tool args are silently dropped during streaming. Updated the capability matrix streaming-tools scenario to use require_args: true so future regressions are caught automatically. Closes #943
|
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
require_args: trueparam totools_calledassertion handlerstreaming-toolsscenario to use itContext
Issue #940 revealed that tool call arguments can be silently dropped during Responses API streaming. The
tools_calledassertion passed because it only checks tool names, not argument correctness. This meant the capability matrix didn't catch the regression.Changes
tools_calledhandler: newrequire_argsparam (default false for backward compat)shouldCountCall: skip calls withnil/emptyArgumentswhenrequireArgsis truestreaming-tools.scenario.yaml: enabledrequire_args: trueTest plan
TestToolsCalledHandler_RequireArgs_Pass— tool with args passesTestToolsCalledHandler_RequireArgs_FailEmpty— tool with nil args failsTestToolsCalledHandler_RequireArgs_DefaultFalse— backward compat: nil args still pass without the flagTestToolsCalledHandler_*tests pass (no regressions)Closes #943