fix: accept blank tool call arguments
Treat blank OpenAI-compatible tool call arguments as an empty dict so parameterless tools such as finish can execute with providers that return an empty string. Also trim model identifiers during config normalization to avoid leading whitespace leaking into requests and snapshots.
This commit is contained in:
@@ -585,6 +585,9 @@ def _parse_tool_arguments(
|
||||
Raises:
|
||||
RespParseException: 当参数无法解析为字典时抛出。
|
||||
"""
|
||||
if not raw_arguments.strip():
|
||||
return {}
|
||||
|
||||
try:
|
||||
if parse_mode == ToolArgumentParseMode.STRICT:
|
||||
arguments: Any = json.loads(raw_arguments)
|
||||
|
||||
Reference in New Issue
Block a user