fix: xfyun model tool use error workaround

fixes: #1359
This commit is contained in:
Soulter
2025-07-14 22:07:28 +08:00
parent 8f98b411db
commit c19bca798b
@@ -187,6 +187,9 @@ class ProviderOpenAIOfficial(Provider):
func_name_ls = []
tool_call_ids = []
for tool_call in choice.message.tool_calls:
if isinstance(tool_call, str):
# workaround for #1359
tool_call = json.loads(tool_call)
for tool in tools.func_list:
if tool.name == tool_call.function.name:
# workaround for #1454