Google Gemini
Detailed guide to configuration options for Google Gemini models in Weaver
Google Gemini Provider Options
Weaver supports several provider-specific configuration options for Google Gemini models. These can be set in the Provider Options (JSON) field in the chat configuration settings.
Available Provider Options
Search Grounding
Enable Google Search integration for up-to-date information.
Search grounding options:
useSearchGrounding- Boolean to enable/disable searchdynamicRetrievalConfig- Optional. Used in conjunction withuseSearchGroundingdynamicRetrievalConfig.mode- Can beMODE_DYNAMIC(search only when needed) orMODE_UNSPECIFIED(always search)dynamicRetrievalConfig.dynamicThreshold- Threshold value (0.0-1.0) for when to trigger search
Note: To enable inline citations, please use the following system prompt:
Response Modalities
Enable different response types from Gemini models, including image generation with gemini-2.0-flash-exp.
Possible values:
TEXT- Text responses (default)IMAGE- Image generation (only available with certain models)
Thinking Summaries
Set to true to display reasoning.
Thinking Budget
Set a cap on the number of thinking (reasoning) tokens used in Gemini thinking models. Thinking is enabled by default but can be turned off.
To turn thinking off, set thinkingBudget to 0:
Possible values
thinkingBudget- 0 to 24576
Budgets from 1 to 1024 tokens will be set to 1024.
Safety Settings
Configure content filtering and safety thresholds for Gemini responses.
Available categories:
HARM_CATEGORY_HATE_SPEECHHARM_CATEGORY_DANGEROUS_CONTENTHARM_CATEGORY_HARASSMENTHARM_CATEGORY_SEXUALLY_EXPLICIT
Threshold options:
HARM_BLOCK_THRESHOLD_UNSPECIFIEDBLOCK_LOW_AND_ABOVEBLOCK_MEDIUM_AND_ABOVEBLOCK_ONLY_HIGHBLOCK_NONE
Structured Outputs
Toggle structured output for JSON responses.
Possible values:
true- Enable structured outputs (default)false- Disable structured outputs
This is useful when working with JSON Schema that contains elements not supported by the OpenAPI schema version that Google Gemini uses.
Cached Content
Reference previously cached content to provide context for new responses.
Combining Multiple Options
You can combine multiple provider options in a single configuration:
Model Compatibility
Check the Gemini documentation for the most up-to-date compatibility information. AI SDK