camelAI Documentation

Coding Agents

Use OpenCode

Point OpenCode at camelStream with a custom OpenAI provider

OpenCode can register any OpenAI-compatible provider. camelStream exposes /v1/responses.

Providercamel-stream
Modelcamel-stream/auto
Base URLhttps://stream.camelai.com/v1
KeyCAMEL_API_KEY
Context window260K tokens guaranteed (see the fleet)

1. Install OpenCode

Terminal
curl -fsSL https://opencode.ai/install | bash

See the OpenCode install docs for other options.

2. Create a Stream key

Generate an API key in the Stream console. It is shown once.

3. Connect camelStream

The interactive path is the same one OpenRouter documents:

Terminal
cd /path/to/your/project
opencode

Inside OpenCode:

/connect
  1. Choose Other.
  2. Enter provider ID camel-stream.
  3. Paste your Stream key.
  4. Run /models.
  5. Select camel-stream/auto.

OpenCode stores the credential in its auth file, usually ~/.local/share/opencode/auth.json. Do not commit that file.

4. Optional config

If you want the provider and model in config as well, merge this into your user opencode.json and keep any providers you already have:

~/.config/opencode/opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "model": "camel-stream/auto",
  "provider": {
    "camel-stream": {
      "npm": "@ai-sdk/openai",
      "name": "camelStream",
      "options": {
        "baseURL": "https://stream.camelai.com/v1"
      },
      "models": {
        "auto": {
          "name": "camelStream Auto"
        }
      }
    }
  }
}

@ai-sdk/openai is the adapter for Stream's /v1/responses endpoint. See OpenCode providers.

camelStream queues requests when every subscribed stream is busy. OpenCode should keep the HTTP connection open. See Queues & errors.

What's next?