openai[patch]: fix bug where function call IDs were not populated (#31735)

(optional) IDs were getting dropped in some cases.
This commit is contained in:
ccurme 2025-06-25 15:08:27 -04:00 committed by GitHub
parent 0bf223d6cf
commit 84500704ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -142,7 +142,7 @@ def _convert_from_v03_ai_message(message: AIMessage) -> AIMessage:
and all(isinstance(b, dict) for b in message.content)
) or not any(
item in message.additional_kwargs
for item in ["reasoning", "tool_outputs", "refusal"]
for item in ["reasoning", "tool_outputs", "refusal", _FUNCTION_CALL_IDS_MAP_KEY]
):
return message