From 82da9093aa31266e386dda4dc67b131e974be2d1 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Wed, 16 Sep 2026 16:19:08 +0200 Subject: [PATCH] fix: default converted Responses API function tools to strict=false (#30046) Fixes #27750 When a model runs on the Responses API, every Chat Completions style tool (workspace tools, MCP and OpenAPI servers) is converted to the Responses tool shape. Only an explicit strict value was carried over, so tools without one were sent with strict omitted. Chat Completions defaults strict to false, the Responses API defaults it to true, so the conversion silently switched loose schemas into strict mode. The model then filled every optional property (empty strings, zeros, false, empty arrays) and combined mutually exclusive filters, and those arguments went to the tool unchanged. Search and filter tools received meaningful values where omission was intended and rejected the call or returned wrong results. The converter now defaults strict to false when the source tool does not set it. Explicit true or false values are still preserved and already native Responses tools are passed through untouched, matching what the same tool definition gets on Chat Completions. --- backend/open_webui/routers/openai.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/routers/openai.py b/backend/open_webui/routers/openai.py index 8c8f96183e..854a8f8389 100644 --- a/backend/open_webui/routers/openai.py +++ b/backend/open_webui/routers/openai.py @@ -1417,8 +1417,8 @@ def convert_to_responses_payload(payload: dict) -> dict: converted_tool['description'] = func['description'] if 'parameters' in func: converted_tool['parameters'] = func['parameters'] - if 'strict' in func: - converted_tool['strict'] = func['strict'] + # Responses defaults strict to true, Chat Completions to false + converted_tool['strict'] = func.get('strict', False) converted_tools.append(converted_tool) else: # Already in correct format or unknown format, pass through