Skip to content

fix: allow null caller in tool use params - #1816

Open
nightcityblade wants to merge 1 commit into
anthropics:mainfrom
nightcityblade:fix/issue-1454
Open

fix: allow null caller in tool use params#1816
nightcityblade wants to merge 1 commit into
anthropics:mainfrom
nightcityblade:fix/issue-1454

Conversation

@nightcityblade

Copy link
Copy Markdown

Fixes #1454

ToolUseBlock can contain caller=None, but the corresponding request parameter types rejected that value. This makes caller optional in both the stable and beta parameter types and adds a typechecked regression test for converting nullable tool-use blocks.

Tests:

  • uv run ruff check src/anthropic/types/tool_use_block_param.py src/anthropic/types/beta/beta_tool_use_block_param.py tests/test_tool_use_types.py
  • uv run pytest tests/test_tool_use_types.py
  • uv run pyright tests/test_tool_use_types.py src/anthropic/types/tool_use_block_param.py src/anthropic/types/beta/beta_tool_use_block_param.py

@nightcityblade
nightcityblade requested a review from a team as a code owner August 10, 2026 03:08
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.

ToolUseBlock and ToolUseBlockParam type conflict for caller nullability

1 participant