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 trace the Anthropic tool assembly path and repository guidance, then patch the narrow deduplication point and run focused tests.
- Assistant
rgisn’t installed in this workspace, so I’m usingfind/grepas the local fallback. I’m checking the repository-specific instructions before touching code. - Assistant
The collision occurs where provider-native tools are merged with LibreChat’s loaded tools: Anthropic currently concatenates both arrays unchanged. I’m narrowing the fix to that Anthropic-only merge and will add regression coverage for precedence, unrelated tools, and other providers.
- Assistant
The patch now handles both full tool instances and event-driven LibreChat definitions. The regression cases also assert that same-named non-search tools remain untouched and OpenAI’s behavior is unchanged.
- Assistant
The focused suite is currently blocked before loading tests because the local
librechat-data-providerworkspace build is missing from module resolution. I’ll build that existing workspace dependency locally, then rerun the test and type checks. - Assistant
The focused suite passes all 37 tests. I’m doing the final static checks now; the pre-existing
package.jsonand lockfile edits remain untouched.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.