Skip to content

Emit input_json events for server tool use streams#1558

Open
pragnyanramtha wants to merge 3 commits into
anthropics:mainfrom
pragnyanramtha:codex/server-tool-input-json-events
Open

Emit input_json events for server tool use streams#1558
pragnyanramtha wants to merge 3 commits into
anthropics:mainfrom
pragnyanramtha:codex/server-tool-input-json-events

Conversation

@pragnyanramtha
Copy link
Copy Markdown

Summary

  • emit input_json stream events for server tool use blocks by reusing the existing TRACKS_TOOL_INPUT aliases
  • keep normal tool use and beta MCP tool use behavior unchanged
  • add normal and beta regression coverage for server tool use input_json_delta events

Validation

  • pytest tests/lib/streaming/test_messages.py tests/lib/streaming/test_beta_messages.py tests/lib/streaming/test_partial_json.py
  • ruff check src/anthropic/lib/streaming/_messages.py src/anthropic/lib/streaming/_beta_messages.py tests/lib/streaming/test_messages.py tests/lib/streaming/test_beta_messages.py
  • ruff format --check src/anthropic/lib/streaming/_messages.py src/anthropic/lib/streaming/_beta_messages.py tests/lib/streaming/test_messages.py tests/lib/streaming/test_beta_messages.py
  • pyright src/anthropic/lib/streaming/_messages.py src/anthropic/lib/streaming/_beta_messages.py tests/lib/streaming/test_messages.py tests/lib/streaming/test_beta_messages.py
  • mypy src/anthropic/lib/streaming/_messages.py src/anthropic/lib/streaming/_beta_messages.py
  • git diff --check

Copilot AI review requested due to automatic review settings May 17, 2026 05:42
@pragnyanramtha pragnyanramtha requested a review from a team as a code owner May 17, 2026 05:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants