From 1a66175e38f788362115645c0189436da9c92bb6 Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Wed, 20 Nov 2024 17:02:30 -0500 Subject: [PATCH] mistral[patch]: Propagate tool call id (#28238) mistralai-large-2411 requires tool call id Older models accept tool call id if its provided mistral-large-2407 mistral-large-2402 --- libs/partners/mistralai/langchain_mistralai/chat_models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/partners/mistralai/langchain_mistralai/chat_models.py b/libs/partners/mistralai/langchain_mistralai/chat_models.py index b3a43629e8aae..7664e7a45cc2f 100644 --- a/libs/partners/mistralai/langchain_mistralai/chat_models.py +++ b/libs/partners/mistralai/langchain_mistralai/chat_models.py @@ -353,6 +353,7 @@ def _convert_message_to_mistral_chat_message( "role": "tool", "content": message.content, "name": message.name, + "tool_call_id": message.tool_call_id, } else: raise ValueError(f"Got unknown type {message}")