feat(providers): add Gemini 3.8 Flash

Merged
WA
2mo ago
+21-2

Summary

  • Add gemini-3.8-flash to the Google provider catalog and make it the recommended Google model (moved off gemini-3.6-flash)
  • Regenerated the agent-block streamed-thinking docs table

Every field was verified against Google's docs and the live Gemini API using a staging key:

FieldValueSource
idgemini-3.8-flashlive GET /v1beta/models + API docs
contextWindow1,048,576live API inputTokenLimit + OpenRouter
maxOutputTokens65,536live API outputTokenLimit + OpenRouter
input$0.75/Mpricing + OpenRouter
cachedInput$0.075/Mpricing + OpenRouter cache-read
output$3.75/Mpricing + OpenRouter
temperature0–2live API rejects 2.1 with "must be in the range [0.0, 2.0]"
thinking.levelslow/medium/highlive API: minimal is rejected for this model
releaseDate2026-09-02launch post

Two things worth a reviewer's attention:

  • minimal is not a valid thinking level here. Every sibling Gemini 3.x Flash entry declares ['minimal','low','medium','high'], but 3.8 Flash returns Thinking level MINIMAL is not supported for this model. Copying the sibling shape would have put a dead option in the agent-block dropdown, so this entry declares only ['low','medium','high'].
  • Introductory pricing expires. $0.75/$3.75 is Google's introductory rate through 2026-12-31; it doubles to $1.50/$7.50 on 2027-01-01. Google models are hosted and billed to the workspace, so this entry needs a pricing update before then or we under-bill.

Not included:

  • Gemini 3.8 Flash Cyber is not on the public Gemini API — Google gates it to trusted defenders via the Fairwind Program. gemini-3.8-flash-cyber, -preview, and -latest all return "Model is not found for api version v1beta". Adding an entry would put a permanently-failing option in the model dropdown, so it is left out until we have access.
  • The sim-auto router pool still pins gemini-3.6-flash for tier-1 image/file tasks. That is a curated routing choice with its own cost/quality tradeoff, so I left it alone rather than swapping it in this PR.

Type of Change

  • New feature

Testing

Executed gemini-3.8-flash end-to-end through Sim's own Google provider with a live key:

  • plain completion at temperature: 2.0 → correct output
  • thinkingLevel low/medium/high all accepted, with thinking budget scaling as expected (37 → 106 → 180 output tokens)
  • tool calling → model emitted the expected get_weather call through the provider tool loop
  • structured output → returned schema-conforming JSON
  • cost calculation resolved against the new pricing entry

Also ran: bun run lint, bun run type-check (clean), bun run check:audits (45/45 pass), bun run agent-stream-docs:check (up to date), and the provider/model-router test suites (256 tests pass).

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

🤖 Generated with Claude Code

https://claude.ai/code/session_01LKqTj3FNr4iS5jMy1gZe2D