fix(anthropic): classify server tool message parts - #699
Open
lmolkova wants to merge 5 commits into
Open
Conversation
Pull request dashboard statusWaiting on the author · refreshed 2026-09-12 20:12 UTC Move out of draft to request review. Status above doesn't look right?
|
Assisted-by: Codex
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The implementation covers stable Anthropic server-tool variants and includes focused unit and conformance validation.
Pull request overview
Corrects Anthropic telemetry so provider-executed tools use server-tool message parts.
Changes:
- Converts stable server-tool calls/results from SDK objects and dictionaries.
- Adds unit and conformance coverage.
- Adds a changelog fragment.
File summaries
| File | Description |
|---|---|
utils.py |
Maps server-tool blocks to semantic-convention parts. |
test_messages_extractors.py |
Tests object and dictionary conversion. |
server_tool_calling.py |
Adds server-tool conformance scenario. |
test_conformance.py |
Registers the new scenario. |
server_tool_calling_conformance.yaml |
Provides recorded API response data. |
.changelog/699.fixed |
Documents the correction. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Assisted-by: Codex
Assisted-by: Codex
lmolkova
marked this pull request as ready for review
September 12, 2026 20:31
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.
Fixes Anthropic server tool calls and results being captured as client-side tool parts.
Anthropic-executed tools now use ServerToolCallPart and ServerToolCallResponsePart for response objects and replayed dictionary content. Current stable server-result variants are supported without importing version-specific SDK classes.
Known gap: beta message blocks remain scoped to #661.