Skip to content

OpenCode

OpenCode can talk to several model providers at once. The configuration the Hub generates adds four of them — Anthropic, OpenAI, Gemini and Grok — with common models already listed.

In the Hub’s API Keys, click Use Key → OpenCode and copy the generated opencode.json.

Save it where OpenCode looks for its configuration, as opencode.json or opencode.jsonc:

  • macOS / Linux: ~/.config/opencode/opencode.json
  • Windows: %userprofile%\.config\opencode\opencode.json

Create the file or folder if it doesn’t exist. If you already have a configuration, merge the entries under provider into it rather than replacing the file.

The providers use these addresses:

ProviderAddress
Anthropic, OpenAI, Grokhttps://api.rabah.ai/v1
Geminihttps://api.rabah.ai/v1beta

Open OpenCode and choose a model with /models. To add a model that isn’t listed, copy the format of an existing entry and add the model name from the Model Plaza under that provider’s models.