googleai_dart
Unofficial Dart client for Google AI Gemini and Vertex AI Gemini REST APIs plus Live API WebSocket sessions.
11.0.0
8.5K downloads/mo
#3144 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
Release timing varies
gaps range from 9 days to 2 months
Nearly every release is documented
notes for 39 of 39 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
40 releases · first in 2023
26 releases in the last 12 months
see the full history below
Release timeline
40 releases · Dec 2023 to Aug 2026Releases
latest 40-
11.0.002 Aug 2026Release notes
Open source →[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Syncs
googleai_dartto 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 streamingmetadatafield is now only present onstep.deltaevents (StreamMetadatais renamed toStepDeltaMetadata),cachedContentis removed from interactions, andInteractionGenerationConfig.temperature/topPare removed following their deprecation by the Gemini API. -
10.0.001 Aug 2026Release notes
Open source →[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Syncs
googleai_dartto the latest main and interactions Gemini OpenAPI specs (June 2026 updates). Adds Interactions safety settings (InteractionSafetySettingwith harm-category, threshold, and method enums) pluslabelson interaction requests, video generation support via a newInteractionVideoConfig(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 expandsHarmCategorywithjailbreakplus the legacy PaLM categories. Breaking:InteractionGenerationConfig.frequencyPenaltyandpresencePenaltyare removed, matching their removal from the Interactions API spec and official SDKs. -
9.0.005 Jul 2026Release notes
Open source →[!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_tokensendpoint with a flatAuthTokenbody, and new generation capabilities land:GenerationConfig.translationConfig,ComputerUsesafety-policy controls and prompt-injection detection,FinishReason.ESCALATION, LivehistoryConfig, plus InteractionsfrequencyPenalty/presencePenalty,cachedContent, and SDK-derivedoutputText/outputImage/outputAudio/outputVideoaccessors. Breaking: the auth-token endpoint/body shape changed (theCreateAuthTokenRequestwrapper is removed),Interaction.roleis removed, andStreamMetadata.usageis renamed tototalUsage. 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. -
8.0.006 Jun 2026Release notes
Open source →[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Syncs the experimental Interactions API to the latest Generative Language spec.
RetrievalToolgains RAG retrieval viaExaAISearchConfig,ParallelAISearchConfig, andRagStoreConfig(with nestedRagResource/RagRetrievalConfig/Filter/HybridSearch/RankService); every streamed SSE event now exposes optionalStreamMetadatatoken usage; andDeepResearchAgentConfig.enableBigqueryToolandInteractionStatus.budgetExceededare added. Breaking: thesignaturefield 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 thevertex_aipackage changed). -
7.0.024 May 2026Release notes
Open source →[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Brings
googleai_dartup to the May-2026 Gemini spec. The core API gainsGenerationConfig.responseFormatfor per-modality (text/audio/image) output configuration, and File Search adds multimodal RAG viaFileSearchStore.embeddingModel(opt intogemini-embedding-2) plus adownloadMedia(...)endpoint. The Interactions API is migrated to its May-2026 breaking-changes shape — tool calls/results now live in anInteractionStepsealed family, the SSE event stream is restructured, and a newclient.webhooksresource (CRUD + ping + secret rotation) is added, with the client opting in via theApi-Revision: 2026-05-20header.LiveSession.close()is now idempotent. Breaking: the impact is confined to the experimental Interactions API — renamed types (theResponseFormatfamily gains anInteraction*prefix,Interaction.outputs→steps,ArgumentsDelta.partialArguments→arguments,AudioContent.rate→sampleRate), the replaced tool-call/result step types, and the droppedVideoResponseFormat. Callers using only the coregenerateContent/embeddings/files surface are unaffected.- BREAKING FEAT: Sync to latest spec (Agents, Environments, responseFormat) (#239). (e2318200)
- BREAKING FEAT: Migrate Interactions API, add Webhooks resource (#234). (74b5a52e)
- FEAT: Add file search embeddingModel and downloadMedia (#219). (85cf5f88)
- FIX: Make LiveSession.close idempotent (#240). (2855dd3b)
- CHORE: Fix use_null_aware_elements lint flagged by Dart 3.12 (#232). (31ac5efc)
-
6.3.002 May 2026Release notes
Open source →Syncs
googleai_dartto the latest Gemini v1beta OpenAPI spec and adds an optionalmediaIdfield toRetrievedContext. The Gemini API now returns amediaIdresource name (fileSearchStores/{store_id}/media/{blob_id}) onRetrievedContextchunks for multimodal file-search results, letting callers fetch the underlying blob from theFileSearchStore. The field is fully integrated intofromJson/toJson/copyWith/toString. -
6.2.022 Apr 2026Release notes
Open source →Adds support for the latest Gemini API surface. Introduces a new
EmbedContentConfigschema that consolidates embedding request parameters — with newautoTruncate,documentOcr, andaudioTrackExtractionfields — and deprecates the equivalent top-leveltaskType,title, andoutputDimensionalityfields onEmbedContentRequest. On the Interactions API, addscollaborativePlanningandvisualizationfields toDeepResearchAgentConfig, exposing the next-generation Gemini Deep Research human-in-the-loop planning and inline visualization capabilities. -
6.1.016 Apr 2026Release notes
Open source →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
ResponseModalityenum, and refreshes the main OpenAPI spec metadata with no schema changes. -
6.0.016 Apr 2026Release notes
Open source →[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Aligns with the latest upstream OpenAPI specs, adding
documentandvideoresponse modalities, a newRetrievalToolvariant (withVertexAISearchConfig) for Vertex AI Search,serviceTiersupport for flex/standard/priority tier selection,pageNumberonRetrievedContext, andchannels/rateon audio content and delta types. Breaking:TextDelta.annotationshas been removed and moved to a dedicatedTextAnnotationDeltavariant ofInteractionDelta— streaming callers that handle annotation deltas must update their sealed-class pattern matching. -
5.1.009 Apr 2026Release notes
Open source →Adds
EmbeddingUsageMetadatawithpromptTokenCountandpromptTokenDetailsfields toEmbedContentResponseandBatchEmbedContentsResponse, enabling token usage tracking for embedding requests. -
5.0.102 Apr 2026Release notes
Open source →Fixes the file search store upload URL (
:upload→:uploadToFileSearchStore) which caused a 404 on every call, and adds an optionalforceparameter todelete()anddeleteDocument()for cascading deletes of documents and chunks. -
5.0.029 Mar 2026Release notes
Open source →[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Updates the interactions OpenAPI spec with the new
ContentDeltaDataschema andFileSearchResult.customMetadataproperty, and makes 21 spec-required fields non-nullable across 15 interaction content types — aligned with the official Python SDK. AddsInteractionMediaResolutionenum for type-safe resolution fields in image/video content and delta types. Also fixes list equality inListPermissionsResponseto use deep comparison and replaces unnecessary lint ignores with proper fixes. -
4.0.027 Mar 2026Release notes
Open source →[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
Major update aligning with the latest Google AI spec. Adds
ToolTypeenum,ToolCall/ToolResponsemodels, full Google Maps support in the Interactions API, and restructuresAnnotationfrom a flat class to a sealed class withUrlCitation,FileCitation, andPlaceCitationsubtypes. Strengthens weak types across models by replacing rawString?,List<String>?, andMap<String, dynamic>?fields with proper Dart enums and typed classes (ResponseModality,CodeExecution,UrlContext,MultiSpeakerVoiceConfig). Also addsServiceTierenum for generation request prioritization, fixes Vertex AI base URL handling for thegloballocation, 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.- BREAKING FEAT: Align with latest Google AI spec (#131). (e4ab3166)
- BREAKING FEAT: Strengthen weak types across models (#113). (c24d0897)
- FEAT: Add ServiceTier enum and serviceTier to GenerateContentRequest (#139). (253eb8e4)
- FIX: Update base URL for Vertex AI to handle global location (#146). (9d6cbdcb)
- DOCS: Overhaul READMEs and add llms.txt ecosystem (#149). (98f11483)
- TEST: Migrate Live API tests to gemini-3.1-flash-live-preview (#147). (1ed72c01)
- TEST: Add TTS and STT integration tests (#112). (9c664da1)
-
3.6.016 Mar 2026Release notes
Open source →Updated Interactions API with new content types (file search call, image config) and improved model fields. Also fixed interactions streaming by moving the
streamflag from a query parameter to the request body, matching the official Python SDK behavior. -
3.5.012 Mar 2026Release notes
Open source →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.
-
3.4.010 Mar 2026Release notes
Open source →This release adds inline streaming error detection for improved reliability when handling streamed responses.
-
3.3.106 Mar 2026Release notes
Open source →Internal improvements to build tooling and package publishing configuration.
-
3.3.004 Mar 2026Release notes
Open source →Added
baseUrlanddefaultHeadersparameters towithApiKeyconstructors for more flexible client initialization. -
3.2.004 Mar 2026Release notes
Open source →Added
withApiKeyconvenience constructor for simplified client initialization. -
3.1.003 Mar 2026Release notes
Open source →Added thoughtSignature support for FunctionCallPart and ThoughtPart, pre-release Gemini 3.1 migration and documentation fixes, and various architecture alignments.
- FEAT: Pre-release Gemini 3.1 migration and doc fixes (#47). (8fcfbd84)
- FEAT: Add thoughtSignature support to FunctionCallPart and ThoughtPart (#39). (cd2f5bdc)
- FIX: Fix linter issues. (ad1e1f94)
- REFACTOR: Align client package architecture across SDK packages (#37). (cf741ee1)
- REFACTOR: Align API surface across all SDK packages (#36). (ed969cc7)
- REFACTOR: Extract streaming helpers to StreamingResource mixin (#2). (0b6f0ed9)
- DOCS: Add image generation documentation and example (#25). (21602051)
- DOCS: Add comprehensive examples (#14). (b3bade72)
- DOCS: Refactors repository URLs to new location. (76835268)
-
3.0.027 Dec 2025Release notes
Open source →[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
-
2.1.023 Dec 2025 -
2.0.020 Dec 2025Release notes
Open source →[!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.
- BREAKING FEAT: Remove deprecated schema fields (#848). (e6d07ec4)
- BREAKING FEAT: Remove deprecated Chunks and query APIs (#847). (9cae76d5)
- BREAKING FEAT: Remove deprecated RagStores resource (#846). (1ab553f1)
- FEAT: Add InteractionsResource and client integration (#905). (af6b13ea)
- FEAT: Add Interactions API tool types (#904). (2258cfa1)
- FEAT: Add Interactions API events and deltas (#903). (826d3f64)
- FEAT: Add Interactions API content types (#902). (b8c61743)
- FEAT: Add Interactions API core models (#901). (65f5db17)
- FEAT: Update existing models with new properties (#856). (dd3893e0)
- FEAT: Add RetrievalConfig to ToolConfig (#855). (5e11aa70)
- FEAT: Add MediaResolution to Part (#854). (df76f8c5)
- FEAT: Add GoogleMaps tool (#853). (54814614)
- FEAT: Add McpServers tool (#852). (97970687)
- FEAT: Add FileSearch tool (#851). (a00895b1)
- FEAT: Add grounding models (#850). (bb1a6228)
- FEAT: Add FileSearchStores resource (#849). (acb63d72)
- FEAT: Add ThinkingConfig support to GenerationConfig (#817). (36de62a9)
- FIX: Complete alignment with target implementation (#884). (60476e8d)
- DOCS: Add Interactions API docs and example (#897). (f4a04677)
-
1.1.016 Oct 2025 -
1.0.015 Oct 2025Release 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, 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.
What's new
- Unified client for both:
- Google AI Gemini Developer API
- Vertex AI Gemini API
- Complete API coverage: 78 endpoints.
- Files API: upload, list, get, delete, download.
- Generated Files API: list, get, getOperation (video outputs).
- Cached Contents: full CRUD.
- Batch operations: batchGenerateContent, batchEmbedContents, asyncBatchEmbedContent with LRO polling.
- Corpora & RAG: corpus CRUD (Google AI); documents/chunks/query, metadata filters, batch chunk ops (Vertex AI only).
- RAG Stores: documents list/create/get/delete/query + operations.
- Dynamic Content: generate/stream content with dynamic model IDs.
- Permissions: create/list/get/update/delete/transferOwnership for eligible resources.
- Tuned Models: list, get, listOperations, generation APIs.
- Prediction (Veo): predict, predictLongRunning, operation polling, RAI filtering.
- Architecture:
- Interceptor chain (Auth → Logging → Error).
- Authentication: API key, Bearer token, custom OAuth via
AuthProvider. - Retry with exponential backoff + jitter.
- Abortable requests via
abortTrigger(streaming and non-streaming). - SSE streaming parser.
- Central
GoogleAIConfig(timeouts, retry policy, log level, baseUrl).
- Testing:
- 560+ tests covering all endpoints, error branches, streaming/abort flows.
Breaking Changes
- Resource-based API: Methods reorganized under strongly-typed resources:
client.models.*(generation, streaming, embeddings, tokens, prediction)client.tunedModels.*client.files.*,client.generatedFiles.*client.cachedContents.*client.batches.*client.corpora.*client.ragStores.*
- Parameter rename:
modelId→model. - Configuration: New
GoogleAIConfigwithAuthProviderpattern (API key / bearer / custom OAuth). - Exceptions: Replaced ad-hoc errors with a typed hierarchy:
ApiException,ValidationException,RateLimitException,TimeoutException,AbortedException.
- Dependencies: Removed
fetch_client; now minimal (http,logging).
See MIGRATION.md for step-by-step examples and mapping tables.
- Unified client for both:
-
0.1.331 Aug 2025 -
0.1.230 Jul 2025 -
0.1.112 Jun 2025 -
0.1.014 May 2024 -
0.1.0+131 May 2024 -
0.1.0+202 Jul 2024 -
0.1.0+316 Dec 2024 -
0.0.410 Apr 2024Release notes
Open source →- FEAT: Support generateContent for tuned model in googleai_dart client (#358). (b4641a09)
- FEAT: Support output dimensionality in Google AI Embeddings (#373). (6dcb27d8)
- FEAT: Support updating API key in Google AI client (#357). (b9b808e7)
- FIX: Have the == implementation use Object instead of dynamic (#334). (89f7b0b9)
-
0.0.315 Feb 2024 -
0.0.226 Dec 2023 -
0.0.2+113 Jan 2024Release notes
Open source → -
0.0.2+231 Jan 2024 -
0.0.115 Dec 2023 -
0.0.1+115 Dec 2023Release notes
Open source → -
0.0.1-dev.114 Dec 2023 pre-release