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
Qwen3.7 Max (and other Qwen3.x reasoning models like Qwen3.6 Plus, Qwen3.5 Plus) support adjustable thinking depth via DashScope's thinking_budget parameter, but OpenCode's TUI never shows the thinking level switcher for any Qwen model.
Root cause — in packages/opencode/src/provider/transform.ts, the variants() function has a hardcoded exclusion at line ~702-714:
if(id.includes("deepseek-chat")||id.includes("deepseek-reasoner")||id.includes("deepseek-r1")||id.includes("deepseek-v3")||id.includes("minimax")||(id.includes("glm")&&!glm52)||id.includes("kimi")||id.includes("k2p")||id.includes("qwen")||// ← blocks ALL Qwen modelsid.includes("big-pickle"))return{}
The id.includes("qwen") check is a blanket exclusion that prevents all Qwen models from exposing thinking level variants, even though:
models.dev correctly marks qwen3.7-max with reasoning: true ✅
capabilities.reasoning is correctly set to true ✅
DashScope's OpenAI-compatible API supports enable_thinking: true + thinking_budget for fine-grained control
The model passes the first gate (capabilities.reasoning === true) but is immediately blocked by the hardcoded string match, returning empty variants {} to the TUI.
Expected behavior
Qwen3.x reasoning models (3.5+, 3.6, 3.7) should expose thinking level variants similar to Google's thinkingBudget approach, e.g.:
Don't forget to replace "your-apiKey" and "baseURL" with your actual API key and baseURL before saving. The baseURL and API format might differ in different regions.
For more details, see the OpenCode Config Docs.
Activity
vugoqk commentedon Jun 22, 2026
我也遇到过这个问题,可以根据百炼官方提供的文档自定义一个Provider,然后自己设置variants
当然这只是一个临时解决方案,希望opencode官方能够尽快适配:)
yapnel commentedon Jun 22, 2026
Kindly please show how you have configured this? I am using a Chinese to English translator for your message. Thank you
vugoqk commentedon Jun 22, 2026
Sure, here's the full configuration. You just need to add it in your OpenCode config file.
Config file locations:
~/.config/opencode/opencode.json%USERPROFILE%\.config\opencode\opencode.json{ "$schema": "https://opencode.ai/config.json", // ... your other configs "provider": { "bailian-payg": { "models": { "qwen3.7-max": { "name": "Qwen3.7 Max", "reasoning": true, "variants": { "low": { "thinking": { "budgetTokens": 4096, "type": "enabled" } }, "medium": { "thinking": { "budgetTokens": 8192, "type": "enabled" } }, "high": { "thinking": { "budgetTokens": 16384, "type": "enabled" } }, "max": { "thinking": { "budgetTokens": 32768, "type": "enabled" } } } } }, "name": "Alibaba Cloud Model Studio", "npm": "@ai-sdk/anthropic", "options": { "apiKey": "your-apiKey", "baseURL": "https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/apps/anthropic/v1", "setCacheKey": true } } } }Don't forget to replace
"your-apiKey"and"baseURL"with your actual API key and baseURL before saving. The baseURL and API format might differ in different regions.For more details, see the OpenCode Config Docs.
github-actions commentedon Aug 22, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.