Merge pull request 'fix(chat): remove duplicate web_search tool crashing all agentic requests' (#22) from fix/agentic-tools-duplicate-web-search into main
Deploy Soul to GKE / deploy (push) Failing after 8m40s
Neuron Soul CI / build (push) Failing after 10m21s

fix(chat): remove duplicate web_search tool crashing all agentic requests
This commit was merged in pull request #22.
This commit is contained in:
2026-06-18 16:28:41 +00:00
+6 -3
View File
@@ -317,10 +317,13 @@ fn connector_tools_json() -> String {
return arr
}
// Built-in tools + native web_search + every connector tool, as one tools array.
// Splices connector tools in before the closing bracket of the base array.
// Built-in tools + every connector tool, as one tools array.
// Uses agentic_tools_literal (not agentic_tools_with_web) to avoid a duplicate
// "web_search" name the literal already includes a custom web_search handler,
// and adding the Anthropic server-side web_search_20250305 (same name) causes
// Anthropic to reject with "Tool names must be unique."
fn agentic_tools_all() -> String {
let base: String = agentic_tools_with_web()
let base: String = agentic_tools_literal()
let conn: String = connector_tools_json()
let conn_inner: String = str_slice(conn, 1, str_len(conn) - 1)
if str_eq(conn_inner, "") {