You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LongCat reasoning toggle falls back to unsupported OpenAI effort variants #47871
The direct LongCat provider declares binary reasoning in models.dev, but OpenCode's reasoningToggle() only handles Alibaba and Cohere. LongCat falls back to generic effort variants, so requests omit the documented thinking.type toggle. Selecting off cannot explicitly disable thinking.
Normalize the models.dev longcat provider with Provider.fromModelsDevProvider.
Pass its none/high variant through ProviderTransform.providerOptions and the actual @ai-sdk/openai-compatible client.
Capture the outgoing JSON: thinking is absent for both states.
A regression using SDK request capture reproduces this without a live API key. A small fix is prepared that maps the first-party LongCat toggle to none/high and preserves other SDK/provider behavior.
Operating System
macOS
AI assistance: Codex helped investigate, implement, and test this report's fix.
Thanks for the detailed report and for preparing a fix!
The commit you tested (ecbc6ccac85b) is from before v2 replaced the old code on dev. At that commit the opencode package is version 1.18.29, and ProviderTransform / reasoningToggle() are part of OpenCode v1. v2 (@opencode/cli, versions 2.x) is a completely separate implementation that is now on dev.
v1 only gets fixes for critical bugs, such as data loss, security problems, or crashes or breakage with no workaround. Not being able to turn LongCat's thinking off from the variant picker doesn't meet that bar, so this is unlikely to be fixed in v1. As a workaround you could try setting the thinking option for that model in your provider config (untested).
We'd encourage you to try v2 (npm i -g @opencode/cli). If LongCat's thinking.type toggle is also wrong there, or if you think this is critical, please reply here with your opencode --version and what you see.
Closing this as not planned. The missing LongCat thinking.type toggle is in v1's reasoningToggle() (1.18.x), and v1 only gets critical fixes. We didn't hear back that it's critical or that it also happens on v2.
Thanks again for the detailed analysis. If you see the same problem on v2 (@opencode/cli, 2.x), please open a new issue and include your opencode --version and the outgoing request you see.
Activity
github-actions commentedon Sep 8, 2026
This issue might be a duplicate of existing issues. Please check:
reasoningToggle()returns{}for@ai-sdk/openai-compatibleproviders despite models.dev declaring a toggle. That issue covers GLM 4.7 / GLM 5-turbo and even includes an identical suggested fix (thinking: {type: "disabled"}/thinking: {type: "enabled"}).thinking.type=enabled) not emitted for OpenAI-compatible models with a models.dev reasoning toggle (DeepSeek V4 Flash) — same adapter gap, different provider.opencodejr commentedon Oct 28, 2026
Thanks for the detailed report and for preparing a fix!
The commit you tested (
ecbc6ccac85b) is from before v2 replaced the old code ondev. At that commit theopencodepackage is version 1.18.29, andProviderTransform/reasoningToggle()are part of OpenCode v1. v2 (@opencode/cli, versions 2.x) is a completely separate implementation that is now ondev.v1 only gets fixes for critical bugs, such as data loss, security problems, or crashes or breakage with no workaround. Not being able to turn LongCat's thinking off from the variant picker doesn't meet that bar, so this is unlikely to be fixed in v1. As a workaround you could try setting the
thinkingoption for that model in your provider config (untested).We'd encourage you to try v2 (
npm i -g @opencode/cli). If LongCat'sthinking.typetoggle is also wrong there, or if you think this is critical, please reply here with youropencode --versionand what you see.opencodejr commentedon Oct 29, 2026
Closing this as not planned. The missing LongCat
thinking.typetoggle is in v1'sreasoningToggle()(1.18.x), and v1 only gets critical fixes. We didn't hear back that it's critical or that it also happens on v2.Thanks again for the detailed analysis. If you see the same problem on v2 (
@opencode/cli, 2.x), please open a new issue and include youropencode --versionand the outgoing request you see.