co/core
Developer docsDocs
Jump to
Tool setup

OpenCode

Add co/core as a custom OpenAI-compatible provider.

OpenCode can target any OpenAI-compatible endpoint. Browse /models for live model IDs, then add a opencode.json to your project or home directory with the models you want available:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "cocore": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "co/core",
      "options": {
        "baseURL": "https://console.cocore.dev/api/v1"
      },
      "models": {
        "stub": {
          "name": "stub (test model)"
        }
      }
    }
  }
}

Replace stub with any model ID from /models. Add one entry per model under models — the key is the model ID OpenCode sends in requests.

  1. Pick model IDs on /models and add them to the models block above.
  2. Run opencode and type /connect.
  3. Choose Other and paste your co/core API key.
  4. Select the co/core provider and a model from the picker.

Full reference: OpenCode custom providers.