Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 145 additions & 0 deletions apps/docs/content/guides/opencode-desktop.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
---
title: OpenCode Desktop Integration
description: Connect OpenCode Desktop to 210+ models through LLM Gateway. No config files — just open Settings, connect, and start building.
icon: OpenCode
---

import { Step, Steps } from "fumadocs-ui/components/steps";
import { Callout } from "fumadocs-ui/components/callout";

[OpenCode Desktop](https://opencode.ai/download) is the GUI desktop app version of OpenCode — an open-source AI coding agent with a full visual interface for managing providers, models, and sessions. LLM Gateway is a built-in provider, so setup takes under a minute with no config files required.

<Callout type="info">
Looking for the CLI version? See the [OpenCode CLI guide](/guides/opencode).
</Callout>

## Prerequisites

- OpenCode Desktop installed — [download for Windows or macOS](https://opencode.ai/download)
- An LLM Gateway API key — [sign up free](https://llmgateway.io/signup) (no credit card required)

## Installation

Download OpenCode Desktop from [opencode.ai/download](https://opencode.ai/download) and install it for your platform:

- **macOS (Apple Silicon)** — `.dmg` installer
- **macOS (Intel)** — `.dmg` installer
- **Windows** — `.exe` installer

You can also install on macOS via Homebrew:

```bash
brew install --cask opencode-desktop
```

## Setup

<Steps>
<Step>
### Open Providers Settings

Launch OpenCode Desktop. Click the **Providers** section in the left sidebar under **Server**. You'll see the list of built-in providers:

![OpenCode Desktop Providers screen](../../public/guides/opencode-desktop/0-providers.png)

</Step>

<Step>
### Find LLM Gateway

Click **Show more providers** at the bottom of the list, or click **+ Connect** on any entry to open the provider search. Type `LLM` in the search box — **LLM Gateway** will appear under "Other":

![Searching for LLM Gateway](../../public/guides/opencode-desktop/1-search-llm.png)

Select **LLM Gateway** from the list.

</Step>

<Step>
### Enter Your API Key

OpenCode will show the **Connect LLM Gateway** dialog. Paste your LLM Gateway API key (starts with `llmgtwy_`) and click **Continue**:

![Connect LLM Gateway — enter API key](../../public/guides/opencode-desktop/2-connect-api-key.png)

[Sign up](https://llmgateway.io/signup) or log in to your LLM Gateway dashboard and navigate to **API Keys** to get your key.

</Step>

<Step>
### Select a Model

Once connected, open the model picker from the chat input bar. Type `llm` to filter LLM Gateway models — you'll see all available models including Claude Opus 4.7, Claude Sonnet 4.6, DeepSeek, Gemini, and more:

![LLM Gateway model selection](../../public/guides/opencode-desktop/3-model-selection.png)

</Step>

<Step>
### Start Building

Select a model and start chatting. All requests route through LLM Gateway — you'll see usage, costs, and logs in your [dashboard](https://llmgateway.io/dashboard):

![OpenCode Desktop chat active with LLM Gateway](../../public/guides/opencode-desktop/4-chat-active.png)

</Step>
</Steps>

## Why Use LLM Gateway with OpenCode Desktop

- **210+ models** — Claude, GPT, Gemini, Llama, DeepSeek, and more from 60+ providers
- **One API key** — Stop managing separate keys for each provider
- **Cost tracking** — See exactly what each session costs in your dashboard
- **Response caching** — Repeated requests hit cache automatically
- **Automatic fallback** — If a provider is down, requests route to an alternative
- **Volume discounts** — Check [discounted models](https://llmgateway.io/models?discounted=true) for savings up to 90%

## Switching Models

You can switch models at any time from the model picker in the chat input bar. Click the current model name, type `llm` to filter to LLM Gateway models, and select a new one. The switch takes effect immediately for the next message.

## Locking to a Specific Provider

By default, LLM Gateway automatically fails over to alternative providers if your chosen provider is experiencing downtime. To disable fallback for a specific model, you can pass the `X-No-Fallback` header via a custom `opencode.json` in your project root:

```json
{
"provider": {
"llmgateway": {
"options": {
"headers": {
"X-No-Fallback": "true"
}
}
}
}
}
```

<Callout type="warn">
Disabling fallback means requests will fail if the chosen provider is down.
See the [routing docs](/docs/features/routing) for details.
</Callout>

## Troubleshooting

### LLM Gateway doesn't appear in provider list

Click **Show more providers** at the bottom of the Providers page to expand the full list, then search for "LLM".

### Authentication errors

Make sure your API key starts with `llmgtwy_` and is active. Check your [dashboard](https://llmgateway.io/dashboard) to confirm the key is valid.

### Models not loading after connect

Try disconnecting and reconnecting the provider from Settings > Providers. If models still don't load, check your internet connection and verify the key is valid.

<Callout type="info">
View all available models on the [models page](https://llmgateway.io/models).
</Callout>

<Callout type="info">
Need help? Join our [Discord community](https://llmgateway.io/discord) for
support and troubleshooting assistance.
</Callout>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion apps/ui/src/components/integrations/integration-cards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,19 @@ const integrations: Integration[] = [
{
name: "OpenCode",
description:
"Use LLM Gateway with OpenCode for AI-powered development workflows.",
"Use LLM Gateway with OpenCode CLI for AI-powered development workflows.",
href: "/guides/opencode",
icon: OpenCodeIcon,
comingSoon: false,
},
{
name: "OpenCode Desktop",
description:
"Use LLM Gateway with OpenCode Desktop app — connect via GUI, no config files needed.",
href: "/guides/opencode-desktop",
icon: OpenCodeIcon,
comingSoon: false,
},
{
name: "OpenClaw",
description:
Expand Down
91 changes: 91 additions & 0 deletions apps/ui/src/content/guides/opencode-desktop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
id: opencode-desktop
slug: opencode-desktop
title: OpenCode Desktop Integration
description: Connect OpenCode Desktop to 210+ models through LLM Gateway. No config files — just open Settings, connect, and start building.
date: 2026-05-11
---

[OpenCode Desktop](https://opencode.ai/download) is the GUI desktop app version of OpenCode — an open-source AI coding agent with a full visual interface for managing providers, models, and sessions. LLM Gateway is a built-in provider, so setup takes under a minute with no config files required.

## Prerequisites

- OpenCode Desktop installed — [download for Windows or macOS](https://opencode.ai/download)
- An LLM Gateway API key — [sign up free](/signup) (no credit card required)

## Installation

Download OpenCode Desktop from [opencode.ai/download](https://opencode.ai/download) and install it for your platform:

- **macOS (Apple Silicon)** — `.dmg` installer
- **macOS (Intel)** — `.dmg` installer
- **Windows** — `.exe` installer

You can also install on macOS via Homebrew:

```bash
brew install --cask opencode-desktop
```

## Setup

### Step 1: Open Providers Settings

Launch OpenCode Desktop. Click the **Providers** section in the left sidebar under **Server**. You'll see the list of built-in providers:

![OpenCode Desktop Providers screen](/images/guides/opencode-desktop/0-providers.png)

### Step 2: Find LLM Gateway

Click **Show more providers** at the bottom of the list, or click **+ Connect** on any entry to open the provider search. Type `LLM` in the search box — **LLM Gateway** will appear under "Other":

![Searching for LLM Gateway](/images/guides/opencode-desktop/1-search-llm.png)

Select **LLM Gateway** from the list.

### Step 3: Enter Your API Key

OpenCode will show the **Connect LLM Gateway** dialog. Paste your LLM Gateway API key (starts with `llmgtwy_`) and click **Continue**:

![Connect LLM Gateway — enter API key](/images/guides/opencode-desktop/2-connect-api-key.png)

[Sign up](/signup) or log in to your LLM Gateway dashboard and navigate to **API Keys** to get your key.

### Step 4: Select a Model

Once connected, open the model picker from the chat input bar. Type `llm` to filter LLM Gateway models — you'll see all available models including Claude Opus 4.7, Claude Sonnet 4.6, DeepSeek, Gemini, and more:

![LLM Gateway model selection](/images/guides/opencode-desktop/3-model-selection.png)

### Step 5: Start Building

Select a model and start chatting. All requests route through LLM Gateway — you'll see usage, costs, and logs in your [dashboard](/dashboard):

![OpenCode Desktop chat active with LLM Gateway](/images/guides/opencode-desktop/4-chat-active.png)

## Why Use LLM Gateway with OpenCode Desktop?

- **210+ models** — Claude, GPT, Gemini, Llama, DeepSeek, and more from 60+ providers
- **One API key** — Stop managing separate keys for each provider
- **Cost tracking** — See exactly what each session costs in your dashboard
- **Response caching** — Repeated requests hit cache automatically
- **Automatic fallback** — If a provider is down, requests route to an alternative
- **Volume discounts** — Check [discounted models](/models?discounted=true) for savings up to 90%

## Switching Models

You can switch models at any time from the model picker in the chat input bar. Click the current model name, type `llm` to filter to LLM Gateway models, and select a new one. The switch takes effect immediately for the next message.

## Troubleshooting

### LLM Gateway doesn't appear in provider list

Click **Show more providers** at the bottom of the Providers page to expand the full list, then search for "LLM".

### Authentication errors

Make sure your API key starts with `llmgtwy_` and is active. Check your [dashboard](/dashboard) to confirm the key is valid.

### Models not loading after connect

Try disconnecting and reconnecting the provider from Settings > Providers. If models still don't load, check your internet connection and verify the key is valid.
Loading