mirror of
https://github.com/coder/coder.git
synced 2026-10-16 14:48:56 +08:00
Add Gemini 4 Argon to the Agents known models catalog, so it appears as a suggestion when an admin adds a chat model, and regenerate the AI Gateway price book from models.dev. | Provider | Model ID | Placed before | |---|---|---| | google | `gemini-4-argon` | `gemini-3.1-pro-preview` | | openrouter, vercel | `google/gemini-4-argon` | `google/gemini-3.8-flash` | **Pricing.** The price book carries Google's launch rates on google, openrouter, vercel, and copilot: $2 per 1M input tokens, $10 per 1M output tokens, and $0.10 per 1M cached input tokens. Google doubles them on 2026-12-01 ($4, $20, $0.20); the weekly refresh picks that up once models.dev changes. The google entry keeps models.dev's 32,768 max output tokens, the cap Google enforces on non-streaming `generateContent` calls (larger values return HTTP 400 there). **Thinking levels.** `googleSupportedThinkingLevels` did not recognize the `argon` name token and failed closed, so chatd sent Argon no `thinking_level` and no `include_thoughts`: the native Google path dropped the reasoning effort, and neither path showed thought summaries. Argon accepts LOW, MEDIUM, and HIGH like Gemini 3.1 Pro and rejects MINIMAL, so the map now treats it like the Pro family. **Upstream drift.** `prices.json` covers every model of its 8 providers, so the regeneration also brings the changes since the last weekly refresh, all on OpenRouter and Vercel: 14 other new entries, 26 entries models.dev delisted, and 51 price changes. The catalog picks up the same changes for 8 curated OpenRouter entries (DeepSeek, Kimi, Qwen, and GLM). ## Testing - Live requests to `gemini-4-argon` through the AI Gateway's Google provider (Google's OpenAI-compatible endpoint): `reasoning_effort` and `thinking_level` values `low`, `medium`, and `high` return 200 and `minimal` returns 400; `include_thoughts` returns thought text in streaming and non-streaming responses. - Red-green: removing the `argon` token fails `TestGoogleSupportedThinkingLevels/gemini-4-argon` (expected LOW, MEDIUM, HIGH; got nil). - Regenerating from the saved models.dev snapshot reproduces both generated files byte for byte. - `go test ./scripts/aibridgepricesgen/... ./coderd/aibridge/prices/... ./coderd/x/chatd/chatprovider/...` and `pnpm exec vitest run --project=unit src/modules/aiModels/` pass. The pre-commit hook passed; local pre-push checks were skipped, so CI is the first full run. ## Review record - Frontend review: the only `site/` change is the generated `knownModelsGenerated.json`, so the FE1 to FE10 checklist does not apply; no hand-written frontend code changed. > Xum opened this PR on behalf of @ibetitsmike.