feat(providers): add Gemini 3.8 Flash
Merged
WA
2mo ago+21+21+01234567890123456789-2-2-0123456789
Summary
- Add
gemini-3.8-flashto the Google provider catalog and make it the recommended Google model (moved offgemini-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:
| Field | Value | Source |
|---|---|---|
id | gemini-3.8-flash | live GET /v1beta/models + API docs |
contextWindow | 1,048,576 | live API inputTokenLimit + OpenRouter |
maxOutputTokens | 65,536 | live API outputTokenLimit + OpenRouter |
input | $0.75/M | pricing + OpenRouter |
cachedInput | $0.075/M | pricing + OpenRouter cache-read |
output | $3.75/M | pricing + OpenRouter |
temperature | 0–2 | live API rejects 2.1 with "must be in the range [0.0, 2.0]" |
thinking.levels | low/medium/high | live API: minimal is rejected for this model |
releaseDate | 2026-09-02 | launch post |
Two things worth a reviewer's attention:
minimalis not a valid thinking level here. Every sibling Gemini 3.x Flash entry declares['minimal','low','medium','high'], but 3.8 Flash returnsThinking 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-latestall 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-flashfor 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 thinkingLevellow/medium/high all accepted, with thinking budget scaling as expected (37 → 106 → 180 output tokens)- tool calling → model emitted the expected
get_weathercall 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