fix(openai): tolerate empty content in forced tool choice (#40148)

Signed-off-by: QwertyJack <7554089+QwertyJack@users.noreply.github.com>
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Co-authored-by: QwertyJack <7554089+QwertyJack@users.noreply.github.com>
Co-authored-by: chaunceyjiang <chaunceyjiang@gmail.com>
This commit is contained in:
jack
2026-05-06 07:16:03 -07:00
committed by GitHub
co-authored by QwertyJack chaunceyjiang
parent df8e63f4ed
commit 6467213a9f
5 changed files with 109 additions and 7 deletions
+2 -1
View File
@@ -459,7 +459,8 @@ class DelegatingParser(Parser):
(ToolChoiceFunction, ChatCompletionNamedToolChoiceParam),
):
# Forced Function Call
assert content is not None
if content is None:
return [], None
function_calls.append(
FunctionCall(name=self._get_function_name(request), arguments=content)
)