Change8

v2.0.0

Breaking Changes
📦 mistral-clientView on GitHub →
4 breaking6 features🔧 12 symbols

Summary

This technical release introduces a major structural change by adopting a PEP 420 namespace package structure and standardizing type naming conventions. It also improves forward compatibility by allowing enums to accept unknown values.

⚠️ Breaking Changes

  • All import paths have changed due to the SDK becoming a PEP 420 namespace package. Users must update imports from `mistralai.X` to `mistralai.client.X`.
  • 42 request/response types have been renamed following new conventions (e.g., Request bodies are now `{Verb}{Entity}Request`). Consult MIGRATION.md for the full list.
  • `FunctionTool.type` changed from `Optional[FunctionToolType]` to `Literal["function"]`.
  • The GCP client class name has been changed from `MistralGoogleCloud` to `MistralGCP`.

Migration Steps

  1. Update all imports from `mistralai.X` to `mistralai.client.X` (e.g., `from mistralai.client import Mistral`).
  2. Update imports for Azure and GCP clients accordingly (e.g., `from mistralai.azure.client import MistralAzure`).
  3. Review and update code referencing the 42 renamed types according to the mapping provided in MIGRATION.md.
  4. Update usage of the GCP client class from `MistralGoogleCloud` to `MistralGCP`.

✨ New Features

  • The SDK is now a PEP 420 namespace package.
  • Azure and GCP SDKs are now sub-packages under the `mistralai.client` namespace.
  • New consistent naming conventions for 42 request/response types (e.g., `{Verb}{Entity}Request`, `{Verb}{Entity}Response`, `{Entity}`).
  • Enums now accept unknown values, providing forward compatibility for new API values.
  • Discriminated unions now include an `Unknown` variant for forward compatibility.
  • Automatic schema conflict resolution is enabled via Speakeasy's `nameResolutionFeb2025` flag.

Affected Symbols