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 MistralAzure 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 MistralGoogleCloudSchema 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
Unknownvariant 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. Tools → ConversationRequestTool).
Breaking changes
- All import paths changed (see above)
- 42 type renames (see MIGRATION.md)
FunctionTool.type:Optional[FunctionToolType]→Literal["function"]- GCP class:
MistralGoogleCloud→MistralGCP