GeezerVison is showing github.com — fix(opencode): remove model ID blocklist from reasoning variants by elonazoulay · Pull Request #23335 · anomalyco/opencode
Conversation
elonazoulay
commented
Apr 18, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Issue for this PR
Closes #23334
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
Removes the hardcoded model ID blocklist from variants() in transform.ts. Instead of excluding models by name (deepseek, glm, minimax, mistral, kimi, qwen, etc.), reasoning effort variants are now gated solely by capabilities.reasoning from models.dev.
Verified that z-ai (GLM-5.1), DeepSeek, and Fireworks all support reasoning_effort through their openai-compatible APIs.
How did you verify your code works?
From packages/opencode:
bun test test/provider/transform.test.ts
bun typecheck
Added focused coverage for:
deepseek with reasoning: true on @ai-sdk/openai-compatible returning low / medium / high
deepseek with reasoning: false returning {}
glm with reasoning: true on @ai-sdk/openai-compatible returning low / medium / high
mistral on @ai-sdk/mistral returning {} (handled by provider switch)
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
jeevan6996 and kedf reacted with thumbs up emoji
|
hm there is no restore? They have always been omitted since none of the models support reasoning efforts as far as I know, may have changed for some models
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
elonazoulay
changed the title
fix(opencode): restore reasoning variants for openai-compatible deepseek glm and minimax
fix(opencode): remove model ID blocklist from reasoning variants
Apr 19, 2026
hm there is no restore? They have always been omitted since none of the models support reasoning efforts as far as I know, may have changed for some models
Hey, thanks for taking a look at this pr!
I am testing it locally, could be that it is a recent change, I verified that zai, deepseek and fireworks all support reasoning. And the difference is amazing when using this locally.
opencode is the best!
Either way, lmk if this is good or any changes needed. Much appreciated!
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
I verified that zai, deepseek and fireworks all support reasoning.
How did u verify this? From what I read on their docs reasoning effort doesnt do anything for zai or deepseek models regardless of if the api allows them
|
elonazoulay reacted with eyes emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
elonazoulay
commented
Apr 20, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
I verified that zai, deepseek and fireworks all support reasoning.
How did u verify this? From what I read on their docs reasoning effort doesnt do anything for zai or deepseek models regardless of if the api allows them
Thanks for catching this, you're right! I will keep
What I was seeing was that the tool I was using (jetbrains ai assistant) just read the variants without verifying but under the hood it did nothing.
What I found: both deepseek and glm accept a thinking parameter, so I will change this pr to send that. Testing it out now.
UPDATE:
It was a ui issue, nothing changed in the backend (default for glm is thinking == true).
The only value this pr has: I added the ability to turn thinking off for glm which results in fewer tokens. Maybe that's worth keeping? I'm fine closing it also.
Either way, I will contribute back as best I can, I love opencode, what an amazing project!
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
It looks like an update solved this. Closing. Opencode is awesome!
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|