Fixed OpenAI requests always offering OpenAI's own web search (#1041)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-10-10 15:38:50 +02:00
1 parent 9215011b08
commit ca6ad6b1f0
8 files changed
+9 -69

No files matched your search

+1 -1
View File
@@ -45,7 +45,7 @@ The exception is a provider which rejects the parameter. Hugging Face answers it
The OpenAI Responses API may continue to return multiple function calls in one response. AI Studio processes those calls sequentially as well; concurrent execution of separate local tool calls is not currently implemented. This does not restrict concurrency used internally by an individual tool.
Provider-native tools are separate from local function tools and do not have a `ToolDefinition` or an `IToolImplementation`. The local tool calling implementation does not influence the provider-native tool selection at all.
AI Studio offers no provider-native tools, i.e., tools which the provider runs on its own servers, such as OpenAI's hosted web search. That search used to go along with every Responses API request, whatever the user had selected. Merely offering it cost about 4,300 input tokens per request — in a tool calling loop, per round — and it bypassed the rules our own tools follow: the selection below the message field, and the outbound data restriction of a chat which read a mailbox, see `ToolOutboundData`. Nor did it show up in the tool trace. A provider-native tool belongs into the tool selection instead, as a choice the user makes, so that the selection, the minimum provider confidence, and the outbound data restriction apply to it. Its results never reach AI Studio, though, so the prompt injection filter cannot check them; whoever adds such a tool has to decide how to deal with that.
If a tool throws `ToolExecutionBlockedException`, `ToolExecutor` returns the exception message as plain text to the model and records the trace as `BLOCKED`. Other exceptions are logged with details and returned to the model as plain text in the form `Tool execution failed: ...`, with the trace recorded as `ERROR`.