Skip to content
Open
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
11 changes: 11 additions & 0 deletions packages/opencode/src/provider/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,17 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
},
},
}),
"llmgateway-providers": () =>
Effect.succeed({
autoload: false,
options: {
headers: {
"HTTP-Referer": "https://opencode.ai/",
"X-Title": "opencode",
"X-Source": "opencode",
},
},
}),
openrouter: () =>
Effect.succeed({
autoload: false,
Expand Down
6 changes: 5 additions & 1 deletion packages/opencode/src/provider/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,11 @@ export function smallOptions(model: Provider.Model) {
const base = { store: false }
return mergeDeep(base, small)
}
if (model.providerID === "openrouter" || model.providerID === "llmgateway") {
if (
model.providerID === "openrouter" ||
model.providerID === "llmgateway" ||
model.providerID === "llmgateway-providers"
) {
if (Object.keys(small).length === 0 && model.api.id.includes("google")) {
return { reasoning: { enabled: false } }
}
Expand Down
7 changes: 6 additions & 1 deletion packages/web/src/content/docs/providers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1819,9 +1819,14 @@ OpenCode Zen is a list of tested and verified models provided by the OpenCode te

### LLM Gateway

LLM Gateway exposes two providers, both served by the same endpoint and API key:

- **DevPass (LLM Gateway)** — `llmgateway`: aggregated model IDs such as `claude-sonnet-5`, auto-routed by the gateway across upstream providers.
- **LLM Gateway** — `llmgateway-providers`: provider-pinned model IDs such as `anthropic/claude-sonnet-5`, each entry served by that specific upstream provider with its own pricing and limits.

1. Head over to the [LLM Gateway dashboard](https://llmgateway.io/dashboard), click **Create API Key**, and copy the key.

2. Run the `/connect` command and search for LLM Gateway.
2. Run the `/connect` command and search for LLM Gateway, then pick either provider.

```txt
/connect
Expand Down