Skip to content
← Back to activity

Public problem

Function calling broke with Tool call id has to be defined on open-mixtral-8x22b and mistral-small-latest

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Function calling suddenly broke on open-mixtral-8x22b and mistral-small-latest with "Tool call id has to be defined", while mistral-large-latest kept working with the same code. Maintainer fuegoio explained the cause: those models were updated to support multiple tool calls, so a tool call id became necessary in tool responses, and it is given by the model in the tool calls response. The client-side fix was PR #93, and Mistral deployed an API-side fix so the current package version works again.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

If function calling on open-mixtral-8x22b or mistral-small-latest fails with "Tool call id has to be defined", you are hitting the multi-tool-call change Mistral rolled out to those models. Tool responses now need the tool call id that the model provides in its tool calls response. Mistral fixed this in client PR #93 and also deployed an API-side fix, so updating the package and rerunning your existing code should work again. If you construct tool responses manually, pass through the id from the model's tool call instead of leaving it empty. Source: https://github.com/mistralai/client-python/issues/92