Skip to main content
View source

Gemini

View as Markdown

A RocketRide LLM node that connects Google Gemini models to a pipeline.

What it does

Connects Google Gemini models to your pipeline. Used primarily as an llm invoke connection by agents and other nodes that need an LLM (classType: llm, capability invoke). Can also be used directly via lanes: text arriving on the questions lane is sent to the configured model and the generated text is emitted on the answers lane.

Uses the google-genai library (genai.Client) against the Gemini Developer API with API-key authentication. Prompts are sent with client.models.generate_content and the plain text response is returned. Token counts for budgeting are estimated locally at roughly 0.75 tokens per word: an approximation, not the model's native tokenizer.

When you save the node configuration, it is validated with a minimal live probe (a one-word prompt against the configured model). Provider errors (bad key, unknown model, quota, etc.) surface as a warning that includes the provider's error code, status, and full message. Image-output models that reject a text-only probe with an INVALID_ARGUMENT "response modalities" error pass validation, since that is a probe artifact rather than a configuration problem. The probe is skipped entirely when no API key is present (secure fields are not decrypted at validate time).

Lanes

Lane inLane outDescription
questionsanswersSend a question directly, receive a generated answer

Profiles

Default: Gemini 3.1 Pro (gemini-3_1-pro-preview).

ProfileModelContext tokensOutput tokens
Gemini 3.1 Pro (default)models/gemini-3.1-pro-preview1,048,57665,536
Google: Gemini 3.6 Flashmodels/gemini-3.6-flash1,048,57665,536
Google: Gemini 3.5 Flashmodels/gemini-3.5-flash1,048,57665,536
Google: Gemini 3.5 Flash Litemodels/gemini-3.5-flash-lite1,048,57665,536
View 35 more models
ProfileModelContext tokensOutput tokens
custom(user-specified)editableeditable
Gemini 3.1 Flash Image Previewmodels/gemini-3.1-flash-image-preview131,07258,982
Gemini 3.1 Flash Litemodels/gemini-3.1-flash-lite-preview1,048,57665,536
Gemini 3 Flash Previewmodels/gemini-3-flash-preview1,048,57665,536
Gemini 3 Pro Image Previewmodels/gemini-3-pro-image-preview65,53632,768
Gemini 2.5 Promodels/gemini-2.5-pro1,048,57665,536
Gemini 2.5 Flashmodels/gemini-2.5-flash1,048,57665,535
Gemini 2.5 Flash Litemodels/gemini-2.5-flash-lite1,048,57665,535
Gemini 2.5 Flash Imagemodels/gemini-2.5-flash-image32,7688,192
Gemini 3 Pro Previewmodels/gemini-3-pro-preview1,048,57665,536
Gemini 3 Pro Imagemodels/gemini-3-pro-image131,07232,768
Gemini 2.0 Flashmodels/gemini-2.0-flash1,048,57665,535
Gemini 2.0 Flash Litemodels/gemini-2.0-flash-lite65,536
Google: Gemini 2.5 Flash Lite Preview 09-2025models/gemini-2.5-flash-lite-preview-09-20251,048,57665,535
Google: Gemini 2.5 Pro Preview 06-05models/gemini-2.5-pro-preview1,048,57665,536
Google: Gemini 2.5 Pro Preview 05-06models/gemini-2.5-pro-preview-05-061,048,57665,535
Google: Gemini 3.1 Pro Preview Custom Toolsmodels/gemini-3.1-pro-preview-customtools1,048,57665,536
Google Gemini Flash Latestmodels/gemini-flash-latest1,048,57665,536
Google Gemini Pro Latestmodels/gemini-pro-latest1,048,57665,536
Google: Nano Banana 2 (Gemini 3.1 Flash Image)models/gemini-3.1-flash-image131,07232,768
Google: Gemini 3.1 Flash Litemodels/gemini-3.1-flash-lite1,048,57665,536
Google: Nano Banana 2 Lite (Gemini 3.1 Flash Lite Image)models/gemini-3.1-flash-lite-image65,53658,982
models-gemini-2-5-flash-batchmodels/gemini-2.5-flash:batch1,048,57665,535
models-gemini-2-5-flash-lite-batchmodels/gemini-2.5-flash-lite:batch1,048,57665,535
models-gemini-2-5-pro-batchmodels/gemini-2.5-pro:batch1,048,57665,536
models-gemini-3-1-flash-lite-batchmodels/gemini-3.1-flash-lite:batch1,048,57665,536
models-gemini-3-1-pro-preview-batchmodels/gemini-3.1-pro-preview:batch1,048,57665,536
models-gemini-3-5-flash-batchmodels/gemini-3.5-flash:batch1,048,57665,536
models-gemini-3-5-flash-lite-batchmodels/gemini-3.5-flash-lite:batch1,048,57665,536
models-gemini-3-6-flash-batchmodels/gemini-3.6-flash:batch1,048,57665,536
models-gemini-3-7-flashmodels/gemini-3.7-flash1,048,57665,536
models-gemini-3-7-flash-batchmodels/gemini-3.7-flash:batch1,048,57665,536
models-gemini-3-8-flashmodels/gemini-3.8-flash1,048,57665,536
models-gemini-3-8-flash-batchmodels/gemini-3.8-flash:batch1,048,57665,536
models-gemini-3-flash-preview-batchmodels/gemini-3-flash-preview:batch1,048,57665,536

Profiles whose titles contain Image support image generation output.

Configuration

Choose a model profile and supply an API key. Named profiles pin the model, context window, and output limit, so most pipelines need no other settings.

Custom model

Select custom to enter a Gemini model identifier such as models/gemini-2.5-pro, its combined input and output token limit, and its output token limit. The custom defaults are 1,114,112 total tokens and 65,536 output tokens; set both to the actual limits of the model you select.

Authentication

Provide a Google AI Developer API key in the apikey field of the chosen profile (create one in Google AI Studio). The key is stored as a secure field. Key format validation is delegated to the google-genai library; a missing key fails at pipeline start with Please enter your Gemini API key.

Gotcha: the engine derives a profile sub-key from the segment after the first underscore of the profile name (e.g. gemini-2_5-pro is stored under 5-pro). The node transparently falls back to that sub-key when reading the API key, so keys saved under either layout work.

Vertex AI is not used by this node; it targets the Gemini Developer API only. (The google-genai client also supports Vertex AI via genai.Client(vertexai=True, ...); a future refactor could unify the separate Vertex node with this one.)

Notes

Deprecated profiles

The following profiles remain selectable for existing pipelines but are deprecated:

  • Gemini 3 Pro Preview; use gemini-3_1-pro-preview.
  • Gemini 3 Pro Image; use gemini-3-pro-image-preview.
  • Gemini 2.0 Flash; use gemini-2_5-flash.
  • Gemini 2.0 Flash Lite; use gemini-2_5-flash-lite.

Running the tests

The node ships a test block in services.json that runs against a local test server with a mocked google.genai, so no real API key is required. Set ROCKETRIDE_MOCK to nodes/test/mocks; the test sends "What is 2+2?" on questions (profile gemini-2_5-flash) and expects answers to contain "Mock LLM response".

Schema

FieldTypeDescriptionDefault
gemini.apikeystringAPI Key
Google AI Developer API key
gemini.modelstringModel
Gemini model
gemini.modelTotalTokensnumberTotal Tokens
Maximum number of input + output tokens
gemini.outputTokensnumberOutput Tokens
Maximum number of output tokens
gemini.profilestringModel
Gemini LLM model
"gemini-3_1-pro-preview"

Dependencies

  • google-genai
  • google-api-core
  • google-auth
  • googleapis-common-protos
  • proto-plus
  • protobuf