The OpenCode provider connects DP Code to the OpenCode CLI agent. The provider kind isDocumentation 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.
opencode. DP Code can either launch OpenCode as a local subprocess or connect to an already-running OpenCode server using the serverUrl setting.
Prerequisites
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.
Settings
Configure the OpenCode provider underproviders.opencode in your DP Code server settings.
Path to the
opencode executable. Accepts a bare binary name resolved from PATH or an absolute path. Only used when serverUrl is not set.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"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.
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.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 selectsopenai/gpt-5 when no model is specified.
| Model slug | Display name |
|---|---|
openai/gpt-5 | OpenAI GPT-5 |
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:| Option | Description |
|---|---|
variant | Select a model variant if the model exposes multiple configurations. |
agent | Specify 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: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.