QwenCloudBRASIL
Tradução de apoio para consulta. Código e identificadores técnicos preservados. Consultar referência original ↗

OpenCode

Assistente de codificação Terminal AI

Conecte-o a QwenCloud via Token Plan (Personal Edition), Token Plan (Team Edition) ou faturamento pré-pago.

Instale o OpenCode

  1. Instale ou atualize Node.js (v18.0 ou posterior).

  2. Execute o seguinte comando no terminal para instalar o OpenCode.

npm install -g opencode-ai

Execute o seguinte comando para verificar a instalação. A instalação será bem-sucedida se um número de versão for exibido.

opencode -v

Configurar credenciais de acesso

Crie e abra o arquivo de configuração opencode.json em um dos seguintes caminhos:

Adicione a configuração do seu plano de faturamento.

Plano de token (edição pessoal)

Você deve ter uma assinatura ativa do Token Plan (Personal Edition). Você pode comprar um na página Token Plan (Personal Edition).

Substituir YOUR_API_KEY com seu plano de token dedicado (edição pessoal) chave de API. Para obter uma lista de modelos disponíveis, consulte modelos suportados.

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "bailian-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"
        }
      }
    }
  }
}

**qwen3.8-max modo de pensamento **:

Plano de Token (Edição de Equipe)

Substituir YOUR_API_KEY com o Token Plan (Team Edition) dedicado chave de API. Para modelos disponíveis, consulte Modelos suportados pelo Token Plan.

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "bailian-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"
        },
        "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 **:

Pague conforme o uso

Substituir YOUR_API_KEY com o QwenCloud Chave API. Para modelos disponíveis, consulte API compatível com Antrópico.

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "bailian-payg": {
      "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"
        }
      }
    }
  }
}

Verifique a configuração

Após salvar a configuração, reinicie o OpenCode, digite /models, procure por QwenCloude selecione o modelo que você want usar.

Perguntas frequentes

Códigos de erro

Se você encontrar erros durante a configuração, consulte a documentação de perguntas frequentes do seu plano de faturamento: