From 109aa6f38630aeb33b3b185dac8b903fb3ee9bf4 Mon Sep 17 00:00:00 2001 From: Shawn <12529572.canada.inc@gmail.com> Date: Sun, 2 Aug 2026 09:14:29 -0400 Subject: [PATCH] fix: default loose function tools to strict:false in Responses API conversion Loose Chat Completions / MCP / OpenAPI-derived function tools carry no tool-level strict flag, so convert_to_responses_payload() sent them to /v1/responses with strict omitted. The Responses API then materializes every optional property and can populate mutually-exclusive filters, which get forwarded to the tool unchanged and can be rejected. Default the converted tool to strict:false, preserving an explicit strict from the source tool. Closes #27750 --- 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 e5c9f2e7e8..690018e80b 100644 --- a/backend/open_webui/routers/openai.py +++ b/backend/open_webui/routers/openai.py @@ -1141,8 +1141,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'] + # Default loose tools to non-strict; preserve explicit strict. + converted_tool['strict'] = func.get('strict', False) converted_tools.append(converted_tool) else: # Already in correct format or unknown format, pass through