OpenCode
Fonte: https://docs.qwencloud.com/coding-plan/tools/opencode - extraído do HTML público arquivado.
Assistente de codificação de IA terminal. Conectar a QwenCloud via Token Plan (Edição Pessoal), Token Plan (Edição da Equipe), ou faturamento pago como você vai.
Instalar o OpenCode
- Instale ou atualize [Node.js] (https://nodejs.org/en/download/) (v18.0 ou mais tarde).
- Execute o seguinte comando no terminal para instalar o OpenCode. Entendido.
npm install -g opencode-ai
Execute o seguinte comando para verificar a instalação. A instalação é bem sucedida se um número de versão é exibido. Entendido.
opencode -v
Configure credenciais de acesso.
Crie e abra o arquivo de configuração opencode.json em um dos seguintes caminhos:
- MacOS / Linux:
~/.config/opencode/opencode.json - Janelas:
C:\Users\<Your-Username>\.config\opencode\opencode.jsonAdicione a configuração para o seu plano de faturamento.
Token Plan (Edição Pessoal)
Você deve ter uma assinatura ativa do Token Plan (Edição Pessoal). Você pode comprar um na página do Plano de Inspeção (Plano de Inspeção) (https://home.qwencloud.com/analytics/token-plan/team). Substituir YOUR_API_KEY Com seu plano dedicado Token (Edição Pessoal) [Chave API] (https://home.qwencloud.com/api-keys). Para uma lista de modelos disponíveis, veja [modelos suportados] (https://www.qwencloud.com/token-plan/personal/token-plan-personal-overview#supported-models).
Entendido.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"qwencloud-token-plan-personal": {
"npm": "@ai-sdk/anthropic",
"name": "QwenCloud",
"options": {
"baseURL": "https://token-plan.maas.qwencloudapi.com/apps/anthropic/v1",
"apiKey": "YOUR_API_KEY"
},
"models": {
"auto": {
"name": "Auto",
"modalities": {
"input": ["text"],
"output": ["text"]
}
},
"qwen3.8-max": {
"name": "Qwen3.8 Max",
"reasoning": true,
"limit": {
"context": 983616,
"output": 131072
},
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"options": {
"effort": "xhigh"
}
},
"qwen3.8-flash": {
"name": "Qwen3.8 Flash",
"reasoning": true,
"limit": {
"context": 983616,
"output": 131072
},
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"options": {
"effort": "xhigh"
}
},
"qwen3.7-max": {
"name": "Qwen3.7 Max",
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"qwen3.7-plus": {
"name": "Qwen3.7 Plus",
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"qwen3.6-plus": {
"name": "Qwen3.6 Plus",
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"qwen3.6-flash": {
"name": "Qwen3.6 Flash",
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"glm-5.3": {
"name": "GLM-5.3",
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"glm-5.2": {
"name": "GLM-5.2",
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"deepseek-v4-pro": {
"name": "DeepSeek V4 Pro"
},
"deepseek-v4-pro-0813": {
"name": "DeepSeek V4 Pro 0813"
},
"deepseek-v4-flash-0731": {
"name": "DeepSeek V4 Flash 0731"
},
"deepseek-v4.1-flash": {
"name": "DeepSeek V4.1 Flash"
},
"deepseek-v4.1-flash-1017": {
"name": "DeepSeek V4.1 Flash 1017"
}
}
}
}
}
qwen3.8-max Modo de pensamento:
- Suporta tanto habilitado quanto desativado (modo de pensamento híbrido).
- Temperatura: por padrão de 0,6 no modo de pensar. Valores abaixo de 0,6 são ajustados automaticamente para 0,6.
- Controla a profundidade do raciocínio. Opções: Xhigh, médio, baixo. Padrão: Xhigh.
Token Plan (Edição da Equipe)
Substituir YOUR_API_KEY com o Token Plan (Edição da Equipe) dedicado [Chave API] (https://home.qwencloud.com/api-keys). Para os modelos disponíveis, veja [Token Plan supported models] (https://www.qwencloud.com/token-plan/team/token-plan-team-overview#supported-models).
Entendido.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"qwencloud-token-plan": {
"npm": "@ai-sdk/anthropic",
"name": "QwenCloud",
"options": {
"baseURL": "https://token-plan.maas.qwencloudapi.com/apps/anthropic/v1",
"apiKey": "YOUR_API_KEY"
},
"models": {
"auto": {
"name": "Auto",
"modalities": {
"input": ["text"],
"output": ["text"]
}
},
"qwen3.8-max": {
"name": "Qwen3.8 Max",
"reasoning": true,
"limit": {
"context": 983616,
"output": 131072
},
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"options": {
"effort": "xhigh"
}
},
"qwen3.8-flash": {
"name": "Qwen3.8 Flash",
"reasoning": true,
"limit": {
"context": 983616,
"output": 131072
},
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"options": {
"effort": "xhigh"
}
},
"qwen3.7-max": {
"name": "Qwen3.7 Max",
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"qwen3.7-plus": {
"name": "Qwen3.7 Plus",
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"qwen3.6-plus": {
"name": "Qwen3.6 Plus",
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"qwen3.6-flash": {
"name": "Qwen3.6 Flash",
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"deepseek-v4-pro": {
"name": "DeepSeek V4 Pro"
},
"deepseek-v4-pro-0813": {
"name": "DeepSeek V4 Pro 0813"
},
"deepseek-v4-flash-0731": {
"name": "DeepSeek V4 Flash 0731"
},
"deepseek-v4.1-flash": {
"name": "DeepSeek V4.1 Flash"
},
"deepseek-v4.1-flash-1017": {
"name": "DeepSeek V4.1 Flash 1017"
},
"kimi-k2.7-code": {
"name": "Kimi K2.7 Code",
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"kimi-k2.6": {
"name": "Kimi K2.6",
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"kimi-k2.5": {
"name": "Kimi K2.5",
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"glm-5.3": {
"name": "GLM-5.3",
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"glm-5.2": {
"name": "GLM-5.2",
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"glm-5.1": {
"name": "GLM-5.1",
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"glm-5": {
"name": "GLM-5",
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"MiniMax-M2.5": {
"name": "MiniMax M2.5"
}
}
}
}
}
qwen3.8-max Modo de pensamento:
- Suporta tanto habilitado quanto desativado (modo de pensamento híbrido).
- Temperatura: por padrão de 0,6 no modo de pensar. Valores abaixo de 0,6 são ajustados automaticamente para 0,6.
- Controla a profundidade do raciocínio. Opções: Xhigh, médio, baixo. Padrão: Xhigh.
Pagar como você vai
Substituir YOUR_API_KEY com o [QwenCloud API Key] (https://home.qwencloud.com/api-keys). Para os modelos disponíveis, veja [A API compatível antrópica] (https://www.qwencloud.com/api-reference/chat/anthropic).
Entendido.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"qwencloud": {
"npm": "@ai-sdk/openai-compatible",
"name": "QwenCloud",
"options": {
"baseURL": "https://maas.qwencloudapi.com/compatible-mode/v1",
"apiKey": "YOUR_API_KEY"
},
"models": {
"qwen3.7-max": {
"name": "Qwen3.7 Max",
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"qwen3.7-plus": {
"name": "Qwen3.7 Plus",
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"qwen3.6-plus": {
"name": "Qwen3.6 Plus",
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 8192
}
}
},
"deepseek-v4.1-flash": {
"name": "DeepSeek V4.1 Flash"
},
"deepseek-v4.1-flash-1017": {
"name": "DeepSeek V4.1 Flash 1017"
}
}
}
}
}
Verificar configuração
Depois de salvar a configuração, reinicie o OpenCode, digite /models, procurar QwenCloudE selecione o modelo que você want para usar.
FAQ
Códigos de erro.
Se encontrar erros durante a configuração, consulte a documentação do FAQ para o seu plano de faturamento:
- Pague-como-você-vai:https://www.qwencloud.com/api-reference/preparation/error-messages)
- (Plano de Token (Edição Pessoal): (Plano de Token (Edição Pessoal) FAQ) (https://www.qwencloud.com/token-plan/personal/token-plan-personal-faq)
- (Edição de Equipe): (Plano de Equipe)https://www.qwencloud.com/token-plan/team/token-plan-team-faq) [Anterior] (https://www.qwencloud.com/developer-guides/clients-and-developer-tools/claude-code[Editor de código com IA do professor] (https://www.qwencloud.com/developer-guides/clients-and-developer-tools/cursor)