Repository navigation
Conversation
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.
Two tool calls in one model response can share a nonblank
call_id. The current rewriter maps by that original ID, so it gives both calls the same replacement. This can lose call/result pairs in the SDK's conversation history and make the per-turn limiter count multiple calls as one.Backport of usestrix#1615 to fork
masterat8aa0791e, addressing usestrix#1611. The rewriter now identifies calls by real response item ID, or by output position for Chat Completions, and keeps that mapping stable across added/done/completed sightings.The fork's
UNNAMED_TOOLnormalization is preserved. The regression matrix additionally combines duplicate IDs with blank function names, checks that both names are normalized, and verifies the original calls are not mutated. Existing blank-name tests remain intact.FORK.mdtracks the backport.Validation with Python 3.12.14, the fork's frozen lockfile, isolated HOME and environment:
pytest -q tests/test_tool_call_ids.py tests/test_tool_call_ids_providers.py tests/test_tool_call_limits.py: 464 passed, 3 xfailed, with 125 dependency warnings.git diff --checkpassed.The three expected failures are the existing SDK null-ID conversion cases. Provider routes were simulated locally; no real provider requests or full scans were performed. The complete repository suite was not run. Version stamping and release remain part of the fork's merge/delivery procedure.
GitHub Actions is currently unavailable for this account due to a billing lock (confirmed on the other backport PR runs). Remote CI is therefore not established.