Releases: gustavodiasdev/opencode-qwencode-auth
Releases · gustavodiasdev/opencode-qwencode-auth
v1.3.0
Remove qwen-code dependency and fix critical bugs
The plugin never needed qwen-code installed — it already has its own OAuth Device Flow (RFC 8628). This release removes the unnecessary fallback to qwen-code credentials, fixes critical bugs, and cleans up dead code.
Bugs fixed
- Silent
slow_downhandling:pollDeviceToken()returnednullwhen the server requested slow_down, preventing the polling interval from increasing. Now correctly throwsSlowDownError - Non-portable
Bun.sleep: Doesn't work on Node.js. Replaced with standardsetTimeout refreshToken || '': Treated empty string as falsy. Fixed to use??- Incorrect REAUTH_HINT: Referenced non-existent
qwen-code auth login
Dead code removed
- Fallback to
~/.qwen/oauth_creds.jsonfrom qwen-code - Functions:
loadCredentials,getValidCredentials,getOpenCodeAuthPath,generateState,checkExistingCredentials - Unused types:
QwenOAuthState,QwenModelId,ChatMessage,ChatCompletionRequest,ChatCompletionResponse,StreamChunk - Files:
src/plugin/utils.ts,src/plugin/client.ts - Dependency:
open(not imported by any active code)
Result
- -492 lines, +33 lines
- Zero runtime dependencies
- Compatible with Node.js >=20 and Bun
Closes #5
v1.2.1
Correções
Modelos removidos
- Removidos
qwen3-max,qwen-plus-latest,qwen3-235b-a22beqwen-flashpois o endpointportal.qwen.ainão os suporta (retornavamodel not supported). - O endpoint alternativo
chat.qwen.ai/api/v2não é viável pois requer cookies de sessão do browser e proteção anti-bot da Alibaba.
Modelos adicionados
coder-model— alias auto-roteado que mapeia paraqwen3-coder-plusvision-model— modelo vision-language que mapeia paraqwen3-vl-plus(128K contexto, suporta imagem)
Modelos confirmados funcionando
| Modelo | Mapeia para | Contexto | Output |
|---|---|---|---|
qwen3-coder-plus |
qwen3-coder-plus | 1M | 64K |
qwen3-coder-flash |
qwen3-coder-flash | 1M | 64K |
coder-model |
qwen3-coder-plus (auto) | 1M | 64K |
vision-model |
qwen3-vl-plus | 128K | 32K |
Outras mudanças
- Removida arquitetura dual-provider (qwen-chat) — voltou para provider único
qwen-code - Refatoração do loader com função
getValidAccessTokenextraída - Corrigida dependência circular no
package.json
v1.2.0 - Modelos Qwen de propósito geral
Novidades
- 4 novos modelos de propósito geral disponíveis via OAuth:
| Modelo | Contexto | Max Output | Reasoning | Descrição |
|---|---|---|---|---|
qwen3-max |
256K tokens | 64K tokens | Não | Flagship ~1T parâmetros, melhor para raciocínio complexo e tool use |
qwen-plus-latest |
128K tokens | 16K tokens | Sim | Equilíbrio qualidade-velocidade com thinking mode |
qwen3-235b-a22b |
128K tokens | 32K tokens | Sim | Maior modelo open-weight MoE com thinking mode |
qwen-flash |
1M tokens | 8K tokens | Não | Ultra-rápido para tarefas simples |
- Flag
reasoningdinâmico por modelo: Modelos com thinking mode (qwen-plus-latest,qwen3-235b-a22b) são corretamente sinalizados
Usando um modelo específico
opencode --provider qwen-code --model qwen3-max
opencode --provider qwen-code --model qwen-plus-latestAtualização
bun update opencode-qwencode-auth
# ou
npm update opencode-qwencode-authv1.1.0 - Mensagens de erro amigáveis
Melhorias
- Mensagens de erro amigáveis: Quando o token OAuth expira, o plugin agora mostra mensagens claras em português com instruções de como re-autenticar, em vez de JSON bruto da API
- Classificação de erros por tipo: 401/403 (token inválido), 429 (rate limit), 5xx (servidor indisponível)
- Log condicional: Detalhes técnicos só aparecem com
OPENCODE_QWEN_DEBUG=1 - Fallback robusto: Quando o refresh token falha, o plugin não continua com token expirado
Antes
Error: Qwen API error: 401 - {"error":{"message":"Invalid authentication credentials","type":"authentication_error"}}
Depois
[Qwen] Token invalido ou expirado. Execute "npx opencode-qwencode-auth" ou "qwen-code auth login" para re-autenticar.
Atualização
bun update opencode-qwencode-authv1.0.1
What's Changed
- Updated installation to use npm instead of GitHub
- Added screenshot to README
- Published to npm registry
Installation
cd ~/.opencode && npm install opencode-qwencode-authEdit ~/.opencode/opencode.jsonc:
{
"plugin": ["opencode-qwencode-auth"]
}Full Changelog: v1.0.0...v1.0.1
v1.0.0
🎉 Initial Release
First stable release of the Qwen Code OAuth Plugin for OpenCode.
✨ Features
- 🔐 OAuth Device Flow - Secure browser-based authentication (RFC 8628)
- ⚡ Automatic Polling - No need to press Enter after authorizing
- 🆓 2,000 req/day free - Generous free tier with no credit card required
- 🧠 1M context window - Models with 1 million token context
- 🔄 Auto-refresh - Tokens renewed automatically before expiration
- 🔗 qwen-code compatible - Reuses credentials from
~/.qwen/oauth_creds.json
🎯 Available Models
| Model | Context | Max Output |
|---|---|---|
qwen3-coder-plus |
1M tokens | 64K tokens |
qwen3-coder-flash |
1M tokens | 64K tokens |
📦 Installation
// ~/.opencode/package.json
{
"dependencies": {
"opencode-qwen-auth": "github:gustavodiasdev/opencode-qwen-auth"
}
}
// ~/.opencode/opencode.jsonc
{
"plugin": ["opencode-qwen-auth"]
}cd ~/.opencode && npm install📚 Documentation
See README.md for full documentation.