Use Poolside models in OpenCode - Poolside

Watch the setup video

Poolside with OpenCode

Prerequisites

Steps

  1. In Poolside Platform, open API Keys.
  2. Click New key.
  3. Copy the API key.
  4. In OpenCode, run the /connect command.
    /connect
    ```

05. Scroll to **Other**.
06. Enter `poolside` as the provider ID.
poolside
```
  1. Enter your Poolside Platform API key.
  2. Add an example Poolside provider to your opencode.json file. The models block below is an example. Use a Poolside model available to your API key. To find model IDs for your access method, see List available models.

opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "provider": {
        "poolside": {
          "npm": "@ai-sdk/openai-compatible",
          "name": "Poolside",
          "options": {
            "baseURL": "https://inference.poolside.ai/v1"
          },
          "models": {
            "<poolside-model-id>": {
              "name": "Poolside model"
            }
          }
        }
      }
    }
    ```

09. Run the `/models` command.
/models
```
  1. Select a Poolside model.
  2. Start a new chat and send a codebase question to confirm OpenCode responds with the selected Poolside model.

If you run Poolside on your own infrastructure, set the base URL to your deployment’s OpenAI-compatible endpoint instead. Replace <api-domain> with your deployment’s host. The path is /openai/v1.

To use OpenCode with your organization’s Poolside deployment, configure Poolside as a custom OpenAI-compatible provider and provide your API key through the POOLSIDE_API_KEY environment variable.

export POOLSIDE_API_KEY="<api-key>"

opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "poolside": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Poolside",
      "env": ["POOLSIDE_API_KEY"],
      "options": {
        "baseURL": "https://poolside.example.com/openai/v1"
      }
    }
  }
}

Run the /models command, select a Poolside model, then start a new chat and send a codebase question to confirm OpenCode responds with the selected Poolside model.

  1. In OpenCode, run the /connect command.
    /connect
    ```

2. Select **OpenRouter**.
3. Enter your OpenRouter API key. To create one, go to [OpenRouter API keys](https://openrouter.ai/keys).
4. Select a Poolside model.  OpenRouter may offer free and paid Poolside models. To see current availability, see [Poolside models on OpenRouter](https://openrouter.ai/poolside).
5. Start a new chat and send a codebase question to confirm OpenCode responds with the selected Poolside model.