Skip to content

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
mainfrom
pj/anthropic-ignore-input_json_delta
Open

feat(js/plugins/anthropic): bump SDK to ^0.97.1 and ignore input_json_delta instead of throwing#5378
pavelgj wants to merge 4 commits into
mainfrom
pj/anthropic-ignore-input_json_delta

Conversation

@pavelgj
Copy link
Copy Markdown
Member

@pavelgj 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
@pavelgj pavelgj changed the title feat(anthropic): bump SDK to ^0.97.1 and simplify tool types feat(anthropic): bump SDK to ^0.97.1 and ignore input_json_delta instead of throwing May 21, 2026
@pavelgj pavelgj requested review from cabljac and ifielker May 21, 2026 18:13
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread js/plugins/anthropic/src/runner/base.ts Outdated
Comment thread js/plugins/anthropic/src/runner/base.ts Outdated
@pavelgj pavelgj changed the title feat(anthropic): bump SDK to ^0.97.1 and ignore input_json_delta instead of throwing feat(js/plugins/anthropic): bump SDK to ^0.97.1 and ignore input_json_delta instead of throwing May 21, 2026
pavelgj added 2 commits May 21, 2026 14:22
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant