Skip to navigation

Claude Desktop

Point Claude Desktop's gateway inference provider at Gateway

Claude Desktop can route all its inference (Chat, Cowork, and the built-in Claude Code surface) through Gateway. Configure one machine in the app, or a fleet with MDM. Shared setup: Building with coding agents.

Configure Claude Desktop

  1. Open Developer → Configure Third-Party Inference. If it’s hidden, first enable Help → Troubleshooting → Enable Developer Mode.
  2. In Connection, set the inference provider to Gateway
  3. Fill in the Gateway credentials card from the table below
  4. Click Test connection, which runs model discovery and then a real inference request
  5. In Models, turn on Model discovery and click Test model discovery
  6. Click Apply Locally, restart the app, and send a prompt
FieldValue
Credential kindStatic API key
Gateway base URLhttps://api-gateway.merge.dev/v1/anthropic, with no trailing slash
Gateway API keyYour mg_... key
Gateway auth schemebearer, or x-api-key if your network strips Authorization headers

For identity-provider sign-in, set Credential kind to Interactive sign-in and follow Anthropic’s SSO setup.

Model discovery

With discovery on, the picker loads from https://api-gateway.merge.dev/v1/anthropic/v1/models at launch, so new models appear without config changes. Desktop normally hides non-Claude models, so Gateway formats the list to keep the full chat catalog, your organization’s aliases, and default_routing, omitting image, audio, video, and embedding models since they can’t answer chat. If a Desktop update hides non-Claude models before Gateway catches up, pin a model list.

Pin a fixed model list

Add entries under Model list (inferenceModels) to curate the picker. Each takes a Model ID (the exact Gateway ID, such as openai/gpt-5.5) and a Display name, and the first is the default for new sessions. A non-empty list replaces discovery, so include every model you want.

Turn on Offer 1M-context variant (supports1m) only for models confirmed to take 1M-token requests through Gateway. The app can’t check, and the entry fails otherwise.

Scope to a project

The Anthropic endpoint has no project_id body field. Use a project API key, or with an organization key add X-Project-Id under Custom inference headers.

Managed configuration (MDM, for fleets)

Export produces a .mobileconfig (macOS) or .reg (Windows) from the settings above; Anthropic’s configuration reference covers delivery. The equivalent keys:

{
"inferenceProvider": "gateway",
"inferenceGatewayBaseUrl": "https://api-gateway.merge.dev/v1/anthropic",
"inferenceGatewayApiKey": "mg_...",
"inferenceGatewayAuthScheme": "bearer",
"modelDiscoveryEnabled": true
}

Set inferenceModels to pin the fleet’s picker; if every entry is a full model ID, the app skips discovery.

Troubleshooting

SymptomCause and fix
Inference check fails with 400 vendor_restrictions_unavailableThe model the app picked has no vendor your organization’s vendor or region restrictions allow. Relax the restriction, or pin an allowed model first in Model list.
Test connection returns 401The key is wrong or revoked. Check it on the API keys page, and try the other auth scheme in case a proxy strips Authorization.
Discovery finds nothing or times outThe base URL must be exactly https://api-gateway.merge.dev/v1/anthropic with no redirecting proxy, since the app treats a redirect as failure. With discovery failing and an empty Model list, the picker is empty.
A chat model is missing from the pickerPin it under Model list with its exact Gateway ID

Next steps