Harness Integrations

Connect Deploy-hosted models to your agent harness.

​Ported from (do not include in final docs, use as reference): https://thehive.ai/models/deepseek-ai/deepseek-v4.1-flash/harnesses/opencode

All models hosted on Deploy can be used inside your agent harness of choice. This guide gives you two paths:

  1. Agent-assisted: Prompt your current coding agent to generate a configuration for your model.
  2. Manual setup: Merge the provided config snippet into the config file yourself.

Connect to your agent harness

You will need to specify the following in your config:

SettingValue
Base URL

Region-dependent.

Closest: https://api.deploy.com/api/v1
SF: https://api-sf1.deploy.com/api/v1
VA: https://api-va1.deploy.com/api/v1

If you're accessing from outside the US, you may have lower latency with:

Closest: https://api-cdn.deploy.com/api/v1
SF: https://api-sf1-cdn.deploy.com/api/v1
VA: https://api-va1-cdn.deploy.com/api/v1

Model IDAny model key listed under Available models. The guide below uses deepseek-ai/deepseek-v4.1-flash as an example.
API KeyYour Deploy Secret Key from Service API Keys.

Agent-assisted installation

Make sure your current OpenCode model works, then paste the prompt below. It installs Deploy as a provider, resolves your API key safely, and walks you through verification.

Install Deploy (https://deploy.com) as a model provider in my OpenCode setup. Follow these steps exactly:

1. Detect my OS (Windows, macOS, or Linux) and pick the right global config path:
   - macOS/Linux: ~/.config/opencode/opencode.json
   - Windows: %USERPROFILE%\.config\opencode\opencode.json
   If the file does not exist, create it with this content. If it exists, MERGE the block below into it, keeping every other key I already have. If a project-level opencode.json exists in the current repo, ask me whether to put it there or globally before writing.
2. Merge in exactly this provider block (replace {DEPLOY_API_KEY} below; if the DEPLOY_API_KEY environment variable is already set in my environment, use it without asking; otherwise STOP and ask for my Deploy Secret Key, guiding me to get it first: log in at deploy.com, open Service API Keys in the left nav, use an existing Secret Key if I saved one, or click Create API Key to generate one and copy the Secret Key (it is shown only once, at generation time; the page lists Access Key IDs later, never Secret Keys), then paste it to you when you ask; do not invent a value):
   {
     "$schema": "https://opencode.ai/config.json",
     "model": "deploy/deepseek-ai/deepseek-v4.1-flash",
     "provider": {
       "deploy": {
         "npm": "@ai-sdk/openai-compatible",
         "name": "Deploy",
         "options": {
           "baseURL": "https://api-cdn.deploy.com/api/v1",
           "apiKey": "{DEPLOY_API_KEY}"
         },
         "models": {
           "deepseek-ai/deepseek-v4.1-flash": {
             "name": "Deepseek 4.1 Flash",
             "limit": { "context": 1000000, "output": 32768 },
             "modalities": {
               "input": ["text", "image"],
               "output": ["text"]
             }
           }
         }
       }
     }
   }
3. If I am a Virginia (VA1) customer, use baseURL api-va1.deploy.com/api/v1 for the provider instead. Otherwise keep https://api-cdn.deploy.com/api/v1.
4. Make sure the final file parses as valid JSON (validate it). Never print my API key back to me or commit it to any git repo.
5. Tell me to restart OpenCode, run /models, and select "Deploy / Deepseek 4.1 Flash". Then ask me to send a short test message to confirm it works.

Manual setup

Config file: opencode.json at the global path ~/.config/opencode/opencode.json (macOS/Linux), %USERPROFILE%.config\opencode\opencode.json (Windows), or the project-level opencode.json in the repo root. Global and project configs merge.

  1. Open or create the config file at one of the paths above. If a config already exists, keep every key you have (merge, don't overwrite). If your OpenCode version is older than 1.x, install or upgrade first with npm i -g opencode-ai.
  2. If you are a Virginia (VA1) customer, use https://api-va1.deploy.com/api/v1 as the base URL. Otherwise, use https://api-cdn.deploy.com/api/v1.
  3. Merge in this provider block, replacing {DEPLOY_API_KEY} with your Deploy Secret Key (create the key at deploy.com → navigation sidebar → Service API Keys → Create API Key):
{
  "$schema": "https://opencode.ai/config.json",
  "model": "deploy/deepseek-ai/deepseek-v4.1-flash",
  "provider": {
    "hive-ai": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Deploy",
      "options": {
        "baseURL": "https://api-cdn.deploy.com/api/v1",
        "apiKey": "{DEPLOY_API_KEY}"
      },
      "models": {
        "deepseek-ai/deepseek-v4.1-flash": {
          "name": "Deepseek 4.1 Flash",
          "limit": { "context": 1000000, "output": 32768 },
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          }
        }
      }
    }
  }
}
  1. Restart OpenCode so the config reloads (quit and relaunch, or /exit and re-run opencode), open the model picker (/models), select Deploy / Deepseek 4.1 Flash, and send:

    Reply with the single word: connected