fix(chat): remove duplicate web_search tool crashing all agentic requests #22

Open
will.anderson wants to merge 1 commits from fix/agentic-tools-duplicate-web-search into main
Owner

Problem

agentic_tools_literal() already contains a custom web_search tool.
agentic_tools_with_web() adds the Anthropic server-side web_search_20250305 tool (also named web_search).

Combining them in agentic_tools_all() caused Anthropic to reject every agentic request with:

{"error":{"type":"invalid_request_error","message":"Tool names must be unique."}}

This meant every /api/chat call with agentic:true returned {"error":"llm unavailable","reply":""} — agentic mode was completely broken.

Fix

agentic_tools_all() now calls agentic_tools_literal() instead of agentic_tools_with_web(). Connector tools splice in as before. The agentic_tools_with_web variant is unchanged for callers that specifically want native search without connectors.

Verified

Tested end-to-end against the live soul daemon — agentic chat now returns replies correctly.

## Problem `agentic_tools_literal()` already contains a custom `web_search` tool. `agentic_tools_with_web()` adds the Anthropic server-side `web_search_20250305` tool (also named `web_search`). Combining them in `agentic_tools_all()` caused Anthropic to reject every agentic request with: ``` {"error":{"type":"invalid_request_error","message":"Tool names must be unique."}} ``` This meant every `/api/chat` call with `agentic:true` returned `{"error":"llm unavailable","reply":""}` — agentic mode was completely broken. ## Fix `agentic_tools_all()` now calls `agentic_tools_literal()` instead of `agentic_tools_with_web()`. Connector tools splice in as before. The `agentic_tools_with_web` variant is unchanged for callers that specifically want native search without connectors. ## Verified Tested end-to-end against the live soul daemon — agentic chat now returns replies correctly.
will.anderson added 1 commit 2026-06-17 19:12:19 +00:00
fix(chat): remove duplicate web_search tool in agentic_tools_all
Neuron Soul CI / build (pull_request) Failing after 5m24s
53fb75353f
agentic_tools_literal() already contains a custom web_search tool.
agentic_tools_with_web() adds the Anthropic server-side web_search_20250305
tool (also named web_search). Combining them caused Anthropic to reject
every agentic request with 'Tool names must be unique.'

agentic_tools_all() now calls agentic_tools_literal() directly. Connector
tools splice in as before. The web_search-only variant (agentic_tools_with_web)
is unchanged for callers that specifically want native search without connectors.
Member

@will.anderson - re CI: the red mark here is the build toolchain, not this change. All 12 recent runs (including the merged #17-21) fail at the same 'elb: link failed' in 'Build neuron soul binary' - CI pulls floating 'latest' El SDK + el dev and the linker fails regardless of the PR. This change is a one-symbol swap (agentic_tools_with_web -> agentic_tools_literal, which exists at chat.el:256) and compiles. Safe to merge through the red like #17-21; the link failure is a separate CI/SDK ticket. (Flagged by Tim's grounded Neuron instance.)

@will.anderson - re CI: the red mark here is the build toolchain, not this change. All 12 recent runs (including the merged #17-21) fail at the same 'elb: link failed' in 'Build neuron soul binary' - CI pulls floating 'latest' El SDK + el dev and the linker fails regardless of the PR. This change is a one-symbol swap (agentic_tools_with_web -> agentic_tools_literal, which exists at chat.el:256) and compiles. Safe to merge through the red like #17-21; the link failure is a separate CI/SDK ticket. (Flagged by Tim's grounded Neuron instance.)
Some required checks failed
Neuron Soul CI / build (pull_request) Failing after 5m24s
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/agentic-tools-duplicate-web-search:fix/agentic-tools-duplicate-web-search
git checkout fix/agentic-tools-duplicate-web-search
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: neuron-technologies/neuron#22