GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(opencode): remove model ID blocklist from reasoning variants by elonazoulay · Pull Request #23335 · anomalyco/opencode

Conversation

@elonazoulay

@elonazoulay elonazoulay commented Apr 18, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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
All reactions
  • 👍 2 reactions
@elonazoulay
elonazoulay force-pushed the fix/opencode-openai-compatible-reasoning-variants branch from 2c4b5ae to 3ef0d34 Compare April 18, 2026 21:03
@github-actions github-actions Bot mentioned this pull request Apr 18, 2026
fix(provider): gate zai/zhipuai thinking injection on reasoning capability and restore GLM variants #23352
Closed
@rekram1-node

rekram1-node commented Apr 19, 2026

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@elonazoulay 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
@elonazoulay
elonazoulay force-pushed the fix/opencode-openai-compatible-reasoning-variants branch from 3196415 to 603bd25 Compare April 19, 2026 20:00
@elonazoulay

elonazoulay commented Apr 19, 2026

Copy link
Copy Markdown
Author

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!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rekram1-node

rekram1-node commented Apr 19, 2026

Copy link
Copy Markdown
Member

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
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@elonazoulay

elonazoulay commented Apr 20, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Author

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!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@elonazoulay
elonazoulay force-pushed the fix/opencode-openai-compatible-reasoning-variants branch 2 times, most recently from aa78935 to 6aeba46 Compare April 20, 2026 09:50
@elonazoulay
fix(opencode): add thinking effort toggle for glm-5.1 via zai coding …
1812872
…plan
@elonazoulay
elonazoulay force-pushed the fix/opencode-openai-compatible-reasoning-variants branch from 6aeba46 to 1812872 Compare April 20, 2026 10:04
@elonazoulay

elonazoulay commented May 17, 2026

Copy link
Copy Markdown
Author

It looks like an update solved this. Closing. Opencode is awesome!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@elonazoulay elonazoulay closed this May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Bug: openai-compatible deepseek/glm/minimax models lost reasoning variants after qwen exclusion

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@elonazoulay @rekram1-node
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.