# DataRobot OpenCode plugin

> DataRobot OpenCode plugin - Try OpenCode, an open source terminal coding agent, wired to the
> DataRobot LLM Gateway with DataRobot agent skills preinstalled.

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-07-23T17:48:05.223078+00:00` (UTC).

## Primary page

- [DataRobot OpenCode plugin](https://docs.datarobot.com/en/docs/agentic-ai/cli/opencode-plugin.html.md): Full documentation for this topic (Markdown sidecar).

## Sections on this page

- [Quick start](https://docs.datarobot.com/en/docs/agentic-ai/cli/opencode-plugin.html.md#quick-start): In-page section heading.
- [Plugin configuration](https://docs.datarobot.com/en/docs/agentic-ai/cli/opencode-plugin.html.md#plugin-configuration): In-page section heading.
- [Use DataRobot agent skills](https://docs.datarobot.com/en/docs/agentic-ai/cli/opencode-plugin.html.md#use-datarobot-agent-skills): In-page section heading.
- [Already using Agent Assist?](https://docs.datarobot.com/en/docs/agentic-ai/cli/opencode-plugin.html.md#already-using-agent-assist): In-page section heading.
- [Update or remove the plugin](https://docs.datarobot.com/en/docs/agentic-ai/cli/opencode-plugin.html.md#update-or-remove-the-plugin): In-page section heading.
- [Related documentation](https://docs.datarobot.com/en/docs/agentic-ai/cli/opencode-plugin.html.md#related-documentation): In-page section heading.

## Related documentation

- [Agentic AI](https://docs.datarobot.com/en/docs/agentic-ai/index.html.md): Linked from this page.
- [CLI](https://docs.datarobot.com/en/docs/agentic-ai/cli/index.html.md): Linked from this page.
- [DataRobot agent skills](https://docs.datarobot.com/en/docs/agentic-ai/agentic-develop/agentic-skills.html.md): Linked from this page.
- [Agent Assist](https://docs.datarobot.com/en/docs/agentic-ai/agent-assist/index.html.md): Linked from this page.
- [DataRobot codespace](https://docs.datarobot.com/en/docs/workbench/wb-notebook/codespaces/index.html.md): Linked from this page.
- [Getting started](https://docs.datarobot.com/en/docs/agentic-ai/cli/getting-started.html.md): Linked from this page.
- [Agent Assist](https://docs.datarobot.com/en/docs/agentic-ai/agent-assist/agent-assist-skill.html.md): Linked from this page.
- [environment and commands reference](https://docs.datarobot.com/en/docs/agentic-ai/agent-assist/env-and-commands-reference.html.md): Linked from this page.

## Documentation content

The `dr opencode` plugin connects [OpenCode](https://opencode.ai/) (an open source AI coding agent that runs in your terminal) directly into the DataRobot LLM Gateway. Every model your account has access to through DataRobot is available inside a single tool, allowing you to switch models to suit the task at hand. The plugin also installs [DataRobot agent skills](https://docs.datarobot.com/en/docs/agentic-ai/agentic-develop/agentic-skills.html.md), including the [Agent Assist](https://docs.datarobot.com/en/docs/agentic-ai/agent-assist/index.html.md) skill.

## Quick start

To use the DataRobot OpenCode plugin, in a [DataRobot codespace](https://docs.datarobot.com/en/docs/workbench/wb-notebook/codespaces/index.html.md) or on your local machine, ensure you have the following:

- A DataRobot account with LLM Gateway access.
- TheDataRobot CLI. If you're running OpenCode locally (not in acodespace) and don't havedryet, install it with Homebrew: brewinstalldatarobot-oss/taps/dr-cli SeeGetting startedfor other installation methods (Linux, Windows, or a specific version).

Run the commands outlined below in the terminal of your preferred environment.

First, if you are using an older version of the CLI, update it to a version that supports the `opencode` plugin (v0.2.76 or later):

```
dr self update --force
```

Then, install the plugin and launch OpenCode:

```
# Install the OpenCode plugin
dr plugin install opencode

# Launch OpenCode
dr opencode
```

If you haven't already authenticated the CLI, `dr opencode` runs `dr auth login` first, since the plugin requires DataRobot credentials to reach the LLM Gateway. From there, the first launch installs the OpenCode binary for your platform and starts the terminal UI in your current directory. A DataRobot theme is active by default the first time you launch OpenCode. If you switch to a different theme with `/themes` (or the keybind Ctrl + X, then T), that choice is remembered on future `dr opencode` launches—there's no config file to edit by hand.

> [!TIP] Codespace terminal
> Inside a [codespace](https://docs.datarobot.com/en/docs/workbench/wb-notebook/codespaces/index.html.md), open the integrated terminal and run the same three commands. If `DATAROBOT_API_TOKEN` and `DATAROBOT_ENDPOINT` are already set in that environment, you may not need to run `dr auth login` separately.

## Plugin configuration

Each time you run `dr opencode`, the plugin generates a fresh OpenCode config in its own config directory— `$XDG_CONFIG_HOME/datarobot/opencode` (or `~/.config/datarobot/opencode` if `XDG_CONFIG_HOME` isn't set)—and points OpenCode at it for that session.

> [!NOTE] Config separation
> The plugin's config is separate from OpenCode's own default config location, so it never conflicts with an existing global OpenCode setup.

Because the plugin's manifest requires authentication, `dr` automatically forwards your DataRobot endpoint and API token to that process. The generated config uses them to register a `datarobot` provider backed by your organization's LLM Gateway catalog (defaulting to a Claude Sonnet 4.6 model from whichever provider offers one, or otherwise the first model in your catalog, until you pick one yourself).

Inside an OpenCode session, list and switch models with the `/models` command (or the keybind Ctrl + X, then M):

```
/models
```

Models appear as `datarobot/<model-name>`. You can also cycle recently used models with F2, or pin a specific model for a single launch:

```
dr opencode --model datarobot/<model-name>
```

This lets you pick a different model per task—for example, a fast model for quick edits and a stronger reasoning model for a tricky refactor—without leaving your terminal.

**Config files are regenerated on every launch**

The generated `opencode.json` and `tui.json` are rebuilt from scratch each time you run `dr opencode`, so don't hand-edit them—changes won't survive the next launch. The one exception is your model and theme picks: whatever you last selected with `/models` or `/themes` is read back from OpenCode's own state ( `~/.local/state/opencode`) and carried forward automatically, instead of resetting to the DataRobot default every time.

## Use DataRobot agent skills

The generated config also registers the `opencode-datarobot-skills` plugin, which installs the [DataRobot agent skills](https://github.com/datarobot-oss/datarobot-agent-skills) (including [Agent Assist](https://docs.datarobot.com/en/docs/agentic-ai/agent-assist/agent-assist-skill.html.md)) and DataRobot theme variants into OpenCode's skills and themes directories the first time it runs.

OpenCode surfaces installed skills to the agent automatically through its built-in `skill` tool—you don't need to load them manually. To see what's available or trigger one, just ask in the session, for example:

```
What DataRobot skills are available?
Use the datarobot-model-deployment skill to deploy this model.
```

## Already using Agent Assist?

If you've already configured [Agent Assist](https://docs.datarobot.com/en/docs/agentic-ai/agent-assist/index.html.md)'s external LLM settings, `dr opencode` picks up the same environment variables and routes to that model instead of the LLM Gateway catalog—no extra setup required:

| Variable | Effect in dr opencode |
| --- | --- |
| AGENT_ASSIST_LLM_BASE_URL | Adds the external model as an agent-assist provider and sets it as the default, alongside the LLM Gateway models. |
| AGENT_ASSIST_LLM_MODEL_NAME | The model name used for that provider. |
| AGENT_ASSIST_LLM_API_KEY | Credential for the external provider; also becomes the LLM Gateway catalog credential if no base URL is set. |
| AGENT_ASSIST_DISABLE_LLM_GATEWAY | Skips the LLM Gateway catalog fetch entirely and uses only the external model (requires AGENT_ASSIST_LLM_BASE_URL and AGENT_ASSIST_LLM_MODEL_NAME). |

See the [environment and commands reference](https://docs.datarobot.com/en/docs/agentic-ai/agent-assist/env-and-commands-reference.html.md) for what each variable does in Agent Assist itself.

## Update or remove the plugin

To update the plugin to the latest version, run:

```
dr plugin update opencode
```

```
dr plugin uninstall opencode
```

## Related documentation

For more information, see the following documentation:

- dr plugin command reference { target=_blank
- dr llm-gateway command reference
- DataRobot agentic skills
- OpenCode documentation
