Skip to main content

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 a 404 or PERMISSION_DENIED error.


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โ€‹

  1. CLI override (highest precedence)

    npx testronaut --model gemini-2.5-pro
  2. Environment override

    export TESTRONAUT_MODEL=gemini-2.5-flash
  3. Project config
    Stored in your testronaut-config.json after initialization.

  4. Fallback
    Defaults to gemini-2.5-flash if 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โ€‹

testronaut-config.json
{
"initialized": true,
"provider": "gemini",
"model": "gemini-2.5-flash",
"outputDir": "missions/mission_reports",
"projectName": "your-project",
"maxTurns": 20
}

Override per run:

npx testronaut checkoutFlow.mission.js --model gemini-2.5-pro

Or for CI/CD or temporary overrides:

TESTRONAUT_MODEL=gemini-2.5-flash-8b npx testronaut

Cost / performance guide (quick picks)

ModelStrengthsTypical UseTrade-offs
Gemini 2.5 ProStrong reasoning and comprehensionComplex workflows, DOM reasoning, deeper analysisSlower, higher cost
Gemini 2.5 FlashVery fast, low latencyIterative development, large suites, smoke testsSlightly shallower reasoning
Gemini 2.5 Flash-8BLightweight, cost-effectiveBudget-conscious or parallel testingLess 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.