coding-minimax-m2.1-freecoding-glm-4.7-freeclaude-sonnet-4-5gpt-5gpt-5-codex
Before installation, ensure that your system meets o seguinte requirements:
- Node.js ≥ 18.0.0
- Optional package managers for your operating system:
- macOS / Linux:
brew - Arch Linux:
paru - Windows:
choco,winget, orscoop
- macOS / Linux:
1. Installing OpenCode
Escolha any of o seguinte installation methods based on your operating system and tooling preferences.1. Install via Node.js
2. Install via Homebrew (macOS / Linux)
3. Install via Paru (Arch Linux)
4. Windows Installation
2. Launching and Logging in to OpenCode
After installation, follow the steps below to complete authentication and configuration.1. Log in to OpenCode
Execute o seguinte command in your terminal:2. Selecione the AI Provider
On the login screen, selecione AiHubMix as the model provider.
3. chave de API Authorization
Enter your AiHubMix chave de API on the OpenCode login page to complete authorization.
3. Using Models
1. Installation Verification
Execute o seguinte command to verify that OpenCode is installed and configured correctly:
2. Selecione a Model
Type/models, search for aihubmix, and selecione the desired model.

4. Using AiHubMix no OpenCode Desktop Client
- Download the OpenCode desktop application: https://opencode.ai/download .
-
Abra OpenCode and follow the steps:
/model→Connect provider→ search foraihubmix→ enter sua chave de API →Submit.
-
Não model selection panel, search for
aihubmixand selecione the model you want to use.
- URL base personalizada
Por padrão, o OpenCode envia as requisições da AIHubMix para https://aihubmix.com/v1. Se você precisar que as requisições passem por um gateway próprio, um proxy corporativo ou um nó de aceleração, é possível sobrescrever esse endereço por meio de options.baseURL, sem precisar modificar o código-fonte do OpenCode nem reinstalá-lo.
Passo 1: Abrir o arquivo de configuração
Abra~/.config/opencode/opencode.json (no Windows, %USERPROFILE%\.config\opencode\opencode.json).
Passo 2: Adicionar options.baseURL
Adicione options.baseURL no provider aihubmix. Basta incluir esse único campo: o OpenCode faz automaticamente um merge profundo com a configuração interna, então não é necessário reescrever o provider inteiro:
Observação: obaseURLsó precisa ir até o nível do domínio (por exemplo,https://api.inferera.com); o caminho é montado automaticamente pelo SDK. Não acrescente/v1por conta própria (como emhttps://api.inferera.com/v1), pois isso resultaria em/v1/v1/e causaria erro 404.
Passo 3: Reiniciar e verificar
Saia completamente do OpenCode e inicie-o novamente. Execute:provider.aihubmix.options.baseURL, você deverá ver o endereço que informou.
6. FAQ and Tips
- If a chave de API fails validation, log back into the AiHubMix Console and verify that the key is valid: https://console.aihubmix.com/token
- View the built-in help documentation:
opencode→/help - OpenCode official documentation: https://opencode.ai/docs/
Última atualização: 2026-06-01