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
- User-focused READMEs with comprehensive documentation
- Comprehensive technical CHANGELOG following Keep a Changelog format
- Correct quota documentation (1,000 req/day, not 2,000)
- Fix repository references to point to original repo (gustavodiasdev)
- Update badges and clone URLs following fork best practices
- Documentation in both English (README.md) and Portuguese (README.pt-BR.md)
<imgsrc="assets/screenshot.png"alt="OpenCode with Qwen Code"width="800">
9
9
</p>
10
10
11
-
**Authenticate OpenCode CLI with your qwen.ai account.** This plugin enables you to use Qwen models (Coder, Max, Plus and more) with **2,000 free requests per day** - no API key or credit card required!
11
+
**Authenticate OpenCode CLI with your qwen.ai account.** This plugin enables you to use the `coder-model`with **1,000 free requests per day** - no API key or credit card required!
12
12
13
-
[🇧🇷 Leia em Português](./README.pt-BR.md)
13
+
[🇧🇷 Leia em Português](./README.pt-BR.md) | [📜 Changelog](./CHANGELOG.md)
|`coder-model`| 1M tokens | 64K tokens | Official alias (Auto-routes to Qwen 3.5 Plus - Hybrid & Vision) |
132
75
133
-
> **Note:** This plugin aligns with the official `qwen-code-0.12.0` client, which exposes only the `coder-model` alias. This model automatically routes to the best available Qwen 3.5 Plus with hybrid reasoning and vision capabilities.
76
+
> **Note:** This plugin aligns with the official `qwen-code` client. The `coder-model` aliasautomatically routes to the best available Qwen 3.5 Plus model with hybrid reasoning and vision capabilities.
3.**Token Storage**: Saves credentials to `~/.qwen/oauth_creds.json`
153
-
4.**Auto-refresh**: Renews tokens 30 seconds before expiration
86
+
### "Invalid access token" or "Token expired"
154
87
155
-
## 📊 Usage Limits
88
+
The plugin usually handles refresh automatically. If you see this error immediately:
156
89
157
-
| Plan | Rate Limit | Daily Limit |
158
-
|------|------------|-------------|
159
-
| Free (OAuth) | 60 req/min | 2,000 req/day |
90
+
1.**Re-authenticate:** Run `opencode auth login` again.
91
+
2.**Clear cache:** Delete the credentials file and login again:
92
+
```bash
93
+
rm ~/.qwen/oauth_creds.json
94
+
opencode auth login
95
+
```
160
96
161
-
> [!NOTE]
162
-
> Limits reset at midnight UTC. For higher limits, consider using an API key from [DashScope](https://dashscope.aliyun.com).
97
+
### Rate limit exceeded (429 errors)
163
98
164
-
## 🔧 Troubleshooting
99
+
If you hit the 1,000 requests/day limit:
100
+
- Wait until midnight UTC for the quota to reset.
101
+
- Consider using a [DashScope API Key](https://dashscope.aliyun.com) for professional use.
165
102
166
-
### Token expired
103
+
### Enable Debug Logs
167
104
168
-
The plugin automatically renews tokens. If issues persist:
105
+
If something isn't working, you can see detailed logs by setting the debug environment variable:
169
106
170
107
```bash
171
-
# Remove old credentials
172
-
rm ~/.qwen/oauth_creds.json
173
-
174
-
# Re-authenticate
175
-
opencode auth login
108
+
OPENCODE_QWEN_DEBUG=1 opencode
176
109
```
177
110
178
-
### Provider not showing in `auth login`
179
-
180
-
The `qwen-code` provider is added via plugin. In the `opencode auth login` command:
181
-
182
-
1. Select **"Other"**
183
-
2. Type `qwen-code`
184
-
185
-
### Rate limit exceeded (429 errors)
186
-
187
-
**As of v1.5.0, this should no longer occur!** The plugin now sends official Qwen Code headers that properly identify your client and prevent aggressive rate limiting.
188
-
189
-
If you still experience rate limiting:
190
-
- Ensure you're using v1.5.0 or later: `npm update opencode-qwencode-auth`
191
-
- Wait until midnight UTC for quota reset
192
-
- Consider [DashScope API](https://dashscope.aliyun.com) for higher limits
0 commit comments