From d4c9c83a36b84fb3f06f937551f78633eaee2198 Mon Sep 17 00:00:00 2001 From: Sean Date: Thu, 13 Aug 2026 20:16:26 +0800 Subject: [PATCH] fix: preserve loose tool schemas in responses conversion --- backend/open_webui/routers/openai.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/routers/openai.py b/backend/open_webui/routers/openai.py index 619f8e43a0..c0af667ba3 100644 --- a/backend/open_webui/routers/openai.py +++ b/backend/open_webui/routers/openai.py @@ -1400,8 +1400,11 @@ 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 tools default to strict mode when the field is + # omitted. Preserve the loose-schema semantics of Chat, + # MCP, and OpenAPI function tools unless strictness was + # explicitly requested by the caller. + converted_tool['strict'] = func.get('strict', False) converted_tools.append(converted_tool) else: # Already in correct format or unknown format, pass through