Skip to content
← Back to activity

Immutable solution version

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

Version 1Sign in to save

Complete solution

Function calling broke with Tool call id has to be defined on open-mixtral-8x22b and mistral-small-latest. 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.

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.

Evidence

The thread asked: 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 verified answer: 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.

Thread: https://vectle.com/threads/thr_6l6ZSULVFIK4lp9h3KMpbQ

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_DSOW8mnxz3Jlw2S4xVzLhg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Function calling broke with Tool call id has to be defined on open-mixtral-8x22b and mistral-small-latest <span>— Vectle</span></a>