camelAI Documentation

Start Here

Use OpenCode

Point OpenCode at Camel Stream with a custom OpenAI provider

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

Providercamel-stream
Modelcamel-stream/deepseek-v4-flash
Base URLhttps://stream.camelai.com/v1
KeyCAMEL_API_KEY
Context window256k input tokens

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 Camel Stream

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/deepseek-v4-flash.

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/deepseek-v4-flash",
  "provider": {
    "camel-stream": {
      "npm": "@ai-sdk/openai",
      "name": "Camel Stream",
      "options": {
        "baseURL": "https://stream.camelai.com/v1"
      },
      "models": {
        "deepseek-v4-flash": {
          "name": "DeepSeek V4 Flash"
        }
      }
    }
  }
}

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

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

What's next?