coding-minimax-m2.1-freecoding-glm-4.7-freeclaude-sonnet-4-5gpt-5gpt-5-codex
Before installation, ensure that your system meets the following 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
Choose any of the following 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
Run the following command in your terminal:2. Select the AI Provider
On the login screen, select AiHubMix as the model provider.
3. API Key Authorization
Enter your AiHubMix API Key on the OpenCode login page to complete authorization.
3. Using Models
1. Installation Verification
Run the following command to verify that OpenCode is installed and configured correctly:
2. Select a Model
Type/models, search for aihubmix, and select the desired model.

4. Using AiHubMix in the OpenCode Desktop Client
- Download the OpenCode desktop application: https://opencode.ai/download .
-
Open OpenCode and follow the steps:
/model→Connect provider→ search foraihubmix→ enter your API Key →Submit.
-
In the model selection panel, search for
aihubmixand select the model you want to use.
- Custom Base URL
By default, OpenCode sends AIHubMix requests to https://aihubmix.com/v1. If you need requests to go through a self-hosted gateway, an enterprise proxy, or an acceleration node, you can override this in the configuration file via options.baseURL, without modifying the OpenCode source code or reinstalling.
Step 1: Open the configuration file
Open~/.config/opencode/opencode.json (on Windows, %USERPROFILE%\.config\opencode\opencode.json).
Step 2: Add options.baseURL
Add options.baseURL under the aihubmix provider. You only need to write this single field—OpenCode will automatically deep-merge it with the built-in configuration, so there’s no need to rewrite the entire provider:
Note:baseURLonly needs to be specified at the domain level (e.g.,https://api.inferera.com). Paths such as/v1and/chat/completionsare appended automatically by the SDK. Do not add/v1yourself (e.g.,https://api.inferera.com/v1), otherwise it will be concatenated into/v1/v1/and result in a 404.
Step 3: Restart and verify
Fully quit OpenCode and restart it. You can run the following command to confirm that the configuration has taken effect:provider.aihubmix.options.baseURL; from then on, every model request will be sent to that address.
Field reference:
6. FAQ and Tips
- If the API Key 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/
Last updated: 2026-06-01