github mistralai/client-python v2.0.0
python - v2.0.0 - 2026-03-10 17:12:01

latest releases: v2.4.3, v2.4.2, v2.4.1...
one month ago

A technical release focused on improving developer experience.

What's new

Namespace package (mistralai.*)

The SDK is now a PEP 420 namespace package. All imports move from mistralai to mistralai.client:

# v1
from mistralai import Mistral

# v2
from mistralai.client import Mistral

Azure and GCP SDKs are now sub-packages under the same namespace:

from mistralai.azure.client import MistralAzure
from mistralai.gcp.client import MistralGCP  # renamed from MistralGoogleCloud

Schema naming conventions

42 request/response types renamed to follow consistent conventions:

  • Request bodies: {Verb}{Entity}Request (e.g. CreateAgentRequest)
  • Responses: {Verb}{Entity}Response (e.g. ListFilesResponse)
  • Entities: {Entity} (e.g. BatchJob, Checkpoint)

See MIGRATION.md for the full rename table.

Forward compatibility

  • Enums now accept unknown values, new API values won't crash old SDK versions
  • Discriminated unions get an Unknown variant for the same reason

Automatic schema conflict resolution

Speakeasy's nameResolutionFeb2025 flag is enabled, automatically detecting and resolving ambiguous type names during generation (e.g. ToolsConversationRequestTool).

Breaking changes

  • All import paths changed (see above)
  • 42 type renames (see MIGRATION.md)
  • FunctionTool.type: Optional[FunctionToolType]Literal["function"]
  • GCP class: MistralGoogleCloudMistralGCP

Don't miss a new client-python release

NewReleases is sending notifications on new releases.