Choosing a Model (Gemini)
Testronaut supports Google Gemini 2.5 models for agentic (tool-using) workflows.
You can select a Gemini model during testronaut --init, store it in testronaut-config.json, or override it per run via CLI or environment variables.
Heads-up: Gemini model access and rate limits depend on your Google Cloud or MakerSuite account.
If you select a model your account doesn’t have access to, the API will respond with a404orPERMISSION_DENIEDerror.
Supported Gemini model families
All of the following are compatible with Testronaut’s tool calling & DOM agent features:
- Gemini 2.5 Pro — High-quality, balanced model for reasoning and code
- Gemini 2.5 Flash — Fast, low-latency model optimized for throughput
- Gemini 2.5 Flash-8B — Lightweight Flash variant for cost efficiency
These identifiers map directly to Google’s Generative Language API model IDs (e.g.,
gemini-2.5-pro).
Testronaut forwards your chosen ID directly to the API.
How Testronaut decides which model to use
-
CLI override (highest precedence)
testronaut --model gemini-2.5-pro -
Environment override
export TESTRONAUT_MODEL=gemini-2.5-flash -
Project config
Stored in yourtestronaut-config.jsonafter initialization. -
Fallback
Defaults togemini-2.5-flashif none are specified.
The active provider/model appear in:
- CLI JSON and HTML reports (
results.llm.provider&results.llm.model) - The Mission Control companion app (header and table pills)
Example configuration
{
"initialized": true,
"provider": "gemini",
"model": "gemini-2.5-flash",
"outputDir": "missions/mission_reports",
"projectName": "your-project",
"maxTurns": 20
}
Override per run:
testronaut checkoutFlow.mission.js --model gemini-2.5-pro
Or for CI/CD or temporary overrides:
TESTRONAUT_MODEL=gemini-2.5-flash-8b testronaut
Cost / performance guide (quick picks)
| Model | Strengths | Typical Use | Trade-offs |
|---|---|---|---|
| Gemini 2.5 Pro | Strong reasoning and comprehension | Complex workflows, DOM reasoning, deeper analysis | Slower, higher cost |
| Gemini 2.5 Flash | Very fast, low latency | Iterative development, large suites, smoke tests | Slightly shallower reasoning |
| Gemini 2.5 Flash-8B | Lightweight, cost-effective | Budget-conscious or parallel testing | Less capable in nuanced reasoning |
Recommendations
Fast & low cost: gemini-2.5-flash
Best general agent: gemini-2.5-pro
High concurrency (CI): gemini-2.5-flash-8b
Rate limits & backoff
Testronaut applies token-aware throttling and will automatically back off if you approach your per-minute token limits.
Unlike OpenAI, Gemini’s rate limits may not always be returned in headers — Testronaut uses conservative defaults and runtime heuristics to avoid throttling errors.
Troubleshooting
“404: model not found”
You may not have access to that Gemini model.
Check the available models under your API key or try switching to gemini-2.5-flash.
“429: rate limit exceeded”
Try using gemini-2.5-flash or gemini-2.5-flash-8b for high-volume or concurrent runs.
Model not listed?
Testronaut forwards model IDs directly, so newer releases (e.g. gemini-3.0) will work as long as they follow the same API schema.
Reports
Testronaut’s JSON and HTML reports include:
llm.provider:"gemini"llm.model: e.g."gemini-2.5-flash"
The Mission Control dashboard displays these as colored pills in the report tables.