mistralai_dart
Dart client for the Mistral AI API - chat, embeddings, fine-tuning, agents, and more.
6.0.0
3.1K downloads/mo
#4600 most downloaded on pub.dev
davidmigloz/ai_clients_dart
What this package is like to depend on
Last release 21 days ago
02 Aug 2026
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 34 of 34 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
35 releases · first in 2023
21 releases in the last 12 months
see the full history below
Release timeline
35 releases · Dec 2023 to Aug 2026Releases
latest 35-
6.0.002 Aug 2026Release notes
Open source →[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Adds
client.promptsandclient.skillsv2 registries with versioning and aliases, managed workflow deployments (create/start/stop/restart with SSE log streaming), and newclient.users.me()and connectorshare/deleteAllUserCredentialsendpoints. Breaking: the RAG search index API is replaced by a fully Vespa-typed/v1/rag/indexessurface, and the fine-tuning jobs API (along withFineTuningJobPoller) is removed entirely — a confirmed upstream deprecation per the Mistral changelog and deprecated fine-tuning endpoints notice — with only fine-tuned-model management remaining. Connector request fields and observability dataset record types are also renamed/retyped to match the current spec. -
5.0.005 Jul 2026Release notes
Open source →[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Adds OCR-4 paragraph-level block extraction: set
OcrRequest.includeBlocks: trueto receiveOcrPage.blocks, a sealed 13-variantOcrBlockunion (text, title, list, table, image, equation, caption, code, and more), each with a bounding box andcontentin reading order. Breaking:OcrRequest.pageschanges fromList<int>?to the sealedOcrPagesunion, which also supports the new comma-separated string/range form (OcrPages.string('0,2-4')) alongside explicit lists (OcrPages.list([0, 1, 2])). Also fixesbuildUrlproducing a double slash when the base URL has a trailing slash and dropping (or collapsing repeated) base-URL query params, and adds a canonical package example so pub.dev's "Package has an example" check passes. -
4.0.021 Jun 2026Release notes
Open source →[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Syncs
mistralai_dartwith the latest Mistral OpenAPI spec (+46 paths, +123 schemas over the 2026-06-05 baseline), cross-checked field-by-field against the officialmistralai/client-pythonSDK. Adds four new beta surfaces — Connectors (client.connectors: full CRUD + auth + tools + credentials), Observability traces/spans/logs (client.observability), RAG (client.rag: ingestion pipelines + search index), and new Workflow operations (bulk archive/unarchive, schedule pause/resume/trigger, execution logs + SSE) — plus many additive fields and enum values (ReasoningEffort.minimal/xhigh, expandedModelCapabilities,ThinkContentPart.signature, and more). The breaking changes mirror server-side removals from the official Python SDK and affect a narrow surface:UsageInfodrops cached-token detail fields,OcrRequestdrops itsid,ChatChoice.messagebecomes nullable (withfinishReasonnow non-nullable), and the deletedworkers/whoamiendpoint plus a few workflow fields are removed. See the Migration Guide for the full list and upgrade paths. -
3.1.106 Jun 2026Release notes
Open source →Migrates deprecated Mistral model identifiers to their current replacements (verified against Mistral's docs). The default
modelon the moderation/classification request classes (ModerationRequest,ChatModerationRequest,ClassificationRequest,ChatClassificationRequest) moves from the deprecatedmistral-moderation-latesttomistral-moderation-2603(Mistral Moderation 2) — so requests that omitmodelnow target the current model — and the deprecatedmistral-large-2411doc examples move to the livemistral-large-latestalias. No schema changes. -
3.1.024 May 2026Release notes
Open source →Adds
promptCacheKeytoAgentCompletionRequest,ChatCompletionRequest, andFimCompletionRequest— tokens served from a cached prefix are billed at 10% of the standard input price. Re-introduces OCR confidence scores (OcrConfidenceScore,OcrPageConfidenceScores, theOcrConfidenceScoresGranularityenum, and the related fields onOcrRequest/OcrPage/OcrTable) following their return to the upstream spec, and adds the previously-missingmetadatafield onFimCompletionRequestfor parity with the other completion requests. Refreshes the bundled OpenAPI spec to its 2026-05-09 snapshot. All changes are additive. -
3.0.022 Apr 2026Release notes
Open source →[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Syncs with the 2026-04-22 Mistral AI spec: 9 endpoints and 20 schemas were removed upstream with no additions. Breaking: the entire OCR confidence-score surface has been removed server-side, so
OcrConfidenceScore,OcrPageConfidenceScores,OcrConfidenceScoresGranularity, and the related fields onOcrRequest,OcrPage, andOcrTableare gone from the client. The orphanWorkflowListResponsemodel is also deleted along with its retiredGET /v1/workflowsendpoint. This release also adds missingcopyWithmethods onObservabilityErrorandObservabilityErrorDetail. -
2.3.016 Apr 2026Release notes
Open source →Adds support for OCR confidence scores with a new
confidenceScoresGranularityrequest parameter (pageorword) and per-page/per-word score response types. Also fills pre-existing spec gaps onOcrPage(tables, header, footer, hyperlinks) andOcrRequest(tableFormat, extractHeader, extractFooter, annotation formats). -
2.2.009 Apr 2026Release notes
Open source →Adds two new beta API domains — Observability (41 endpoints for campaigns, datasets, judges, and chat completion monitoring) and Workflows (34 endpoints for workflow execution, scheduling, deployments, and tracing). Refreshes the OpenAPI spec with 75 new endpoints and 126 new schemas.
-
2.1.102 Apr 2026Release notes
Open source →Adds an
extraoverflow field toSpeechRequestfor passing additional properties to the Mistral speech API, and aligns the README layout with other packages. -
2.1.029 Mar 2026Release notes
Open source →Adds
ToolFileContentPartandToolReferenceContentPartsealed variants toContentPartfor built-in tool output content (code interpreter files, web search references). Also addsunknownfallback values toReasoningEffortandSpeechOutputFormatenums for forward compatibility. -
2.0.027 Mar 2026Release notes
Open source →[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Major update to the latest Mistral AI spec. Renames
ModerationLLMV1ActiontoModerationLLMAction, adds Moderation V2 with 11 categories, guardrails on chat requests,CustomConnectorTool, 5 newContentPartvariants, andUnknownContentPartfor forward compatibility. Replaces untypedObjectfields with sealed union types (MessageContent,EmbedInput) for type safety across allChatMessagevariants. Adds text-to-speech synthesis with streaming support, voice management with CRUD operations,reasoningEffortparameter, and llms.txt ecosystem files.- BREAKING FEAT: Update to latest Mistral AI OpenAPI spec (#130). (ac07542b)
- BREAKING REFACTOR: Replace Object fields with sealed union types (#119). (014cc1dc)
- BREAKING FEAT: Add TTS, voice management, and reasoning effort support (#140). (8c99bd48)
- REFACTOR: Standardize equality helpers location across packages (#123). (34086102)
- DOCS: Overhaul READMEs and add llms.txt ecosystem (#149). (98f11483)
- TEST: Add TTS and voice integration tests (#148). (f0ec0879)
- CHORE: Clean up documentation.json configs and lift fineTuningModels exclusion (#117). (fdd03bf2)
-
1.3.010 Mar 2026Release notes
Open source →This release adds inline streaming error detection and updates the API spec to the latest version with new models and capabilities including agent aliases, guardrail configuration, tool call confirmations, and batch request types.
- FEAT: Detect inline streaming errors (#91). (9f0eaf37)
- FEAT: Update OpenAPI spec with new models (
AgentAliasResponse,BatchRequest,GuardrailConfig,ToolCallConfirmation,ToolConfiguration), add agent alias CRUD methods, and update existing models with new fields (#89). (4aa455e7) - DOCS: Improve READMEs with badges, sponsor section, and vertex_ai deprecation (#90). (5741f2f3)
-
1.2.106 Mar 2026Release notes
Open source →Internal improvements to build tooling and package publishing configuration.
-
1.2.004 Mar 2026Release notes
Open source →Added
baseUrlanddefaultHeadersparameters towithApiKeyconstructors and unified equality helpers across packages. -
1.1.004 Mar 2026Release notes
Open source →Added
withApiKeyconvenience constructor and replacedObject? stopwith a type-safeStopSequencesealed class for improved API safety. -
1.0.003 Mar 2026Release notes
Open source →[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
TL;DR: Complete reimplementation with a new architecture, minimal dependencies, resource-based API, and improved developer experience. Hand-crafted models (no code generation), interceptor-driven architecture, comprehensive error handling, and full Mistral AI API coverage including stable and beta endpoints.
What's new
- Resource-based API organization:
client.chat— Chat completions (streaming, tool calling, multimodal, JSON mode)client.embeddings— Text embeddings for semantic search and clusteringclient.models— Model listing and retrievalclient.fim— Fill-in-the-Middle code completions (Codestral)client.files— File upload and managementclient.fineTuning— Fine-tuning jobs and model managementclient.batch— Asynchronous large-scale batch processingclient.moderations— Content moderation for safetyclient.classifications— Text classification (spam, topic, sentiment)client.ocr— OCR for documents and imagesclient.audio— Speech-to-text transcription with streamingclient.agents— Pre-configured AI assistants (beta)client.conversations— Stateful multi-turn conversations (beta)client.libraries— Document storage and retrieval for RAG (beta)
- Architecture:
- Interceptor chain (Auth → Logging → Error → Transport with Retry wrapper).
- Authentication: API key or custom via
AuthProviderinterface. - Retry with exponential backoff + jitter (only for idempotent methods on 429, 5xx, timeouts).
- Abortable requests via
abortTriggerparameter. - SSE streaming parser for real-time responses with
[DONE]marker handling. - Central
MistralConfig(timeouts, retry policy, log level, baseUrl, auth).
- Hand-crafted models:
- No code generation dependencies (no freezed, json_serializable).
- Minimal runtime dependencies (
http,loggingonly). - Immutable models with
copyWithusing sentinel pattern for nullable fields. - Full type safety with sealed exception hierarchy.
- Sealed classes for polymorphic types (
ChatMessage,ContentPart,ToolChoice,ResponseFormat,Tool,OcrDocument).
- Improved DX:
- Named constructors for common patterns (e.g.,
ChatMessage.user(),ChatMessage.system(),Tool.function(),Tool.webSearch()). - Explicit streaming methods (
createStream()vscreate()). - Extension methods for convenient response access (
response.text,response.toolCalls,response.hasToolCalls). - Rich logging with field redaction for sensitive data.
- Pagination utilities (
Paginator) and job polling helpers (FineTuningJobPoller,BatchJobPoller).
- Named constructors for common patterns (e.g.,
- Full API coverage:
- Chat completions with tool calling, multimodal inputs, and JSON schema validation.
- Fill-in-the-Middle (FIM) code completions with streaming.
- Text embeddings with dimension control and quantization options.
- File management (upload, download, signed URLs).
- Fine-tuning with hyperparameter control and W&B integration.
- Batch processing for large-scale async operations.
- Content moderation and text classification.
- OCR for PDFs and images with markdown output.
- Audio transcription with word-level timestamps.
- Agents with built-in tools (web search, code interpreter, image generation).
- Stateful conversations with context management.
- Document libraries for RAG workflows.
See MIGRATION.md for step-by-step examples and mapping tables.
Commits
- BREAKING FEAT: Complete v1.0.0 reimplementation (#8). (e18581e5)
- FEAT: Update README and add classification/moderation examples (#15). (88b2064c)
- FIX: Pre-release documentation and code fixes (#44). (93c78871)
- REFACTOR: Align client package architecture across SDK packages (#37). (cf741ee1)
- REFACTOR: Align API surface across all SDK packages (#36). (ed969cc7)
- DOCS: Refactors repository URLs to new location. (76835268)
- Resource-based API organization:
-
0.1.120 Dec 2025 -
0.1.1+122 Dec 2025Release notes
Open source → -
0.1.015 Oct 2025Release notes
Open source →[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
-
0.1.0+116 Oct 2025 -
0.0.631 Aug 2025 -
0.0.530 Jul 2025 -
0.0.412 Jun 2025 -
0.0.315 Feb 2024Release notes
Open source → -
0.0.3+110 Apr 2024Release notes
Open source → -
0.0.3+231 May 2024 -
0.0.3+302 Jul 2024 -
0.0.3+416 Dec 2024 -
0.0.226 Dec 2023 -
0.0.2+113 Jan 2024Release notes
Open source → -
0.0.2+220 Jan 2024Release notes
Open source → -
0.0.2+331 Jan 2024 -
0.0.112 Dec 2023 -
0.0.1+115 Dec 2023Release notes
Open source → -
0.0.1-dev.112 Dec 2023 pre-release