opencode: Model updates (#57556)

Closes https://github.com/zed-industries/zed/issues/57331

Model updates:
- **Free**: removed MiniMax M2.5 Free as per
https://github.com/anomalyco/models.dev/commit/10ddc78ce084dedb0fd62e96001b38303d382413
- **Zen**: added Gemini 3.5 Flash as per
https://github.com/anomalyco/models.dev/blob/f5f7d1a1677f549217b91575b7f28f969a15c3e2/providers/opencode/models/gemini-3.5-flash.toml
- **Zen**: added Grok Build 0.1 as per
https://github.com/anomalyco/models.dev/blob/f5f7d1a1677f549217b91575b7f28f969a15c3e2/providers/opencode/models/grok-build-0.1.toml

The newly-added Zen models **were not tested** as I don't have a Zen
subscription and I stubbornly refuse to get one.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- OpenCode: updated models (added Gemini 3.5 Flash and Grok Build 0.1,
removed MiniMax M2.5 Free)
This commit is contained in:
Vlad Ionescu authored and GitHub committed 2026-05-23 09:39:08 +00:00
1 parent b56cf1a352
commit 006ad3dfcf
1 file changed
+20 -16
+20 -16
View File
@@ -115,6 +115,8 @@ pub enum Model {
Gemini3_1Pro,
#[serde(rename = "gemini-3-flash")]
Gemini3Flash,
#[serde(rename = "gemini-3.5-flash")]
Gemini3_5Flash,
// -- OpenAI Chat Completions protocol models --
#[serde(rename = "deepseek-v4-pro")]
@@ -123,12 +125,12 @@ pub enum Model {
DeepSeekV4Flash,
#[serde(rename = "minimax-m2.5")]
MiniMaxM2_5,
#[serde(rename = "minimax-m2.5-free")]
MiniMaxM2_5Free,
#[serde(rename = "glm-5")]
Glm5,
#[serde(rename = "glm-5.1")]
Glm5_1,
#[serde(rename = "grok-build-0.1")]
GrokBuild0_1,
#[serde(rename = "kimi-k2.5")]
KimiK2_5,
#[serde(rename = "kimi-k2.6")]
@@ -180,7 +182,7 @@ impl Model {
}
pub fn default_free_fast() -> Self {
Self::MiniMaxM2_5Free
Self::Nemotron3SuperFree
}
pub fn available_subscriptions(&self) -> &'static [OpenCodeSubscription] {
@@ -202,9 +204,7 @@ impl Model {
| Self::DeepSeekV4Flash => &[OpenCodeSubscription::Go],
// Free models
Self::MiniMaxM2_5Free | Self::Nemotron3SuperFree | Self::BigPickle => {
&[OpenCodeSubscription::Free]
}
Self::Nemotron3SuperFree | Self::BigPickle => &[OpenCodeSubscription::Free],
// Custom models get their subscription from settings, not from here
Self::Custom { .. } => &[],
@@ -245,13 +245,14 @@ impl Model {
Self::Gemini3_1Pro => "gemini-3.1-pro",
Self::Gemini3Flash => "gemini-3-flash",
Self::Gemini3_5Flash => "gemini-3.5-flash",
Self::DeepSeekV4Pro => "deepseek-v4-pro",
Self::DeepSeekV4Flash => "deepseek-v4-flash",
Self::MiniMaxM2_5 => "minimax-m2.5",
Self::MiniMaxM2_5Free => "minimax-m2.5-free",
Self::Glm5 => "glm-5",
Self::Glm5_1 => "glm-5.1",
Self::GrokBuild0_1 => "grok-build-0.1",
Self::KimiK2_5 => "kimi-k2.5",
Self::KimiK2_6 => "kimi-k2.6",
Self::MiniMaxM2_7 => "minimax-m2.7",
@@ -297,13 +298,14 @@ impl Model {
Self::Gemini3_1Pro => "Gemini 3.1 Pro",
Self::Gemini3Flash => "Gemini 3 Flash",
Self::Gemini3_5Flash => "Gemini 3.5 Flash",
Self::DeepSeekV4Pro => "DeepSeek V4 Pro",
Self::DeepSeekV4Flash => "DeepSeek V4 Flash",
Self::MiniMaxM2_5 => "MiniMax M2.5",
Self::MiniMaxM2_5Free => "MiniMax M2.5 Free",
Self::Glm5 => "GLM 5",
Self::Glm5_1 => "GLM 5.1",
Self::GrokBuild0_1 => "Grok Build 0.1",
Self::KimiK2_5 => "Kimi K2.5",
Self::KimiK2_6 => "Kimi K2.6",
Self::MiniMaxM2_7 => "MiniMax M2.7",
@@ -359,11 +361,11 @@ impl Model {
| Self::Gpt5Codex
| Self::Gpt5Nano => ApiProtocol::OpenAiResponses,
Self::Gemini3_1Pro | Self::Gemini3Flash => ApiProtocol::Google,
Self::Gemini3_1Pro | Self::Gemini3Flash | Self::Gemini3_5Flash => ApiProtocol::Google,
Self::MiniMaxM2_5Free
| Self::Glm5
Self::Glm5
| Self::Glm5_1
| Self::GrokBuild0_1
| Self::KimiK2_5
| Self::KimiK2_6
| Self::MimoV2_5Pro
@@ -426,10 +428,11 @@ impl Model {
// Google models
Self::Gemini3_1Pro => 1_048_576,
Self::Gemini3Flash => 1_048_576,
Self::Gemini3_5Flash => 1_048_576,
// OpenAI-compatible models
Self::MiniMaxM2_7 => 204_800,
Self::MiniMaxM2_5 | Self::MiniMaxM2_5Free => 204_800,
Self::MiniMaxM2_5 => 204_800,
Self::Glm5 | Self::Glm5_1 => {
if subscription == OpenCodeSubscription::Go {
202_752
@@ -438,6 +441,7 @@ impl Model {
}
}
Self::KimiK2_6 | Self::KimiK2_5 => 262_144,
Self::GrokBuild0_1 => 256_000,
Self::MimoV2_5Pro => 1_048_576,
Self::MimoV2_5 => 1_000_000,
Self::Qwen3_5Plus | Self::Qwen3_6Plus => 262_144,
@@ -480,11 +484,10 @@ impl Model {
| Self::Gpt5Nano => Some(128_000),
// Google models
Self::Gemini3_1Pro | Self::Gemini3Flash => Some(65_536),
Self::Gemini3_1Pro | Self::Gemini3Flash | Self::Gemini3_5Flash => Some(65_536),
// OpenAI-compatible models
Self::MiniMaxM2_7 => Some(131_072),
Self::MiniMaxM2_5Free => Some(131_072),
Self::MiniMaxM2_5 => {
if subscription == OpenCodeSubscription::Go {
Some(65_536)
@@ -501,6 +504,7 @@ impl Model {
}
Self::BigPickle => Some(128_000),
Self::KimiK2_6 | Self::KimiK2_5 => Some(65_536),
Self::GrokBuild0_1 => Some(256_000),
Self::Qwen3_5Plus | Self::Qwen3_6Plus => Some(65_536),
Self::DeepSeekV4Pro | Self::DeepSeekV4Flash => Some(384_000),
Self::Nemotron3SuperFree => Some(128_000),
@@ -550,18 +554,18 @@ impl Model {
Self::Gpt5_3Spark => false,
// Google models support images
Self::Gemini3_1Pro | Self::Gemini3Flash => true,
Self::Gemini3_1Pro | Self::Gemini3Flash | Self::Gemini3_5Flash => true,
// OpenAI-compatible models with image support
Self::KimiK2_6
| Self::KimiK2_5
| Self::GrokBuild0_1
| Self::MimoV2_5
| Self::Qwen3_5Plus
| Self::Qwen3_6Plus => true,
// OpenAI-compatible models without image support
Self::MiniMaxM2_5
| Self::MiniMaxM2_5Free
| Self::Glm5
| Self::Glm5_1
| Self::MiniMaxM2_7