
AI GoogleGemini
CertifiedUse Google Gemini models
AI GoogleGemini
Use Google Gemini models
Supports Gemini chat, embeddings, and images. Tools do not support JSON Schema anyOf, and tools cannot be combined with responseFormat; configure either but not both.
Thinking models (e.g. gemini-3.5-flash) attach a thought_signature to every function-call part. This provider automatically captures those signatures (returnThinking defaults to true) and re-attaches them to the conversation history for every follow-up request (sendThinking is always enabled), preventing the 400 INVALID_ARGUMENT – Function call is missing a thought_signature error.
In addition, thinking is disabled by default (thinkingBudget = 0) to reduce token usage, unless thinkingEnabled: true or thinkingBudgetTokens > 0 is explicitly set.
type: io.kestra.plugin.ai.provider.GoogleGeminiExamples
Chat completion with Google Gemini
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.GoogleGemini
apiKey: "{{ secret('GOOGLE_API_KEY') }}"
modelName: gemini-2.5-flash
configuration:
thinkingEnabled: true
thinkingBudgetTokens: 1024
returnThinking: true
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
Chat completion with Google Gemini with a local base URL + PEM certificates
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.GoogleGemini
modelName: gemini-2.5-flash
clientPem: "{{ secret('CLIENT_PEM') }}"
caPem: "{{ secret('CA_PEM') }}"
baseUrl: "https://internal.gemini.company.com/endpoint"
configuration:
thinkingEnabled: true
thinkingBudgetTokens: 1024
returnThinking: true
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
Properties
modelName *Requiredstring
Model name
apiKey string
API Key
Required unless certificate-based authentication is configured with clientPem (optionally with caPem).
baseUrl string
Base URL
Custom base URL to override the default endpoint (useful for local tests, WireMock, or enterprise gateways).
caPem string
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
clientPem string
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
embeddingModelConfiguration Non-dynamic
The configuration for embeddingModel
io.kestra.plugin.ai.provider.GoogleGemini-EmbeddingModelConfiguration
Maximum number of retries for failed requests
Used to specify output embedding size
If set, output embeddings will be truncated to the size specified.
RETRIEVAL_QUERYRETRIEVAL_DOCUMENTSEMANTIC_SIMILARITYCLASSIFICATIONCLUSTERINGQUESTION_ANSWERINGFACT_VERIFICATIONUsed to convey intended downstream application to help the model produce better embeddings.
Timeout in seconds for each request
The headline or name of the document (passed to the model as metadata).
If set, this help improving retrieval quality by providing context for a document.