Skip to content

agent: OpenCode models update - #63691

Open
0xNestor wants to merge 30 commits into
zed-industries:mainfrom
0xNestor:opencode-sep-2
Open

agent: OpenCode models update#63691
0xNestor wants to merge 30 commits into
zed-industries:mainfrom
0xNestor:opencode-sep-2

Conversation

@0xNestor

@0xNestor 0xNestor commented Sep 3, 2026

Copy link
Copy Markdown

Objective

  • Update models from OpenCode provider.
  • Includes fixes too.
  • Add subscription-based configs to opencode interleaved_reasoning and supported_reasoning_effort_levels

Solution

  • updated reasoning efforts in many models
  • updated interleaved reasoning in some models
  • updated Hy3 output token limit
  • updated Qwen family to use openai-chat protocol
  • updated Grok Build 0.1 protocol, now uses openai-responses

OpenCode Go:

  • added Grok 4.6
  • added Qwen 3.8 Flash
  • added LongCat 2.0
  • added GLM 5.3 Flash
  • added Hy4 (Preview)
  • added DeepSeek V4 Flash Vision (Exp)
  • added Muse Spark 1.2 (Contributor)
  • added Muse Spark 1.3 (Contributor)

OpenCode Zen:

  • added Gemini 3.8 Flash
  • added Claude Fable 5.1

Notes:
Each commit has the models.dev or OpenCode commit related to it.
If not, is because their data got obtained vía CLI commands:

  • (ZEN) opencode models opencode --verbose
  • (GO) opencode models opencode-go --verbose

Testing

Some models were tested using cargo run inside WSL, using a simple prompt: create main.js, add two constant vars that call a sum function and prints result, run it with node.

From the ones I have tested, these have some errors:

  • Grok 4.5: missing field response. (Not related to Zed. Replicated upstream using OpenCode CLI)
  • Gemini 3.8 Flash: missing API key. (Replicated on Zed 1.17.2 using Gemini 3.7 Flash)

Code checks:
cargo fmt --check -- crates/opencode/src/opencode.rs
cargo fmt --check -- crates/language_models/src/provider/opencode.rs
cargo check -p opencode
./script/clippy

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content adheres to Zed's UI standards (UX/UI and icon guidelines)
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Release Notes:

  • Updated available opencode models.

@cla-bot

cla-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @0xNestor on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@zed-community-bot zed-community-bot Bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Sep 3, 2026
@0xNestor

0xNestor commented Sep 3, 2026

Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot

cla-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @0xNestor on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@cla-bot

cla-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@0xNestor

0xNestor commented Sep 3, 2026

Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Sep 3, 2026
@cla-bot

cla-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@0xNestor

0xNestor commented Sep 3, 2026

Copy link
Copy Markdown
Author

Hello @Vlaaaaaaad
can you review it ?

@MrSubidubi MrSubidubi added the area:ai/opencode OpenCode integration label Sep 3, 2026
@0xNestor 0xNestor changed the title agent: Opencode models update agent: OpenCode models update Sep 3, 2026
…tual configuration that OpenCode CLI has (and we use), instead of trusting on the models.dev website
OpenCode CLI configuration uses interleaved in some Sonnet models
(claude-sonnet-4-5, claude-sonnet-4-6) and have it disabled for some of
the Minimax (minimax-m2.7,
minimax-m3)
@0xNestor

0xNestor commented Sep 4, 2026

Copy link
Copy Markdown
Author

Since Vlad is low on bandwidth I tested some.

And also stopped relying on model.dev and actually used some useful OpenCode CLI (1.18.27) commands that easily exposes what reasoning efforts we can actually select in the TUI, so I prefered that instead.

@Vlaaaaaaad

Copy link
Copy Markdown
Contributor

Thank you for picking this up!

And also stopped relying on model.dev and actually used some useful OpenCode CLI (1.18.27) commands that easily exposes what reasoning efforts we can actually select in the TUI, so I prefered that instead.

opencode models --verbose prints the same models.dev data (don't forget to do an opencode models --refresh before!), with some extra hardcodings from the OpenCode side (which they were trying to eliminate and which they might've eliminated already — it's been a while since I last read the code and OpenCode V1 is only getting critical bugfixes with all development work going into V2).

Hello @Vlaaaaaaad can you review it?
Since Vlad is low on bandwidth I tested some.

@0xNestor yeah, sorry, bandwidth-constrained right now 😅

I don't have the time to do a review, but a quick read shows that DeepSeek V4 Flash Vision Exp and Muse Spark 1.3 are missing. Also, MiniMax M3 definitely still supports disabling thinking (shows as none and thinking in OpenCode CLI) so the removal of reasoning efforts from 245bce6 is probably wrong. I am assuming today or tomorrow GPT 6 will also make it to Zen?

@0xNestor

0xNestor commented Sep 4, 2026

Copy link
Copy Markdown
Author

After looking that model.dev displayed no reasoning in some models when the CLI shows them, I had to read the CLI code and there are still many hardcoded ones, that why I started to rely more in the opencode models commands. At this moment I did not check the V2 side, I'm just assuming big chunk of people are still in the stable one.

I know they are some models missing (like free ones), but I also left out others intentionally because I'm not sure if Zed wants to add them.
So maybe you or Finn can tell me about these that I'm not quite sure about?

  • Preview ones: Hy4 (Preview)
  • Experimental ones: DeepSeek V4 Flash Vision (Exp)
  • Contributor line (have emphasis on data retention and training): Muse Spark 1.3 Contributor

In terms of MiniMax M3, I included a compromises section in my original post, some models have a mismatch between ZEN and GO subscriptions, so I just favored one over the other, normally selecting the GO side, or preferring no options instead of an option that only one subscription type allows.
Also, to support thinking I need to set a not-None effort, but the M3 expects 'thinking', so sending out a random 'high' or 'max' don't really know if could break it or if it gets ignored, so thats why I added it and then removed it (Zed stable version does not have it)

@Vlaaaaaaad

Copy link
Copy Markdown
Contributor

some models have a mismatch between ZEN and GO subscriptions, so I just favored one over the other

Don't do that! Set the correct value based on the subscription type, like how that's already done for the protocol and for the max token count and for the max output token count!

Free models are indeed not added in Zed as per #62559. I'd add DeepSeek V4 Flash Vision since the DS4 Previews were also added and I'd also add Muse Spark 1.3 Contributor since that requires explicit opt-in in the OpenCode console, but that's me 🤷
I don't have the time to research answers to the other questions, sorry.

@0xNestor

0xNestor commented Sep 4, 2026

Copy link
Copy Markdown
Author

Don't do that! Set the correct value based on the subscription type, like how that's already done for the protocol and for the max token count and for the max output token count!

I know that some are tweaked by subscription, but supported_reasoning_effort_levels() did not exposed that, and I didn't want to change the signature of the function since I'm new to systems programming and never tried rust before. So I learned from your previous commits, to help you out by only updating current config :)

@0xNestor

0xNestor commented Sep 4, 2026

Copy link
Copy Markdown
Author

Still, will try to add what is missing

@Vlaaaaaaad

Copy link
Copy Markdown
Contributor

Don't do that! Set the correct value based on the subscription type, like how that's already done for the protocol and for the max token count and for the max output token count!

I know that some are tweaked by subscription, but supported_reasoning_effort_levels() did not exposed that, and I didn't want to change the signature of the function

It should be ok to change the function signature, but, again, I don't have time to validate this statement so I could be wrong. See #57076 for a past example of function signature change.

As per the OpenCode Go provider configuration (opencode models opencode-go --verbose).
As per the OpenCode Go provider configuration (opencode models opencode-go --verbose).
As per the OpenCode Go provider configuration (opencode models opencode-go --verbose).
minimax-m2.7 and minimax-m3 now mark interleaved reasoning as
supported on Zen
qwen3.6-plus now uses the Anthropic protocol and high/max reasoning
efforts on Zen, while Go keeps OpenAI Chat and no effort levels.
@0xNestor

0xNestor commented Sep 5, 2026

Copy link
Copy Markdown
Author

I added the subscription param to interleaved_reasoning and supported_reasoning_effort_levels.
Ran cargo fmt, check -p opencode, and the clippy script. All clean.

@0xNestor

0xNestor commented Sep 5, 2026

Copy link
Copy Markdown
Author

@Vlaaaaaaad what should I do with the 14 models (e.x: mimo-v2.5-pro) that OpenCode reports: reasoning=true but without any efforts variants ?
because right now, supports_thinking() will return false, as it does not have any configured efforts. Should I still add them with a fake ReasoningEffort::Max ?

@0xNestor

0xNestor commented Sep 5, 2026

Copy link
Copy Markdown
Author

Or maybe change logic to use:
pub fn supported_reasoning_effort_levels(&self, subscription: OpenCodeSubscription) -> Option<Vec>

  • return None : when model does not support thinking
  • return Some(vec![]) : when does think, but OpenCode does not report any effort variants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai/opencode OpenCode integration cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants