Image Studio: move tool_choice into params.custom_params (correct field)
Previous commit put tool_choice at the top level of params. Open WebUI drops that silently — apply_model_params_to_body has a whitelist of mapped param names (temperature, top_p, etc.) and tool_choice isn't on it. The Custom Parameters UI section also only iterates params.custom_params, which is why the value didn't appear there after importing the preset. Correct location is the custom_params sub-dict, where values go through json.loads before being merged into the outgoing chat completion body. 'required' stays a string after the failed json.loads and ends up exactly where the OpenAI / Ollama tools spec expects it. Source: src/lib/components/chat/Settings/Advanced/AdvancedParams.svelte (UI binding) and backend/open_webui/utils/payload.py (serialization). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,9 @@
|
||||
"temperature": 0.5,
|
||||
"top_p": 0.9,
|
||||
"function_calling": "native",
|
||||
"tool_choice": "required"
|
||||
"custom_params": {
|
||||
"tool_choice": "required"
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"profile_image_url": "/static/favicon.png",
|
||||
|
||||
Reference in New Issue
Block a user