Update Mistral SDK Integrations to Handle Breaking Tool-Call Changes
Mistral · Developer Tools · · major
Briefing for: Engineering
What happened
Mistral released version 2.3.0 of its Python SDK, introducing widespread breaking changes to request and response structures. Key modifications affect the `chat`, `stream`, `fim`, and `agents` endpoints, specifically changing how `tool_calls` are structured and how requests are initiated. Additionally, the `mistral.workflows.workers.whoami()` method has been completely removed.
Why it matters
Existing code using tool calling, agents, or workflows will likely fail upon upgrading to this version without refactoring. The shift in `tool_calls[].type` handling and the removal of identification methods for workers require manual updates to logic that parses model outputs or manages background tasks.
What this enables
- If you use tool calling, refactor your response parsing logic to match the new `tool_calls[].type` structure in the chat and stream objects.
- If you rely on workflow worker identification, migrate away from `whoami()` as this endpoint is no longer supported in the client.
- If you utilize beta observability features, update your error handling to accommodate the revised `error_code` structures across datasets and campaigns.
Get personalized AI briefings for your role at Changecast →