Files
AstrBot/tests
Yufeng Heandzouyonghe 6b2e41791e fix(provider): merge custom server tools with registered tools in Anthropic requests (#10437)
* fix(provider): merge custom server tools with registered tools in Anthropic requests

* fix(provider): dedupe tool names and tolerate null custom body

Address review findings on the custom-server-tools merge:

- A custom tool sharing a name with a registered tool (or another
  custom tool) produced duplicate definitions that the API rejects.
  Merge by name instead; the custom entry wins, matching the override
  authority extra_body already had for every other top-level key.
- An explicit null custom_extra_body crashed on .get("tools"). Null
  or non-dict values now normalize to an empty body.

* fix(provider): avoid shadowed id in Anthropic streaming tool merge

---------

Co-authored-by: zouyonghe <62183434+zouyonghe@users.noreply.github.com>
2026-10-08 22:45:04 +09:00
..