NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #3148 most downloaded on pub.dev
Unofficial Dart client for Google AI Gemini and Vertex AI Gemini REST APIs plus Live API WebSocket sessions.
Last release 22 days ago
16 Sep 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 43 of 43 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
44 releases · first in 2023
> This release has breaking changes. See the Migration Guide for upgrade instructions.
[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Requires Dart 3.12 or later; upgrade your Dart SDK or the Dart SDK bundled with Flutter before updating this package.
Fixes Vertex AI requests for the us and eu multi-regions by selecting their dedicated regional endpoints, matching Google's official clients. The sele
Fixes Vertex AI requests for the us and eu multi-regions by selecting their dedicated regional endpoints, matching Google's official clients. The selected location is preserved in REST paths and Live API query parameters; global, regional locations, and explicit REST endpoint overrides retain their existing behavior.
One column per month.
Fixes embeddings on the Gemini Developer API, where a typed EmbedContentConfig was serialized as a nested object the API ignores — task type, title, a
Fixes embeddings on the Gemini Developer API, where a typed EmbedContentConfig was serialized as a nested object the API ignores — task type, title, and output dimensionality were silently dropped for callers using the canonical config API. Both embedContent and batchEmbedContents now flatten the config into the top-level request fields the endpoint expects, matching Google's official clients, and raise an ArgumentError for autoTruncate, documentOcr, and audioTrackExtraction, which Google documents as unavailable outside Vertex AI. This is the Gemini Developer API counterpart to the Vertex AI embedding fix shipped in 12.0.0.
> This release has breaking changes. See the Migration Guide for upgrade instructions.
[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Reworks Gemini Part handling so metadata survives an exact response-to-request round trip. Every typed part (TextPart, InlineDataPart, FunctionCallPart, and the rest) now carries the common thought, thoughtSignature, partMetadata, mediaResolution, and videoMetadata fields that the Gemini API models as siblings of the data discriminator — matching the flat representation used by the official Python and TypeScript SDKs, and required for thought signatures, which must be echoed back unchanged. Metadata-only payloads now canonicalize to a new MetadataPart, unknown or structurally ambiguous payloads decode to a lossless UnknownPart instead of throwing, and unrecognized non-reserved fields are retained through additionalProperties. Also fixes Vertex AI embeddings, where the typed EmbedContentConfig was ignored by the predict adapter — task type, title, output dimensionality, auto-truncation, document OCR, and audio extraction settings were silently dropped for callers following the current API.
> This release has breaking changes. See the Migration Guide for upgrade instructions.
[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Syncs googleai_dart to the latest main and interactions Gemini OpenAPI specs (July 2026 updates), adding an Environments API for managing sandboxed Managed Agent environments, a Triggers API for scheduling agent interactions on a cron expression, new Antigravity and CodeMender agent configs, and Automatic Speech Recognition (ASR) transcription support with word-level annotations. Unknown annotation types now decode safely instead of throwing mid-stream. Breaking: the streaming metadata field is now only present on step.delta events (StreamMetadata is renamed to StepDeltaMetadata), cachedContent is removed from interactions, and InteractionGenerationConfig.temperature/topP are removed following their deprecation by the Gemini API.
> This release has breaking changes. See the Migration Guide for upgrade instructions.
[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Syncs googleai_dart to the latest main and interactions Gemini OpenAPI specs (June 2026 updates). Adds Interactions safety settings (InteractionSafetySetting with harm-category, threshold, and method enums) plus labels on interaction requests, video generation support via a new InteractionVideoConfig (text-to-video, image-to-video, reference-to-video, edit), Computer Use safety policies (ComputerUseTool.disabledSafetyPolicies), streaming retrieval-tool deltas for Vertex AI Search/RAG store/Exa AI/Parallel AI, and expands HarmCategory with jailbreak plus the legacy PaLM categories. Breaking: InteractionGenerationConfig.frequencyPenalty and presencePenalty are removed, matching their removal from the Interactions API spec and official SDKs.
> This release has breaking changes. See the Migration Guide for upgrade instructions.
[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Syncs to the latest Gemini core and interactions specs. Ephemeral auth tokens now use the correct POST /v1beta/auth_tokens endpoint with a flat AuthToken body, and new generation capabilities land: GenerationConfig.translationConfig, ComputerUse safety-policy controls and prompt-injection detection, FinishReason.ESCALATION, Live historyConfig, plus Interactions frequencyPenalty/presencePenalty, cachedContent, and SDK-derived outputText/outputImage/outputAudio/outputVideo accessors. Breaking: the auth-token endpoint/body shape changed (the CreateAuthTokenRequest wrapper is removed), Interaction.role is removed, and StreamMetadata.usage is renamed to totalUsage. Also normalizes base URL handling across request, upload, and Live WebSocket URLs — trailing slashes, proxy sub-paths, and base-URL query params (including repeated keys) now work consistently at every URL-construction site.
> This release has breaking changes. See the Migration Guide for upgrade instructions.
[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Syncs the experimental Interactions API to the latest Generative Language spec. RetrievalTool gains RAG retrieval via ExaAISearchConfig, ParallelAISearchConfig, and RagStoreConfig (with nested RagResource/RagRetrievalConfig/Filter/HybridSearch/RankService); every streamed SSE event now exposes optional StreamMetadata token usage; and DeepResearchAgentConfig.enableBigqueryTool and InteractionStatus.budgetExceeded are added. Breaking: the signature field is removed from the function- and MCP-call/result steps and deltas (FunctionCallStep, FunctionResultStep, McpServerToolCallStep, McpServerToolResultStep, McpServerToolCallDelta, McpServerToolResultDelta) following its removal from the spec — the other 23 step/delta types that still declare it are unchanged. This release also documents Google's Vertex AI → Gemini Enterprise Agent Platform rebrand (docs only — no code identifiers, endpoints, or the vertex_ai package changed).
> This release has breaking changes. See the Migration Guide for upgrade instructions.
[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Brings googleai_dart up to the May-2026 Gemini spec. The core API gains GenerationConfig.responseFormat for per-modality (text/audio/image) output configuration, and File Search adds multimodal RAG via FileSearchStore.embeddingModel (opt into gemini-embedding-2) plus a downloadMedia(...) endpoint. The Interactions API is migrated to its May-2026 breaking-changes shape — tool calls/results now live in an InteractionStep sealed family, the SSE event stream is restructured, and a new client.webhooks resource (CRUD + ping + secret rotation) is added, with the client opting in via the Api-Revision: 2026-05-20 header. LiveSession.close() is now idempotent. Breaking: the impact is confined to the experimental Interactions API — renamed types (the ResponseFormat family gains an Interaction* prefix, Interaction.outputs → steps, ArgumentsDelta.partialArguments → arguments, AudioContent.rate → sampleRate), the replaced tool-call/result step types, and the dropped VideoResponseFormat. Callers using only the core generateContent/embeddings/files surface are unaffected.
Syncs googleai_dart to the latest Gemini v1beta OpenAPI spec and adds an optional mediaId field to RetrievedContext. The Gemini API now returns a medi
Syncs googleai_dart to the latest Gemini v1beta OpenAPI spec and adds an optional mediaId field to RetrievedContext. The Gemini API now returns a mediaId resource name (fileSearchStores/{store_id}/media/{blob_id}) on RetrievedContext chunks for multimodal file-search results, letting callers fetch the underlying blob from the FileSearchStore. The field is fully integrated into fromJson / toJson / copyWith / toString.
…and audioTrackExtraction fields — and deprecates the equivalent top-level taskType, title, and outputDimensionality fields on EmbedContentRequest. On…
Adds support for the latest Gemini API surface. Introduces a new EmbedContentConfig schema that consolidates embedding request parameters — with new autoTruncate, documentOcr, and audioTrackExtraction fields — and deprecates the equivalent top-level taskType, title, and outputDimensionality fields on EmbedContentRequest. On the Interactions API, adds collaborativePlanning and visualization fields to DeepResearchAgentConfig, exposing the next-generation Gemini Deep Research human-in-the-loop planning and inline visualization capabilities.
Adds a text-to-speech example for the new Gemini 3.1 Flash TTS preview model, demonstrating single-speaker synthesis, audio-tag control for inline pac
Adds a text-to-speech example for the new Gemini 3.1 Flash TTS preview model, demonstrating single-speaker synthesis, audio-tag control for inline pacing and tone, and multi-speaker dialogue. Also adds a README FAQ section for speech generation, fixes the image-generation snippet to use the ResponseModality enum, and refreshes the main OpenAPI spec metadata with no schema changes.
> This release has breaking changes. See the Migration Guide for upgrade instructions.
[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Aligns with the latest upstream OpenAPI specs, adding document and video response modalities, a new RetrievalTool variant (with VertexAISearchConfig) for Vertex AI Search, serviceTier support for flex/standard/priority tier selection, pageNumber on RetrievedContext, and channels/rate on audio content and delta types. Breaking: TextDelta.annotations has been removed and moved to a dedicated TextAnnotationDelta variant of InteractionDelta — streaming callers that handle annotation deltas must update their sealed-class pattern matching.
Adds EmbeddingUsageMetadata with promptTokenCount and promptTokenDetails fields to EmbedContentResponse and BatchEmbedContentsResponse, enabling token
Fixes the file search store upload URL (:upload → :uploadToFileSearchStore) which caused a 404 on every call, and adds an optional force parameter to
Fixes the file search store upload URL (:upload → :uploadToFileSearchStore) which caused a 404 on every call, and adds an optional force parameter to delete() and deleteDocument() for cascading deletes of documents and chunks.
> This release has breaking changes. See the Migration Guide for upgrade instructions.
[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Updates the interactions OpenAPI spec with the new ContentDeltaData schema and FileSearchResult.customMetadata property, and makes 21 spec-required fields non-nullable across 15 interaction content types — aligned with the official Python SDK. Adds InteractionMediaResolution enum for type-safe resolution fields in image/video content and delta types. Also fixes list equality in ListPermissionsResponse to use deep comparison and replaces unnecessary lint ignores with proper fixes.
> This release has breaking changes. See the Migration Guide for upgrade instructions.
[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Major update aligning with the latest Google AI spec. Adds ToolType enum, ToolCall/ToolResponse models, full Google Maps support in the Interactions API, and restructures Annotation from a flat class to a sealed class with UrlCitation, FileCitation, and PlaceCitation subtypes. Strengthens weak types across models by replacing raw String?, List<String>?, and Map<String, dynamic>? fields with proper Dart enums and typed classes (ResponseModality, CodeExecution, UrlContext, MultiSpeakerVoiceConfig). Also adds ServiceTier enum for generation request prioritization, fixes Vertex AI base URL handling for the global location, and adds llms.txt ecosystem files. The Live API client is compatible with the new Gemini 3.1 Flash Live model for building conversational, multimodal agents with improved tool use and lower latency.
Updated Interactions API with new content types (file search call, image config) and improved model fields. Also fixed interactions streaming by movin
Updated Interactions API with new content types (file search call, image config) and improved model fields. Also fixed interactions streaming by moving the stream flag from a query parameter to the request body, matching the official Python SDK behavior.
Updated to the latest Google AI API spec with new model types (grounding metadata, model info, and image models) and added Gemini Embedding 2 support.
Updated to the latest Google AI API spec with new model types (grounding metadata, model info, and image models) and added Gemini Embedding 2 support.
DOCS: Improve READMEs with badges, sponsor section, and vertex_ai deprecation (#90).
Internal improvements to build tooling and package publishing configuration.
Added baseUrl and defaultHeaders parameters to withApiKey constructors for more flexible client initialization.
Added withApiKey convenience constructor for simplified client initialization.
Added thoughtSignature support for FunctionCallPart and ThoughtPart, pre-release Gemini 3.1 migration and documentation fixes, and various architectur
Added thoughtSignature support for FunctionCallPart and ThoughtPart, pre-release Gemini 3.1 migration and documentation fixes, and various architecture alignments.
> This release has breaking changes. See the Migration Guide for upgrade instructions.
[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
> This release has breaking changes. See the Migration Guide for upgrade instructions.
[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
FEAT: Make googleai_dart fully WASM compatible (#808).
> This release has breaking changes. See the Migration Guide for upgrade instructions.
[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
TL;DR: Complete reimplementation with a new architecture, minimal dependencies, unified resource-based API, and full Gemini API coverage. Includes new Files, Batches, Caching, Corpora/RAG, RAG Stores, Dynamic Content, Permissions, Tuned Models, and Prediction (Veo) support.
AuthProvider.abortTrigger (streaming and non-streaming).GoogleAIConfig (timeouts, retry policy, log level, baseUrl).client.models.* (generation, streaming, embeddings, tokens, prediction)client.tunedModels.*client.files.*, client.generatedFiles.*client.cachedContents.*client.batches.*client.corpora.*client.ragStores.*modelId → model.GoogleAIConfig with AuthProvider pattern (API key / bearer / custom OAuth).ApiException, ValidationException, RateLimitException, TimeoutException, AbortedException.fetch_client; now minimal (http, logging).See MIGRATION.md for step-by-step examples and mapping tables.
FEAT: Migrate to Freezed v3 (#773).
BUILD: Update dependencies (#751).
FIX: Fix deserialization of sealed classes (#435).
REFACTOR: Migrate conditional imports to js_interop (#453).
REFACTOR: Upgrade api clients generator version (#610).
REFACTOR: Minor changes (#407).
FEAT: Support generateContent for tuned model in googleai_dart client (#358).
REFACTOR: Make all LLM options fields nullable and add copyWith (#284).
- DOCS: Update CHANGELOG.md.
Update a dependency to the latest release.
FIX: Fetch web requests with big payloads dropping connection (#273).
FEAT: Implement Dart client for Google AI API (#267).
- Bootstrap project.
Your coding agent can read these notes before it upgrades. Set up the MCP server →