Files
agent-framework/python/samples/02-agents
T
chetantoshniwal 47d82911c0 Python: Fix server_tool_use input_json_delta handling and improve Anthropic samples (#5050)
* Fix server_tool_use input_json_delta handling and improve Anthropic samples

- Fix: Skip input_json_delta for server_tool_use content blocks in AnthropicClient streaming. Server-managed tools (e.g., skills with code interpreter) were producing Content.from_function_call(name='') entries that caused Anthropic API 400 errors on subsequent turns.

- Samples: Add dotenv loading and environment variable documentation to Anthropic Claude samples (MCP, permissions, session, shell, tools, URL, skills).

* Add regression test for server_tool_use + input_json_delta skip behavior

Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/7c68dcb2-b577-4e36-b423-664b8fe3ac1d

Co-authored-by: chetantoshniwal <255221507+chetantoshniwal@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: chetantoshniwal <255221507+chetantoshniwal@users.noreply.github.com>
47d82911c0 ยท 2026-04-02 09:43:59 +00:00
History
..