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

# Objective

Adding newly-released OpenCode models.

## Solution

**OpenCode Go**:
- no changes

**OpenCode Zen**:
- added GPT 5.6 Luna, GPT 5.6 Terra, GPT 5.6 Sol using raw data from
Models.dev repo
(https://github.com/anomalyco/models.dev/tree/66dcd837fe3d7ad7e614e0a57065c5545c3c7a75/providers/opencode/models
and
https://github.com/anomalyco/models.dev/tree/66dcd837fe3d7ad7e614e0a57065c5545c3c7a75/models/openai)
- added Grok 4.5 using raw data from Models.dev repo
(https://github.com/anomalyco/models.dev/blob/66dcd837fe3d7ad7e614e0a57065c5545c3c7a75/providers/opencode/models/grok-4.5.toml
and
https://github.com/anomalyco/models.dev/blob/66dcd837fe3d7ad7e614e0a57065c5545c3c7a75/models/xai/grok-4.5.toml)

**OpenCode Free**:
- as per
https://github.com/zed-industries/zed/issues/56869#issuecomment-4466637648,
no changes as it's unclear what models are long-term free models

## Testing

**Not tested at all**, since I don't have an OpenCode Zen subscription
(since I am in the EU, I think I am also blocked from using Grok?).

## 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 adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

## Showcase

N/A

---

Release Notes:

- Agent: OpenCode Zen model updates (added GPT 5.6 Luna, GPT 5.6 Terra,
GPT 5.6 Sol, and Grok 4.5)
This commit is contained in:
Vlad Ionescu authored and GitHub committed 2026-07-13 12:13:49 +00:00
1 parent cd27816573
commit 9b28a1b3dd
1 file changed
+49 -3
+49 -3
View File
@@ -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,
..