Interface: GoogleLLMParams
@providerprotocol/ai / google / GoogleLLMParams
Interface: GoogleLLMParams
Section titled “Interface: GoogleLLMParams”Defined in: src/providers/google/types.ts:26
Provider-specific parameters for Google Gemini API requests.
These parameters are passed through to the Google generationConfig field
and control model behavior such as output length, randomness, and sampling
strategies. All fields are optional and will use Google’s defaults if omitted.
Example
Section titled “Example”const params: GoogleLLMParams = { maxOutputTokens: 2048, temperature: 0.7, topP: 0.9, stopSequences: ['\n\n'],};
const response = await model.complete({ messages: [...], config: { apiKey: '...' }, params,});Properties
Section titled “Properties”audioTimestamp?
Section titled “audioTimestamp?”
optionalaudioTimestamp:boolean
Defined in: src/providers/google/types.ts:95
Whether to include audio timestamps in response
cachedContent?
Section titled “cachedContent?”
optionalcachedContent:string
Defined in: src/providers/google/types.ts:107
Cached content name to use for this request. Format: “cachedContents/{id}” as returned from cache creation. When set, the cached content is prepended to the request.
candidateCount?
Section titled “candidateCount?”
optionalcandidateCount:number
Defined in: src/providers/google/types.ts:43
Number of candidates to generate
frequencyPenalty?
Section titled “frequencyPenalty?”
optionalfrequencyPenalty:number
Defined in: src/providers/google/types.ts:74
Frequency penalty for repeated tokens Positive values discourage repetition
imageConfig?
Section titled “imageConfig?”
optionalimageConfig:GoogleImageConfig
Defined in: src/providers/google/types.ts:62
Image generation configuration for Gemini image response modalities.
logprobs?
Section titled “logprobs?”
optionallogprobs:number
Defined in: src/providers/google/types.ts:90
Number of log probabilities to return (requires responseLogprobs: true)
maxOutputTokens?
Section titled “maxOutputTokens?”
optionalmaxOutputTokens:number
Defined in: src/providers/google/types.ts:28
Maximum number of tokens to generate
presencePenalty?
Section titled “presencePenalty?”
optionalpresencePenalty:number
Defined in: src/providers/google/types.ts:68
Presence penalty for new topics Positive values encourage discussing new topics
responseLogprobs?
Section titled “responseLogprobs?”
optionalresponseLogprobs:boolean
Defined in: src/providers/google/types.ts:85
Whether to return log probabilities in response
responseMimeType?
Section titled “responseMimeType?”
optionalresponseMimeType:"application/json"|"text/plain"
Defined in: src/providers/google/types.ts:46
Response MIME type
responseModalities?
Section titled “responseModalities?”
optionalresponseModalities:GoogleResponseModality[]
Defined in: src/providers/google/types.ts:57
Modalities to generate in the response.
Use ['IMAGE'] or ['TEXT', 'IMAGE'] with Gemini image generation models
(e.g., gemini-2.5-flash-image aka Nano Banana).
responseSchema?
Section titled “responseSchema?”
optionalresponseSchema:Record<string,unknown>
Defined in: src/providers/google/types.ts:49
Response schema for structured output
optionalseed:number
Defined in: src/providers/google/types.ts:80
Seed for deterministic sampling Same seed with same parameters should produce same results
stopSequences?
Section titled “stopSequences?”
optionalstopSequences:string[]
Defined in: src/providers/google/types.ts:40
Stop sequences
temperature?
Section titled “temperature?”
optionaltemperature:number
Defined in: src/providers/google/types.ts:31
Temperature for randomness (0.0 - 2.0)
thinkingConfig?
Section titled “thinkingConfig?”
optionalthinkingConfig:GoogleThinkingConfig
Defined in: src/providers/google/types.ts:100
Thinking/reasoning configuration for Gemini 3+ models
toolConfig?
Section titled “toolConfig?”
optionaltoolConfig:GoogleToolConfig
Defined in: src/providers/google/types.ts:153
Tool configuration for retrieval (e.g., user location for Maps).
Example
Section titled “Example”const params: GoogleLLMParams = { tools: [tools.googleMaps()], toolConfig: { retrievalConfig: { latLng: { latitude: 40.758896, longitude: -73.985130 }, }, },};tools?
Section titled “tools?”
optionaltools:GoogleBuiltInTool[]
Defined in: src/providers/google/types.ts:136
Built-in tools for server-side execution.
Use the tool helper constructors from the tools namespace:
tools.googleSearch()- Google Search groundingtools.codeExecution()- Python code executiontools.urlContext()- URL fetching and analysistools.googleMaps()- Google Maps groundingtools.fileSearch()- Document RAG search
Note: File Search cannot be combined with other built-in tools.
Example
Section titled “Example”import { google, tools } from 'provider-protocol/google';
const model = llm({ model: google('gemini-2.5-flash'), params: { tools: [ tools.googleSearch(), tools.codeExecution(), ], },});
optionaltopK:number
Defined in: src/providers/google/types.ts:37
Top-k sampling
optionaltopP:number
Defined in: src/providers/google/types.ts:34
Top-p (nucleus) sampling