mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-31 19:05:00 +07:00
opencode: Model updates (#57556)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Has been skipped
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Has been skipped
Closes https://github.com/zed-industries/zed/issues/57331 Model updates: - **Free**: removed MiniMax M2.5 Free as per10ddc78ce0- **Zen**: added Gemini 3.5 Flash as perf5f7d1a167/providers/opencode/models/gemini-3.5-flash.toml- **Zen**: added Grok Build 0.1 as perf5f7d1a167/providers/opencode/models/grok-build-0.1.tomlThe 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:
parent
450206e49d
commit
b0911ccc9e
1 changed files with 20 additions and 16 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue