feat(js/plugins/anthropic): bump SDK to ^0.97.1 and ignore input_json_delta instead of throwing#5378
Open
pavelgj wants to merge 4 commits into
Open
feat(js/plugins/anthropic): bump SDK to ^0.97.1 and ignore input_json_delta instead of throwing#5378pavelgj wants to merge 4 commits into
pavelgj wants to merge 4 commits into
Conversation
Member
pavelgj
commented
May 21, 2026
- Update @anthropic-ai/sdk from ^0.90.0 to ^0.97.1
- Replace custom RunnerTool with SDK's native Tool type
- Remove inputJsonDeltaError and silently ignore input_json_delta streaming events instead of throwing, aligning with SDK changes
- Clean up unused imports across stable and beta runners
- Update @anthropic-ai/sdk from ^0.90.0 to ^0.97.1 - Replace custom RunnerTool<ApiTypes> with SDK's native Tool type - Remove inputJsonDeltaError and silently ignore input_json_delta streaming events instead of throwing, aligning with SDK changes - Clean up unused imports across stable and beta runners
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the @anthropic-ai/sdk dependency to version ^0.97.1 and refactors tool type handling by replacing the internal RunnerTool with the SDK's Tool type. Additionally, it removes the inputJsonDeltaError and modifies the streaming logic in both stable and beta runners to ignore input_json_delta events rather than throwing an error. Review feedback suggests avoiding hardcoded types in the abstract BaseRunner to maintain generic support for both stable and beta tool types, ensuring better type safety across different API versions.
Replace concrete Anthropic SDK `Tool` type with generic `ApiTypes['Tool']` to support polymorphic tool definitions across different runner implementations. Also removes the now-unused `Tool` import.
Remove the test asserting that input_json_delta streaming throws an error, as this tool input streaming is now supported.
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.