mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-12 09:01:18 +00:00
fix: preserve loose tool schemas in responses conversion
This commit is contained in:
parent
17c190bf99
commit
d4c9c83a36
1 changed files with 5 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue