NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #1270 most downloaded on pub.dev
The Google AI Dart SDK enables developers to use Google's state-of-the-art generative AI models (like Gemini).
Last release 1 years ago
17 Apr 2025
Ships unpredictably
gaps range from 8 days to 7 months
Nearly every release is documented
notes for 17 of 17 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
18 releases · first in 2024
Update the README.md to indicate that this package is deprecated; using the Firebase SDK is the preferred path forward.
We do not expect format exceptions to occur unless the server API is changing. Change from a plain FormatException to a specific exception which indic
We do not expect format exceptions to occur unless the server API is
changing. Change from a plain FormatException to a specific exception
which indicates the two possible resolution strategies - upgrade if not
already on the latest SDK, or file an issue.
One column per month.
Add support for model side Code Execution. Enable code execution by configuring Tools with a codeExecution argument.
Tools with a codeExecution argument.'model' when a chat response comes back with no role.The vertex backend uses a similar data model, but names the field citations instead of citationSources . Read either field, whichever exists, and pars
Fixes #184
The vertex backend uses a similar data model, but names the field
citations instead of citationSources. Read either field, whichever
exists, and parse it otherwise consistently.
citationSources
or citations keys, whichever exists. Fixes a FormatException when parsing
vertex results with citations.Maintains the internal details of using the client, but offers a general escape hatch for any unary request by exposing Task .
Maintains the internal details of using the client, but offers a general
escape hatch for any unary request by exposing Task.
Add a makeRequest utility method in an extension, and update the
existing unary requests to use it.
Add support for GenerationConfig.responseSchema for constraining JSON mime type output formats.
GenerationConfig.responseSchema for constraining JSON mimeConcatenate multiple TextPart into the text String in case the model replies with more than one part.
TextPart into the text String in case the modelformat argument to Schema.number and Schema.integer.UsageMetadata.GenerateContentRequest (previously omittedsafetySettings, generationConfig, tools, toolConfig, andsystemInstruction) in countTokens requests. This aligns the token countgenerateContent request.text getter on Candidate to make it easer to retrieve the text fromAdd support for parsing Vertex AI specific fields in CountTokensResponse .
CountTokensResponse.Schema for each value type.GenerationConfig.responseMimeType which supports setting'application/json' to force the model to reply with JSON parseable output.outputDimensionality argument support for embedContent andbatchEmbedContent.Content.functionResponses utility to reply to multiple function calls inPart class is no longer sealed. Exhaustive switches overPart instance will need to add a wildcard case.Add usageMetadata to GenerateContentResponse
Add usageMetadata to GenerateContentResponse (#143)
Add `UsageMetadata` and relevante parsing. Add a `usageMetadata` field
on `GenerateContentResponse`.
Add usage of the new field to the advanced text sample.
Refactor the `GenerateContentResponse` parse method to handled each
field individually at the top level. There is a behavior change for an
error case, but it is not visible through the message formats that are
returned from the backend in practice.
Prepare to publish.
usageMetadata field in GenerateContentResponse
messages.Use API version v1beta by default.
v1beta by default.Add support on content generating methods for overriding "tools" passed when the generative model was instantiated.
Allow specifying an API version in a requestOptions argument when constructing a model.
requestOptions argument when
constructing a model.FilePart, FunctionCall, and
FunctionResponse of the sealed class Part.Update the package version that is sent with the HTTP client name.
FormatException for errors. Errors
were previously only correctly parsed in generateContent calls.batchEmbedContents calls.Remove usage of new SDK features - support older SDKs 3.0 and above.
Fix an issue parsing generateContent() responses that do not include content (this can occur for some finishReasons).
generateContent() responses that do not include content
(this can occur for some finishReasons).generateContent() responses that include citation
sources with unpopulated fieldsBreaking HarmCategory.unknown renamed to unspecified. Removed unused unknown values in the HarmProbability and FinishReason enums.
HarmCategory.unknown renamed to unspecified. Removed unused
unknown values in the HarmProbability and FinishReason enums.- Initial release.
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →