LiveServerGoingAwayNotice message. (#15410)sendVideoRealtime
method on LiveSession.
(#15432)To get started with the Live API, see the Firebase docs on Bidirectional streaming using the Gemini Live API. (#15309)
gemini-2.5-flash-image-preview model using generateContentStream or
sendMessageStream with the Gemini Developer API. (#15262)CountTokensResponse.totalBillableCharacters which was
deprecated in 11.15.0. Use totalTokens instead. (#15056)Sendable warnings introduced in the Xcode 26 beta. (#14947)title in string, number and array Schema
types. (#14971)CountTokensResponse.totalBillableCharacters; use
totalTokens instead. Gemini 2.0 series models and newer are always billed by
token count. (#14934)FirebaseAI). This
SDK replaces the previous Vertex AI in Firebase SDK (FirebaseVertexAI) to
accommodate the evolving set of supported features and services.
To start using the new SDK, import the FirebaseAI module and use the
top-level FirebaseAI class. See details in the migration guide
.
ModalityTokenCount decoding when the tokenCount field is
omitted; this occurs when the count is 0. (#14745)Candidate decoding when SafetyRating values are missing a
category or probability; this may occur when using Gemini for image
generation. (#14817)GenerationConfig. This includes public experimental support for image
generation using Gemini 2.0 Flash (gemini-2.0-flash-exp). (#14658)
Schema fields: minItems/maxItems (array
size limits), title (schema name), minimum/maximum (numeric ranges),
anyOf (select from sub-schemas), and propertyOrdering (JSON key order). (#14647)URLSession bug introduced in Xcode 16.3. (#14677)GenerativeModel or ImagenModel. (#14610)@preconcurrency when imported in Swift 6.role in system instructions is now ignored; no code changes
are required. (#14558)GenerativeModel.countTokens(...) now include
tokens from the schema for JSON output and function calling; reported token
counts will now be higher if using these features.VertexAI.vertexAI(app: app1) and
VertexAI.vertexAI(app: app2) would return the same instance if their
location was the same, including the default us-central1. (#14007)format: "double" in Schema.double() since
double-precision accuracy isn't enforced by the model; continue using the
Swift Double type when decoding data produced with this schema. (#13990)HarmCategory enum is no longer nested
inside the SafetySetting struct and the unspecified case has been
removed. (#13686)BlockThreshold enum in SafetySetting
has been renamed to HarmBlockThreshold. (#13696)unspecified case has been removed from
the FinishReason, BlockReason and HarmProbability enums; this scenario
is now handled by the existing unknown case. (#13699)citationSources of
CitationMetadata has been renamed to citations. (#13702)Schema is now internal;
use the new type methods Schema.string(...), Schema.object(...), etc.,
instead. (#13852)FunctionDeclaration now
accepts an array of optional parameters instead of a list of required
parameters; if a parameter is not listed as optional it is assumed to be
required. (#13616)CountTokensResponse.totalBillableCharacters
is now optional (Int?); it may be null in cases such as when a
GenerateContentRequest contains only images or other non-text content.
(#13721)ImageConversionError enum is no longer
public; image conversion errors are still reported as
GenerateContentError.promptImageContentError. (#13735)CountTokensError enum has been removed;
errors occurring in GenerativeModel.countTokens(...) are now thrown directly
instead of being wrapped in a CountTokensError.internalError. (#13736)ModelContent.Part has been replaced
with a protocol named Part to avoid future breaking changes with new part
types. The new types TextPart and FunctionCallPart may be received when
generating content; additionally the types InlineDataPart, FileDataPart
and FunctionResponsePart may be provided as input. (#13767)ModelContent now require
the label parts:. (#13832)HarmCategory, HarmProbability, and
FinishReason are now structs instead of enums types and the unknown cases
have been removed; in a switch statement, use the default: case to cover
unknown or unhandled values. (#13728, #13854, #13860)Tool initializer is now internal; use the
new type method functionDeclarations(_:) to create a Tool for function
calling. (#13873)FunctionCallingConfig initializer and
Mode enum are now internal; use one of the new type methods auto(),
any(allowedFunctionNames:), or none() to create a config. (#13873)CandidateResponse type is now named
Candidate. (#13897)GenerationConfig are now internal; they all remain configurable in the
initializer. (#13904)URLRequest; this timeout may
still be customized in RequestOptions. (#13722)GenerativeModel.countTokens(...) now includes
systemInstruction, tools and generationConfig in the totalTokens and
totalBillableCharacters counts, where applicable. (#13813)HarmCategory .civicIntegrity for filtering content
that may be used to harm civic integrity. (#13728)probabilityScore, severity and severityScore in
SafetyRating to provide more fine-grained detail on blocked responses.
(#13875)HarmBlockThreshold .off, which turns off the safety
filter. (#13863)HarmBlockMethod parameter method in
SafetySetting that configures whether responses are blocked based on the
probability and/or severity of content being in a HarmCategory. (#13876)FinishReason values .blocklist, .prohibitedContent,
.spii and .malformedFunctionCall that may be reported. (#13860)BlockReason values .blocklist and .prohibitedContent
that may be reported when a prompt is blocked. (#13861)PromptFeedback property blockReasonMessage that may be
provided alongside the blockReason. (#13891)publicationDate property that may be provided in
Citation. (#13893)presencePenalty and frequencyPenalty parameters to
GenerationConfig. (#13899)Decodable conformance for FunctionResponse. (#13606)GenerativeModel and
Chat as Swift actors (#13545) introduced in 11.2; The methods
generateContentStream, startChat and sendMessageStream no longer need to
be called with await. (#13703)uri and added
support for decoding title fields, which were previously ignored. (#13518)generateContentStream and sendMessageStream) are now throwing and
asynchronous and must be called with try await. (#13545, #13573)startChat) is now
asynchronous and must be called with await. (#13545)ImageConversionError.couldNotConvertToJPEG error case is now an enum value
instead of the Any type. (#13575)responseSchema in
GenerationConfig; see
control generated output
for more details. (#13576)gemini-1.5-flash-preview-0514 model in docs
and samples. Developers should now use the auto-updated versions,
gemini-1.5-pro or gemini-1.5-flash, or a specific stable version; see
available model names
for more details. (#13099)gemini-1.5-pro-preview-0409 model in docs and
samples. Developers should now use gemini-1.5-pro-preview-0514 or
gemini-1.5-flash-preview-0514; see
available model names
for more details. (#12979)