Anthropic rejects duplicate websearch tool names When LibreChat web search and…
- User
Anthropic rejects duplicate web_search tool names
When LibreChat web search and Anthropic-native web search are both enabled, expose one
web_searchtool and prefer LibreChat's definition. Do not affect unrelated tools or other providers.Interface
No new public interfaces are introduced.
- Assistant
I’ll inspect the repository guidance and the Anthropic tool assembly path, then implement a narrowly scoped deduplication and run the relevant tests.
- Assistant
The conflict occurs in agent initialization: provider-native tools are concatenated after LibreChat’s loaded tools, so both
web_searchdefinitions survive. I’m adding the guard at that merge point, where both definitions and the resolved provider are known, which keeps the change isolated to Anthropic. - Assistant
The focused suite is currently blocked by an unbuilt local
librechat-data-providerpackage, not by the change. I’ll build that workspace dependency, then rerun the test and type/lint checks. - Assistant
The first passing regression covered legacy full tool instances. I found the production path defaults to serializable tool definitions, so I’m extending the guard to recognize LibreChat
web_searchthere as well; otherwise the duplicate could still reach Anthropic in the default execution mode. - Assistant
The regression now passes in both production-style definition mode and provider isolation coverage. The package build also completes cleanly; I’m doing the final diff/whitespace review now.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.