mirror of
https://github.com/open-webui/open-webui.git
synced 2026-06-09 11:45:57 -05:00
[GH-ISSUE #22124] bug: Terminal tool: null "wait" parameter sent as string "None", causing 422 from open-terminal #106631
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cwawak on GitHub (Mar 2, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/22124
Originally assigned to: @Classic298 on GitHub.
Bug Description
When the AI calls
run_commandand passeswait: null(the parameter is optional), the backend serializes PythonNoneas the string"None"in the query string, which fails open-terminal's FastAPI validation with a 422 error.Steps to Reproduce
run_commandwith{ "command": "uname -a", "wait": null }Error
Root Cause
In
open_webui/utils/tools.py,execute_tool_server()builds query params without filteringNonevalues:Then serializes them:
The open-terminal
/run_commandendpoint declareswaitasOptional[float]— a valid null — but FastAPI rejects the literal string"None".Fix
Optional parameters with no value should be omitted from the query string entirely.
@pr-validator-bot commented on GitHub (Mar 2, 2026):
⚠️ Missing Issue Title Prefix
@cwawak, your issue title is missing a prefix (e.g.,
bug:,feat:,docs:).Please update your issue title to include one of the following prefixes:
Example:
bug: Login fails when using special characters in password@Classic298 commented on GitHub (Mar 2, 2026):
taking a look here
@Classic298 commented on GitHub (Mar 2, 2026):
https://github.com/open-webui/open-webui/pull/22144 @tjbck