mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-04 07:47:10 +00:00
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
This commit is contained in:
parent
52145eede9
commit
109aa6f386
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue