mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-26 18:40:25 +01:00
4e161e70b5
## Summary Barely 24 hours after merging #67011 (`gemini-4-hydrogen`), Google is already working its way across the periodic table with [Gemini 4 Neon (`gemini-4-neon`)](https://aistudio.google.com/docs/models/gemini-4-neon) — thankfully skipping Helium through Fluorine for now. Following #65572 and #67011, Zed loads BYOK Gemini models dynamically from Google's `v1beta/models` catalog while maintaining model-specific thinking level overrides in `google_ai` (as the catalog endpoint only reports a boolean `thinking` flag). Like Hydrogen, `gemini-4-neon` supports four thinking levels (`low`, `medium`, `high`, and `xhigh`) and defaults to `high` rather than `medium` (while rejecting `minimal`). Without explicit overrides in `google_ai`, `Extra High` is omitted from Zed's thinking effort selector for Neon and its default effort falls back to `Medium`. This PR: - Adds `"gemini-4-neon"` to `highest_thinking_level` (`ThinkingLevel::XHigh`), exposing `[Low, Medium, High, XHigh]` via `Model::from_listed`. - Adds `"gemini-4-neon"` to `default_thinking_level` (`ThinkingLevel::High`). - Extends `test_from_listed_thinking_levels_per_model` to cover `"gemini-4-neon"`. ## Testing - `cargo test -p google_ai` (31 passed) - `./script/clippy -p google_ai` - `cargo fmt -p google_ai -- --check` Reviewers with a paid-tier Gemini API key can select `Gemini 4 Neon` in the Agent Panel and verify that thinking effort defaults to `High`, lists `Low`, `Medium`, `High`, and `Extra High`, and strips `Extra High` gracefully when switching a thread to `Gemini 4 Argon` or `Gemini 4 Carbon`. ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [x] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [x] Tests cover the new or changed behavior. Release Notes: - Added Extra High thinking effort support and High default thinking level for Gemini 4 Neon (`gemini-4-neon`).