Gemini
Introduction
In this guide we'll walk through the process of linking Cerb to Google Gemini.
Gemini API
Create an API key
Log in to Google AI Studio with your Google account.
Click the blue Create API key button in the top right.
Create the key in a new or existing project.
Copy the API key to your clipboard for use in Cerb.
Configure Cerb
Create the connected service
(Added in 11.1.3)
-
Navigate to Search » Connected Services.
-
Click the (+) icon in the top right of the list.
-
In the Library tab, select the Gemini row – "Integration with Gemini".
-
Paste the key you copied earlier in the API Key field.
-
The Alias is pre-filled with
gemini. It becomes the account's URI, so it takes onlya-z,0-9and_– keep it unless you have more than one Gemini account. -
Click the Create button.
Create an agent model
An agent model record holds one model's configuration – its provider, endpoint and credentials – so automations reference it by name instead of repeating a provider block.
The fields below are in the order the form presents them. API endpoint URL comes before Model because it feeds both Refresh and Test.
-
Navigate to Search » Agent Models.
-
Click the (+) icon in the top right of the list.
-
Set Provider to Google Gemini.
-
Leave API endpoint URL blank. Its placeholder reads
(auto), and blank useshttps://generativelanguage.googleapis.com/v1beta/openai. Set it only for a proxy or a self-hosted endpoint. -
Set Authentication to the connected account you created above. The field isn't marked required, because a local provider needs none – but a hosted one will fail to authenticate without it.
-
Click the refresh button beside Model to load the provider's live model list, and pick one.
-
Give the record a short Name – this is what automations will use. Colons aren't allowed, since the name is referenced as
cerb:agent_model:<name>. -
Click Test to verify the connection, then Create.
Refresh is on demand, and it never happens quietly. Until a refresh succeeds, the suggestions under Model are a hardcoded list rather than your account's – there's deliberately no silent fallback, so a failed fetch looks like one instead of looking like nothing happened. Refreshing requires an administrator; a non-admin gets a permission error rather than an empty list. The field is free text throughout, so a model id works the day it ships even if the list hasn't caught up.
Give the refresh a moment to land before you open the Model menu. Opening it too early shows the shipped suggestions rather than your account's models, and the menu keeps showing them until you close and reopen it. Those are real model ids, so there's nothing on screen to tell you apart from a list that loaded – which is the other reason to check the context window on whatever you picked.
Picking a model from a refreshed list fills exactly three things: the Name, Vision and Context window – and the last two only for ids beginning gemini-, which is what Cerb's table is gated on. Nothing else on the form changes – Thinking and the four Ratings are yours to set, and Cerb emits no per-model description for this provider, so the hint line under Model stays empty. Both values come from a table built into Cerb rather than from Google. The Name is rewritten to a sanitized version of the model id every time, including on a record you already named, so give the record its name after you pick, not before.
Check both, because on this provider neither varies by model at all. Every id beginning gemini- is given Vision: Yes and a 1,000,000 context window, whichever Gemini model it actually is. There's no per-model map behind either value and no fallback that would distinguish a model Cerb knows from one it doesn't – a smaller-context model such as a Flash-Lite receives the same 1M figure, and nothing catches it.
Set the window from Google's own documentation; compaction ratios are fractions of it. A wrong Vision hands workers an image attachment the model rejects.
Only a refreshed list carries that metadata. Before you click refresh, the suggestions under Model are a shipped list of hints, and picking one of those fills in the Name and nothing else – no context window, no capabilities. These values arrive with the model list, not with the model id.
Use the model in automations
Reference the model by the name you gave the record.
-
start: llm.chat/summarize: output: results inputs: model: gemini-flash messages: 0: role: user content: Summarize this conversation in one sentence. return: summary@key: results:content -
commands: llm.chat: allow@bool: yes
The same record works with llm.agent: for tool-using conversations, and with llm.router: to pick between several models as data. An automation that doesn't name a model resolves a pool instead – a search across agent models rather than a named record. Omit a search entirely and you get every available model, in the priority order an admin set.
Resources
- Reference: Agent models