Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Emanuele-web04/dpcode/llms.txt

Use this file to discover all available pages before exploring further.

The OpenCode provider connects DP Code to the OpenCode CLI agent. The provider kind is opencode. DP Code can either launch OpenCode as a local subprocess or connect to an already-running OpenCode server using the serverUrl setting.

Prerequisites

1

Install OpenCode CLI

Install OpenCode using the official installer or npm:
npm i -g opencode-ai
Verify the installation:
opencode --version
2

Configure a model provider

OpenCode requires at least one LLM provider to be configured (for example, an OpenAI API key). Follow the OpenCode documentation to set up credentials.
3

Confirm the binary is on your PATH

DP Code looks for opencode on PATH by default. Set binaryPath if you installed it elsewhere.

Settings

Configure the OpenCode provider under providers.opencode in your DP Code server settings.
providers.opencode.binaryPath
string
default:"opencode"
Path to the opencode executable. Accepts a bare binary name resolved from PATH or an absolute path. Only used when serverUrl is not set.
providers.opencode.serverUrl
string
default:""
URL of a running OpenCode server to connect to instead of launching a new process. When set, DP Code skips spawning the binary and connects directly to this URL.Example: "http://127.0.0.1:4096"
providers.opencode.serverPassword
string
default:""
Password used to authenticate with the OpenCode server. DP Code sends this as a Basic Auth credential alongside requests. Leave empty if the server does not require authentication.
providers.opencode.customModels
string[]
default:"[]"
List of additional model slugs to make available in the model picker. OpenCode model slugs use the format provider/model-id (for example, openai/gpt-4o). Each entry must be a non-empty string with a maximum of 256 characters.
providers.opencode.enabled
boolean
default:"true"
Set to false to disable the OpenCode provider. Existing sessions continue until you reload.

Model selection

The following model is available by default. DP Code selects openai/gpt-5 when no model is specified.
Model slugDisplay name
openai/gpt-5OpenAI GPT-5
OpenCode surfaces all models it has access to at runtime. Use customModels to pre-populate additional slugs in the DP Code model picker before a session connects. The full list of available models depends on which provider credentials you have configured in OpenCode.
OpenCode model slugs follow the provider/model-id format. For example, anthropic/claude-sonnet-4-5 or google/gemini-2.5-pro. You can find available slugs by running opencode models in your terminal.

Model options

OpenCode models support two additional options you can set in the model options panel:
OptionDescription
variantSelect a model variant if the model exposes multiple configurations.
agentSpecify which agent definition to use for this session.

Connecting to an external server

If you are already running an OpenCode server (for example, as a background service or on a remote machine), you can connect DP Code to it without launching a new process:
{
  "providers": {
    "opencode": {
      "serverUrl": "http://127.0.0.1:4096",
      "serverPassword": "your-server-password"
    }
  }
}
When serverUrl is set, DP Code ignores binaryPath and connects directly to the running server.

OpenCode documentation

Setup guides, configuration reference, and provider credentials for OpenCode.

OpenCode repository

Source code and releases for the OpenCode CLI.

Build docs developers (and LLMs) love