new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

AI SDK · Providers · all subjects

google/options

47 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Imagen model personGeneration option

Imagen models support the `personGeneration` provider option with values: 'allow_adult' (default), 'allow_all', or 'dont_allow'. This controls whether to allow person generation.

Google cachedContent option

The `cachedContent` option (string, optional) specifies the name of the cached content used as context to serve the prediction. Format: cachedContents/{cachedContent}

Google safetySettings option

The `safetySettings` option accepts an array of objects with `category` (string) and `threshold` (string) properties. Categories include: HARM_CATEGORY_UNSPECIFIED, HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_CIVIC_INTEGRITY. Thresholds include: HARM_BLOCK_THRESHOLD_UNSPECIFIED, BLOCK_LOW_AND_ABOVE, BLOCK_MEDIUM_AND_ABOVE, BLOCK_ONLY_HIGH, BLOCK_NONE, OFF.

Google responseModalities option

The `responseModalities` option (string array, optional) specifies modalities for the response. Supported modalities are: TEXT, IMAGE. When not defined or empty, the model defaults to returning only text.

Google thinkingConfig option structure

The `thinkingConfig` option (object, optional) has properties: thinkingLevel ('minimal' | 'low' | 'medium' | 'high'), thinkingBudget (number), and includeThoughts (boolean). Configuration varies by model generation.

Google thinkingLevel for Gemini 3 models

For Gemini 3 and later models, `thinkingLevel` controls reasoning depth. Gemini 3.1 Pro supports 'low', 'medium', and 'high'. Gemini 3 Pro supports 'low' and 'high'. Gemini 3 Flash supports all four levels: 'minimal', 'low', 'medium', and 'high'.

Google thinkingBudget for Gemini 2.5 models

For Gemini 2.5 models, `thinkingBudget` (number, optional) gives the model guidance on thinking tokens it can use. Setting it to 0 disables thinking if the model supports it. This option is for Gemini 2.5 models; Gemini 3 and later should use `thinkingLevel` instead.

Google includeThoughts option

The `includeThoughts` option (boolean, optional) when set to true returns thought summaries, which are synthesized versions of the model's raw thoughts and offer insights into the model's internal reasoning process.

Google imageConfig option structure

The `imageConfig` option (object, optional) for image generation has properties: aspectRatio (string) and imageSize (string). Supported aspectRatios: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9. Supported imageSizes: 1K, 2K, 4K.

Google audioTimestamp option

The `audioTimestamp` option (boolean, optional) enables timestamp understanding for audio-only files. See Google Cloud audio understanding documentation.

Google mediaResolution option

The `mediaResolution` option (string, optional) specifies media resolution. Supported values: MEDIA_RESOLUTION_UNSPECIFIED, MEDIA_RESOLUTION_LOW, MEDIA_RESOLUTION_MEDIUM, MEDIA_RESOLUTION_HIGH.

Google labels option

The `labels` option (Record<string, string>, optional) defines labels used in billing reports. Available on Vertex AI only.

Google serviceTier option

The `serviceTier` option (string: 'standard' | 'flex' | 'priority', optional) sets the service tier. 'flex' offers 50% cheaper processing at increased latency cost. 'priority' offers ultra-low latency at 75-100% price premium over 'standard'. The actual tier is surfaced on `result.providerMetadata.google.serviceTier`.

Google threshold option

The `threshold` option (string, optional) is a standalone safety threshold setting that can be used independently of `safetySettings`, using the same values as the `safetySettings` threshold.

Google retrievalConfig.latLng provider option

The optional `retrievalConfig.latLng` provider option provides location context for queries about nearby places. This configuration applies to any grounding tools that support location context, including Google Maps and Google Search.

Google translation model provider options

Translation models accept the optional provider option: echoTargetLanguage (boolean) - whether input audio already in the target language should be echoed instead of producing silence.

Google Interactions API provider options type

Interactions model reads options from the shared `providerOptions.google.*` namespace and can be validated with `GoogleLanguageModelInteractionsOptions` type.

Google Interactions API previousInteractionId option

The `previousInteractionId` option (string, optional) is a server-side interaction id from a prior turn. When set, the server pulls prior context from its own state and only the new user message is sent on the wire. Pair with default `store: true` to chain stateful conversations.

Google Interactions API store option

The `store` option (boolean, optional, default true) determines whether the server persists the interaction. Set to false for stateless multi-turn conversations where the full message history is re-sent on every turn.

Google Interactions API agent option

The `agent` option (string, optional) specifies the name of a Gemini agent preset (e.g. 'deep-research-pro-preview-12-2025'). Prefer the factory form `google.interactions({ agent: '...' })` for type-checking.

Google Interactions API agentConfig option

The `agentConfig` option (object, optional) provides per-agent configuration. Supports `{ type: 'dynamic' }` and `{ type: 'deep-research', thinkingSummaries?, visualization?, collaborativePlanning? }`.

Google Interactions API thinkingLevel option

The `thinkingLevel` option ('minimal' | 'low' | 'medium' | 'high', optional) controls reasoning depth for thinking-enabled models and maps onto the Interactions request's `thinking_level`.

Google Interactions API thinkingSummaries option

The `thinkingSummaries` option ('auto' | 'none', optional) determines whether the model returns synthesized thought summaries on reasoning parts. Defaults to the API default.

Google Interactions API responseFormat option

The `responseFormat` option (Array of objects, optional) contains output-format entries mapping to the API's `response_format` array. Each entry has: type ('text' | 'image' | 'audio'), mimeType (optional string), schema (optional unknown), aspectRatio (optional string), imageSize (optional '1K' | '2K' | '4K' | '512'). aspectRatio values: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, 1:8, 8:1, 1:4, 4:1.

Google Interactions API imageConfig option deprecated

The `imageConfig` option is deprecated. Use `responseFormat` with a `{ type: 'image', ... }` entry instead. The SDK translates `imageConfig` into a matching `response_format` image entry and emits a warning when set.

Google Interactions API mediaResolution option

The `mediaResolution` option ('low' | 'medium' | 'high' | 'ultra_high', optional) specifies media resolution applied to image inputs/outputs.

Google Interactions API serviceTier option

The `serviceTier` option ('flex' | 'standard' | 'priority', optional) sets the service tier for the request. Mirrored back on `result.providerMetadata.google.serviceTier` for observability.

Google Interactions API systemInstruction option

The `systemInstruction` option (string, optional) provides an alternative to the AI SDK `system` message. If both are set, the AI SDK `system` message wins and a warning is emitted.

Google Interactions API background option

The `background` option (boolean, optional) runs the interaction in the background. Required for agents whose server-side workflow cannot complete within a single request/response. Rejected by agents that only support synchronous calls. When true, the POST returns a non-terminal status and the SDK polls `GET /interactions/{id}` until work completes.

Google Interactions API environment option

The `environment` option (string | object, optional) provides sandbox environment configuration for managed agents. Pass 'remote' to provision a fresh sandbox, an environment_id string to reuse an existing one, or an object `{ type: 'remote', sources?, network? }` to preload files and/or constrain outbound traffic. Only applies to agent calls.

Google Interactions API pollingTimeoutMs option

The `pollingTimeoutMs` option (number, optional) sets the maximum time in milliseconds to poll a background interaction before giving up. Defaults to 30 minutes (1,800,000 ms). Long-running agents may need longer.

Google Interactions API environment configuration forms

The `environment` option accepts three forms: 'remote' (provision fresh sandbox), any other string (environment_id to reuse, forking previous sandbox), or an object `{ type: 'remote', sources?, network? }` (provision fresh and optionally preload files/constrain traffic).

Google Interactions API source types

Three source types are supported: inline (write string into sandbox at target), repository (clone git repository, pass URL as source), gcs (mount Google Cloud Storage prefix).

Google Interactions API network configuration

The `network` field in environment configuration accepts 'disabled' (block all outbound traffic) or an object with `allowlist` array whose entries carry `domain` plus optional `transform` array of header objects to inject into matching requests.

Gemma models system instruction handling

Gemma models do not natively support the `systemInstruction` parameter. The Google provider automatically handles system instructions by prepending them to the first user message, allowing seamless use of system instructions with Gemma models without additional configuration.

Google embedding model options

Google embedding models support the following optional provider options via `providerOptions.google`: (1) outputDimensionality (number) - optional reduced dimension for output embedding, with excessive values truncated from the end; (2) taskType (string) - optional task type including SEMANTIC_SIMILARITY, CLASSIFICATION, CLUSTERING, RETRIEVAL_DOCUMENT, RETRIEVAL_QUERY, QUESTION_ANSWERING, FACT_VERIFICATION, CODE_RETRIEVAL_QUERY; (3) content (array) - optional per-value multimodal content parts for embedding non-text content, with array length matching number of values, each entry null for text-only or an array of parts that can be { text: string }, { inlineData: { mimeType: string, data: string } } for inline base64 data, or { fileData: { fileUri: string, mimeType: string } } for remote content.

Google provider-specific language model options

Google language model options are passed via `providerOptions.google` with type `GoogleLanguageModelOptions`. Example: `await generateText({ model, providerOptions: { google: { safetySettings: [...] } satisfies GoogleLanguageModelOptions } });`

Imagen models do not support size parameter

Imagen models do not support the `size` parameter. Use the `aspectRatio` parameter instead.

Gemini image models do not support size or n parameters

Gemini image models do not support the `size` or `n` parameters. Use `aspectRatio` instead of `size`. Mask-based inpainting is also not supported.

Gemini image models Google Search grounding

Gemini image models support Google Search grounding through `providerOptions.google.googleSearch`. Pass an empty object `{}` to enable with defaults, or `{ searchTypes: { imageSearch: {} } }` to ground on reference photos. Grounding metadata is forwarded to the image result in `result.providerMetadata.google.groundingMetadata`.

Google speech model voice parameter

The `voice` argument for Google speech models can be set to one of Gemini's 30 prebuilt voices including Kore, Puck, Zephyr, and Charon. Voice names are case-sensitive and default to 'Kore'.

Google speech model instructions parameter

Gemini speech models honor natural-language style direction. The `instructions` argument is prepended to the spoken text, so `instructions: 'Say cheerfully'` with `text: 'Hello'` speaks 'Say cheerfully: Hello'.

Google speech multi-speaker audio configuration

For multi-speaker dialogue in Google speech models, pass a `multiSpeakerVoiceConfig` through `providerOptions.google`. Each speaker name must match a name used in the input text. When set, it overrides the top-level `voice`. The configuration contains `speakerVoiceConfigs` array where each element has `speaker` (string) and `voiceConfig` with `prebuiltVoiceConfig` containing `voiceName`.

Google TTS models do not support speed or language options

Gemini TTS models do not support the `speed` or `language` options; passing them adds a warning to `result.warnings`. Language is detected automatically from the input text.

Google speech model output format options

By default, Google speech models return audio as a playable WAV file (`result.audio.mediaType` is `audio/wav`). Set `outputFormat: 'pcm'` to receive raw signed 16-bit little-endian mono PCM bytes instead. The sample rate is reported in `result.providerMetadata.google.sampleRate`.

Enhanced reasoning with thinking mode configuration

Gemini models support enhanced reasoning through thinking mode using the providerOptions.google.thinkingConfig parameter. The thinkingConfig object accepts two properties: - includeThoughts (boolean): Enable or disable inclusion of thoughts - thinkingLevel (string): Control reasoning depth Example configuration: ``` providerOptions: { google: { thinkingConfig: { includeThoughts: true, thinkingLevel: 'low' } } } ```

Google structuredOutputs option

The `structuredOutputs` option (boolean, optional, default true) enables structured output. Set to false when the JSON Schema contains elements not supported by Google's OpenAPI schema version, such as unions.

Give your agent this brain