Skip to content

Commit 8450070

Browse files
authored
openai[patch]: fix bug where function call IDs were not populated (#31735)
(optional) IDs were getting dropped in some cases.
1 parent 0bf223d commit 8450070

File tree

1 file changed

+1
-1
lines changed
  • libs/partners/openai/langchain_openai/chat_models

1 file changed

+1
-1
lines changed

libs/partners/openai/langchain_openai/chat_models/_compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def _convert_from_v03_ai_message(message: AIMessage) -> AIMessage:
142142
and all(isinstance(b, dict) for b in message.content)
143143
) or not any(
144144
item in message.additional_kwargs
145-
for item in ["reasoning", "tool_outputs", "refusal"]
145+
for item in ["reasoning", "tool_outputs", "refusal", _FUNCTION_CALL_IDS_MAP_KEY]
146146
):
147147
return message
148148

0 commit comments

Comments
 (0)