Skip to main content
Route every model call OpenCode Desktop makes through the Orq.ai AI Gateway by adding a custom provider in the app. Requests appear in Traces automatically.

Prerequisites

  • OpenCode Desktop installed:
Homebrew
Or download the installer from opencode.ai/download.

Setup

In OpenCode Desktop, open Settings > Providers > Connect custom provider and fill in:
  • ID: orq
  • Display name: Orq
  • Base URL: https://my.orq.ai/v3/router
  • API key: your Orq.ai API key
  • Model ID: any identifier from the AI Gateway catalog, for example anthropic/claude-sonnet-5, with a display name
Add more models by giving each its own Model ID and display name. Pick the model from the model selector in the chat input bar.
OpenCode Desktop custom provider form filled in with the Orq ID, Orq display name, router base URL, API key, and a model ID

Connecting Orq.ai as a custom provider in OpenCode Desktop

Connect via MCP

OpenCode Desktop is an MCP client, so it can reach the Orq MCP server and the MCP Gateway alongside the gateway routing above. The Orq MCP server manages Agents, experiments, Datasets, and Traces; the MCP Gateway serves the tools, resources and prompts of the MCP Servers linked to it. Register the MCP Gateway with the OpenCode CLI, which writes the same config:
OAuth is on by default for remote servers, and the sign-in dialog opens in the desktop app.
The Orq MCP server is a second entry in the same mcp object in ~/.config/opencode/opencode.json:
Replace YOUR_ORQ_API_KEY with an API key. See the MCP Quickstart for the full tool reference.
Orq.ai API keys are scoped to a single project, so the Orq MCP server only exposes the Agents, experiments, Datasets, and Traces within that project. Use a key from the project whose entities OpenCode Desktop should manage.

Verification

Send a prompt in OpenCode Desktop. The response appears in the app and the trace appears in Orq.ai Traces with the selected model identifier.