OpenScale / Agent setup

Your agent. OpenScale models.

One prompt to get connected. Your existing setup stays yours.

Connect your agent

Choose your agent, then paste the setup prompt into a session. It will follow the guide and help you enter your API key locally.

1. Have an OpenScale account, an API key and credits ready.

2. Paste this into OpenCode, or another agent that can configure it.

Read https://openscale.so/setup.md and follow the OpenCode recipe to configure OpenScale on this machine. Preserve my existing configuration and verify the connection. Guide me through entering my API key locally if needed.

Tested with OpenCode 1.18.30, including file and shell tools.

Set up OpenCode manually

This recipe uses the OpenCode 1.x provider schema. Check opencode --version first. OpenCode 2 beta uses a different schema; do not apply this file to v2.

  1. Merge the provider configuration.

    Default path: ~/.config/opencode/opencode.json. Back up your file first. Merge only provider.openscale into your active OpenCode JSON/JSONC configuration. Respect XDG_CONFIG_HOME, OPENCODE_CONFIG and project overrides. Keep existing providers, model defaults and filters.

    {
      "$schema": "https://opencode.ai/config.json",
      "provider": {
        "openscale": {
          "npm": "@ai-sdk/openai-compatible",
          "name": "OpenScale",
          "env": [
            "OPENSCALE_API_KEY"
          ],
          "options": {
            "baseURL": "https://api.openscale.so/v1"
          },
          "models": {
            "qwen/qwen3.6-35b-a3b": {
              "name": "Qwen 3.6 35B A3B",
              "tool_call": true,
              "reasoning": true,
              "interleaved": {
                "field": "reasoning_content"
              },
              "modalities": {
                "input": [
                  "text"
                ],
                "output": [
                  "text"
                ]
              },
              "limit": {
                "context": 131072,
                "output": 32768
              },
              "cost": {
                "input": 0.005,
                "output": 0.045,
                "cache_read": 0.0025
              }
            },
            "deepseek/deepseek-v4.1-flash": {
              "name": "DeepSeek V4.1 Flash",
              "tool_call": true,
              "reasoning": true,
              "interleaved": {
                "field": "reasoning_content"
              },
              "modalities": {
                "input": [
                  "text"
                ],
                "output": [
                  "text"
                ]
              },
              "limit": {
                "context": 1048576,
                "output": 384000
              },
              "cost": {
                "input": 0.12,
                "output": 0.48,
                "cache_read": 0.006
              }
            }
          }
        }
      }
    }
    
  2. Enter your key locally.

    In OpenCode, run /connect, choose Other, enter openscale as the provider ID, and enter your API key locally. Alternatively, set OPENSCALE_API_KEY in the environment that launches OpenCode. Never paste your key into an agent conversation.

  3. Choose a model.

    Reopen OpenCode after saving the configuration. Run opencode models openscale to check discovery. Open OpenCode, use /models, and choose openscale/qwen/qwen3.6-35b-a3b.

  4. Verify the connection.

    Ask the agent to reply with “OK”, then try a harmless read-only tool such as reporting the current directory. Confirm OpenScale is selected. A small test uses account credits.

These configurations add text models and leave your default model selection to you. Displayed costs are estimates; check your OpenScale dashboard for actual usage.

Troubleshooting and undo · Official OpenCode documentation

Building your own integration? Read the API reference. Plain Markdown guide · llms.txt