Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

opencode: Model updates (GPT 5.6 + Grok 4.5) (#60852)

Vlad Ionescuad5763eba47a
diff --git a/crates/opencode/src/opencode.rs b/crates/opencode/src/opencode.rs
index 79d95b9cd25..9558bc8f24b 100644
--- a/crates/opencode/src/opencode.rs
+++ b/crates/opencode/src/opencode.rs
@@ -83,6 +83,12 @@ pub enum Model {
ClaudeFable5,
// -- OpenAI Responses API models --
+ #[serde(rename = "gpt-5.6-sol")]
+ Gpt5_6Sol,
+ #[serde(rename = "gpt-5.6-terra")]
+ Gpt5_6Terra,
+ #[serde(rename = "gpt-5.6-luna")]
+ Gpt5_6Luna,
#[serde(rename = "gpt-5.5")]
Gpt5_5,
#[serde(rename = "gpt-5.5-pro")]
@@ -141,6 +147,8 @@ pub enum Model {
Glm5_2,
#[serde(rename = "grok-build-0.1")]
GrokBuild0_1,
+ #[serde(rename = "grok-4.5")]
+ Grok4_5,
#[serde(rename = "kimi-k2.5")]
KimiK2_5,
#[serde(rename = "kimi-k2.6")]
@@ -251,6 +259,9 @@ impl Model {
Self::ClaudeSonnet5 => "claude-sonnet-5",
Self::ClaudeFable5 => "claude-fable-5",
+ Self::Gpt5_6Sol => "gpt-5.6-sol",
+ Self::Gpt5_6Terra => "gpt-5.6-terra",
+ Self::Gpt5_6Luna => "gpt-5.6-luna",
Self::Gpt5_5 => "gpt-5.5",
Self::Gpt5_5Pro => "gpt-5.5-pro",
Self::Gpt5_4 => "gpt-5.4",
@@ -280,6 +291,7 @@ impl Model {
Self::Glm5_1 => "glm-5.1",
Self::Glm5_2 => "glm-5.2",
Self::GrokBuild0_1 => "grok-build-0.1",
+ Self::Grok4_5 => "grok-4.5",
Self::KimiK2_5 => "kimi-k2.5",
Self::KimiK2_6 => "kimi-k2.6",
Self::KimiK2_7Code => "kimi-k2.7-code",
@@ -312,6 +324,9 @@ impl Model {
Self::ClaudeSonnet5 => "Claude Sonnet 5",
Self::ClaudeFable5 => "Claude Fable 5",
+ Self::Gpt5_6Sol => "GPT 5.6 Sol",
+ Self::Gpt5_6Terra => "GPT 5.6 Terra",
+ Self::Gpt5_6Luna => "GPT 5.6 Luna",
Self::Gpt5_5 => "GPT 5.5",
Self::Gpt5_5Pro => "GPT 5.5 Pro",
Self::Gpt5_4 => "GPT 5.4",
@@ -341,6 +356,7 @@ impl Model {
Self::Glm5_1 => "GLM 5.1",
Self::Glm5_2 => "GLM 5.2",
Self::GrokBuild0_1 => "Grok Build 0.1",
+ Self::Grok4_5 => "Grok 4.5",
Self::KimiK2_5 => "Kimi K2.5",
Self::KimiK2_6 => "Kimi K2.6",
Self::KimiK2_7Code => "Kimi K2.7 Code",
@@ -385,7 +401,10 @@ impl Model {
| Self::ClaudeSonnet4
| Self::ClaudeHaiku4_5 => ApiProtocol::Anthropic,
- Self::Gpt5_5
+ Self::Gpt5_6Sol
+ | Self::Gpt5_6Terra
+ | Self::Gpt5_6Luna
+ | Self::Gpt5_5
| Self::Gpt5_5Pro
| Self::Gpt5_4
| Self::Gpt5_4Pro
@@ -413,6 +432,7 @@ impl Model {
| Self::Glm5_1
| Self::Glm5_2
| Self::GrokBuild0_1
+ | Self::Grok4_5
| Self::KimiK2_5
| Self::KimiK2_6
| Self::KimiK2_7Code
@@ -467,6 +487,7 @@ impl Model {
Self::ClaudeFable5 => 1_000_000,
// OpenAI models
+ Self::Gpt5_6Sol | Self::Gpt5_6Terra | Self::Gpt5_6Luna => 1_050_000,
Self::Gpt5_5 | Self::Gpt5_5Pro => 1_050_000,
Self::Gpt5_4 | Self::Gpt5_4Pro => 1_050_000,
Self::Gpt5_4Mini | Self::Gpt5_4Nano => 400_000,
@@ -503,6 +524,7 @@ impl Model {
Self::Glm5_2 => 1_000_000,
Self::KimiK2_6 | Self::KimiK2_5 | Self::KimiK2_7Code => 262_144,
Self::GrokBuild0_1 => 256_000,
+ Self::Grok4_5 => 500_000,
Self::MimoV2_5Pro => 1_048_576,
Self::MimoV2_5 => 1_000_000,
Self::Qwen3_5Plus => 262_144,
@@ -536,7 +558,10 @@ impl Model {
Self::ClaudeFable5 => Some(128_000),
// OpenAI models
- Self::Gpt5_5
+ Self::Gpt5_6Sol
+ | Self::Gpt5_6Terra
+ | Self::Gpt5_6Luna
+ | Self::Gpt5_5
| Self::Gpt5_5Pro
| Self::Gpt5_4
| Self::Gpt5_4Pro
@@ -585,6 +610,7 @@ impl Model {
Self::KimiK2_6 | Self::KimiK2_5 => Some(65_536),
Self::KimiK2_7Code => Some(262_144),
Self::GrokBuild0_1 => Some(256_000),
+ Self::Grok4_5 => Some(500_000),
Self::Qwen3_7Max | Self::Qwen3_7Plus | Self::Qwen3_6Plus | Self::Qwen3_5Plus => {
Some(65_536)
}
@@ -618,7 +644,10 @@ impl Model {
| Self::ClaudeFable5 => true,
// OpenAI models support images
- Self::Gpt5_5
+ Self::Gpt5_6Sol
+ | Self::Gpt5_6Terra
+ | Self::Gpt5_6Luna
+ | Self::Gpt5_5
| Self::Gpt5_5Pro
| Self::Gpt5_4
| Self::Gpt5_4Pro
@@ -646,6 +675,7 @@ impl Model {
| Self::KimiK2_7Code
| Self::KimiK2_5
| Self::GrokBuild0_1
+ | Self::Grok4_5
| Self::MimoV2_5
| Self::Qwen3_5Plus
| Self::Qwen3_6Plus
@@ -749,6 +779,15 @@ impl Model {
ReasoningEffort::High,
]),
+ Self::Gpt5_6Sol | Self::Gpt5_6Terra | Self::Gpt5_6Luna => Some(vec![
+ ReasoningEffort::None,
+ ReasoningEffort::Low,
+ ReasoningEffort::Medium,
+ ReasoningEffort::High,
+ ReasoningEffort::XHigh,
+ ReasoningEffort::Max,
+ ]),
+
// Google models
Self::Gemini3Flash | Self::Gemini3_5Flash => Some(vec![
ReasoningEffort::Minimal,
@@ -790,6 +829,13 @@ impl Model {
// Z AI models
Self::Glm5_2 => Some(vec![ReasoningEffort::High, ReasoningEffort::Max]),
+ // SpaceXAI models
+ Self::Grok4_5 => Some(vec![
+ ReasoningEffort::Low,
+ ReasoningEffort::Medium,
+ ReasoningEffort::High,
+ ]),
+
Self::Custom {
reasoning_effort_levels,
..