agent: OpenCode models update - #63691
Conversation
As per the base model definitions: https://github.com/anomalyco/models.dev/blob/dev/models/alibaba/qwen3.5-plus.toml https://github.com/anomalyco/models.dev/blob/dev/models/alibaba/qwen3.6-plus.toml https://github.com/anomalyco/models.dev/blob/dev/models/alibaba/qwen3.7-plus.toml https://github.com/anomalyco/models.dev/blob/dev/models/alibaba/qwen3.7-max.toml
|
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 check |
|
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'. |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
Hello @Vlaaaaaaad |
…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)
|
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. |
|
Thank you for picking this up!
@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 |
|
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.
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. |
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 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 :) |
|
Still, will try to add what is missing |
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).
…supported_reasoning_effort_levels
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.
|
I added the subscription param to interleaved_reasoning and supported_reasoning_effort_levels. |
|
@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 ? |
|
Or maybe change logic to use:
|
Objective
Solution
OpenCode Go:
OpenCode Zen:
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:
opencode models opencode --verboseopencode models opencode-go --verboseTesting
Some models were tested using
cargo runinside 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:
Code checks:
cargo fmt --check -- crates/opencode/src/opencode.rscargo fmt --check -- crates/language_models/src/provider/opencode.rscargo check -p opencode./script/clippySelf-Review Checklist:
Release Notes: