Google is natively supported in fast-agent using the Google GenAI libraries.
Google models have support for attaching YouTube URLs for video and transcript understanding.
Gemini models that support Grounding with Google Search can also use provider-side web search via
the standard web_search model-string option.
YAML Configuration:
Environment Variables:
GOOGLE_API_KEY: Your Google API key
The generic gemini alias selects Gemini 3.8 Flash (gemini38, gemini38flash, or
gemini3.8flash). Explicit older aliases, including gemini37flash, gemini35flash, and
gemini3flash, retain their original models.
Gemini 3.8 Flash capabilities were verified against the official Gemini model page, Vertex model page, migration guide, and pricing on September 5, 2026.
Gemini 4 (native API)
| Native model | Short alias | Thinking levels | Default thinking |
|---|---|---|---|
google.gemini-4-argon |
argon |
low, medium, high | medium |
google.gemini-4-hydrogen |
hydrogen |
low, medium, high, xhigh | high |
google.gemini-4-carbon |
carbon |
low, medium, high | medium |
fast-agent --argon, fast-agent --hydrogen, and fast-agent --carbon select the native
Google models above. They also work with explicit go. Use --model instead when setting
reasoning or selecting the Copilot route.
fast-agent go --model 'argon?reasoning=low'
fast-agent go --model 'google.gemini-4-hydrogen?reasoning=xhigh'
fast-agent go --model 'carbon?web_search=on'
All three accept text, images, audio, video and PDFs, return text, and support function calling, JSON Schema output, Google Search grounding and Flex. They share a 1,048,576-token window for input and output combined. fast-agent uses a 65,536-token output limit by default; a single non-streaming hop on Argon or Carbon is limited to 32,768. The separate long decode capability does not make 1M the default output budget. Use a named thinking level rather than sampling controls or a numeric thinking budget.
The native provider uses generateContent / streamGenerateContent, not a chat-completions
proxy or a server-stored Interactions session. fast-agent keeps the Gemini Developer API on
v1beta for compatibility with preview models and beta features. To opt into a different
version, set GOOGLE_GENAI_API_VERSION (subject to model availability on that version).
Copilot routes have separate credentials and capabilities.
Tracing: The current OpenTelemetry Google instrumentor requires google-genai <3;
it skips SDK-level Google spans with SDK 3.4. fast-agent's agent and MCP spans do not
depend on that instrumentor.
Reasoning, search, and multimodal input
Google models support model-dependent thinking controls, structured outputs, multimodal inputs, and Grounding with Google Search.
fast-agent --model gemini
fast-agent --model "gemini38flash?reasoning=medium"
fast-agent --model "gemini3?reasoning=auto"
fast-agent --model "google.gemini-3.1-pro-preview?reasoning=high"
fast-agent --model "gemini3?web_search=on"
fast-agent --model "google.gemini-3.8-flash?web_search=on"
fast-agent --model "gemini38flash?service_tier=flex"
Useful query parameters:
reasoning=auto|minimal|low|medium|high|xhigh|offwhere the selected Gemini model advertises thinking controlsweb_search=on|offfor Grounding with Google Search on supported Gemini modelsstructured=jsonfor JSON schema structured outputs- sampling controls such as
temperature,top_p, andtop_kwhere applicable
Gemini 3.8 Flash is a GA coding and agent model with a 1M-token context window, 64K maximum
output, and low, medium, or high thinking levels (medium by default). It does not accept
sampling parameters, numeric thinking budgets, or candidate_count; fast-agent omits those fields
from native requests. Introductory pricing through December 31, 2026 is $0.75 per million input
tokens and $3.75 per million output tokens.
Flex inference
Gemini 3.8 Flash supports Google's synchronous, best-effort Flex tier:
Or configure Flex as the Google default:
In the interactive prompt, press Shift+Tab to cycle between Standard and Flex. The existing
/fast flex command is a shortcut for /model fast flex; /fast off returns to Standard.
The command name predates Gemini support, so Flex remains available even though it is intentionally
slower than the default tier.
Flex targets latency-tolerant work and may take 1–15 minutes. Fast-agent uses a 900-second
stream/request timeout by default while Flex is selected; an explicit streaming_timeout query
still takes precedence. Capacity errors such as HTTP 503 remain retryable.
Developer API requests use Google's native serviceTier: flex field. Vertex Flex requires the
global location and uses the documented Vertex shared/Flex routing headers with API version v1.
| Period | Input | Output including thinking | Cached input | Cache storage |
|---|---|---|---|---|
| Through Dec 31, 2026 | $0.375/M | $1.875/M | $0.0375/M | $0.50/M tokens/hour |
| From Jan 1, 2027 | $0.75/M | $3.75/M | $0.075/M | $1.00/M tokens/hour |
When web_search=on, fast-agent sends Google's native GoogleSearch tool and formats grounding
metadata as citations in the text response when Google returns citation spans. Search can be toggled
from the /model web_search command or the interactive model controls on models that advertise
support.
Current fast-agent metadata marks Google Search as supported on Gemini 2.0 Flash, Gemini 2.5, and Gemini 3.x aliases, including Gemini 3.8 Flash. Check Models Reference for the generated capability view.
Model Name Aliases:
| Model Alias | Maps to | Model Alias | Maps to |
|---|---|---|---|
argon |
gemini-4-argon |
gemini3 |
gemini-3-pro-preview |
carbon |
gemini-4-carbon |
gemini3.1 |
gemini-3.1-pro-preview |
gemini |
gemini-3.8-flash |
gemini3.1flashlite |
gemini-3.1-flash-lite-preview |
gemini-2.0-flash |
gemini-2.0-flash |
gemini3.5flash |
gemini-3.5-flash |
gemini-2.5-flash |
gemini-2.5-flash |
gemini3.7flash |
gemini-3.7-flash |
gemini-2.5-pro |
gemini-2.5-pro |
gemini3.8flash |
gemini-3.8-flash |
gemini-3-flash-preview |
gemini-3-flash-preview |
gemini31pro |
gemini-3.1-pro-preview |
gemini-3-pro-preview |
gemini-3-pro-preview |
gemini35 |
gemini-3.5-flash |
gemini-3.1-flash-lite-preview |
gemini-3.1-flash-lite-preview |
gemini35flash |
gemini-3.5-flash |
gemini-3.1-pro-preview |
gemini-3.1-pro-preview |
gemini37 |
gemini-3.7-flash |
gemini-3.5-flash |
gemini-3.5-flash |
gemini37flash |
gemini-3.7-flash |
gemini-3.7-flash |
gemini-3.7-flash |
gemini38 |
gemini-3.8-flash |
gemini-3.8-flash |
gemini-3.8-flash |
gemini38flash |
gemini-3.8-flash |
gemini-4-argon |
gemini-4-argon |
gemini3flash |
gemini-3-flash-preview |
gemini-4-carbon |
gemini-4-carbon |
gemini4argon |
gemini-4-argon |
gemini-4-hydrogen |
gemini-4-hydrogen |
gemini4carbon |
gemini-4-carbon |
gemini2 |
gemini-2.0-flash |
gemini4hydrogen |
gemini-4-hydrogen |
gemini25 |
gemini-2.5-flash |
hydrogen |
gemini-4-hydrogen |
gemini25pro |
gemini-2.5-pro |
OpenAI Mode
You can also access Google via the OpenAI-compatible provider. Use googleoai in the YAML file, or GOOGLEOAI_API_KEY for API key access; that path uses the Google OpenAI-compatible endpoint by default.