Skip to content

fix: discriminate tool search result content#1417

Open
MukundaKatta wants to merge 2 commits intoanthropics:mainfrom
MukundaKatta:codex/tool-search-result-discriminator
Open

fix: discriminate tool search result content#1417
MukundaKatta wants to merge 2 commits intoanthropics:mainfrom
MukundaKatta:codex/tool-search-result-discriminator

Conversation

@MukundaKatta
Copy link
Copy Markdown

Summary:

  • mark ToolSearchToolResultBlock.content as a discriminated union by type
  • apply the same fix to the beta variant
  • add regression tests to ensure nested tool search result content is parsed into typed models instead of raw dicts

Testing:

  • attempted pytest for the new test file, but this local environment is missing the inline_snapshot test dependency from the repo test setup

Closes #1394

@MukundaKatta MukundaKatta requested a review from a team as a code owner April 19, 2026 22:02
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.

ToolSearchToolResultBlock is raw dict

1 participant