anthropic: support for code execution, MCP connector, files API features (#31340)

Support for the new [batch of beta
features](https://www.anthropic.com/news/agent-capabilities-api)
released yesterday:

- [Code
execution](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/code-execution-tool)
- [MCP
connector](https://docs.anthropic.com/en/docs/agents-and-tools/mcp-connector)
- [Files
API](https://docs.anthropic.com/en/docs/build-with-claude/files)

Also verified support for [prompt cache
TTL](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching#1-hour-cache-duration-beta).
This commit is contained in:
ccurme
2025-05-27 12:45:45 -04:00
committed by GitHub
parent 1ebcbf1d11
commit 580986b260
11 changed files with 824 additions and 41 deletions

View File

@@ -129,6 +129,7 @@ def _format_for_tracing(messages: list[BaseMessage]) -> list[BaseMessage]:
isinstance(block, dict)
and block.get("type") == "image"
and is_data_content_block(block)
and block.get("source_type") != "id"
):
if message_to_trace is message:
message_to_trace = message.model_copy()