## The problem

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.

## The fix

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.