* feat(gateway): add Merge Gateway provider Co-authored-by: MatthewFeroz <136640686+MatthewFeroz@users.noreply.github.com> * fix(merge-gateway): preserve scoped credentials across profiles Co-authored-by: MatthewFeroz <136640686+MatthewFeroz@users.noreply.github.com> * fix: complete Merge Gateway credential and catalog handoffs Co-authored-by: MatthewFeroz <136640686+MatthewFeroz@users.noreply.github.com> * fix: constrain Merge catalog and admit provider env-file credentials Co-authored-by: MatthewFeroz <136640686+MatthewFeroz@users.noreply.github.com> * fix: preserve Merge credential ownership across profile and host settings Co-authored-by: MatthewFeroz <136640686+MatthewFeroz@users.noreply.github.com> * fix(merge-gateway): scope ambient key adoption and per-page discovery timeouts Co-authored-by: MatthewFeroz <136640686+MatthewFeroz@users.noreply.github.com> --------- Co-authored-by: MatthewFeroz <136640686+MatthewFeroz@users.noreply.github.com>
2.2 KiB
Merge Gateway setup
OpenClaude connects to Merge Gateway through its OpenAI-compatible endpoint at https://api-gateway.merge.dev/v1/openai. The route supports Merge's multi-provider model catalog and routing policies with a dedicated MERGE_GATEWAY_API_KEY.
Guided setup
- Create an API key in the Merge Gateway dashboard.
- Start OpenClaude and run
/provider. - Choose Add provider, then Merge Gateway.
- Paste the API key when prompted.
- Choose a discovered model, or select Default routing policy to let the applicable Merge routing policy choose the provider and model.
- Choose Chat Completions or Responses for the API format supported by the selected model and route.
The model picker keeps a cached catalog for one day and can be refreshed manually. If discovery is temporarily unavailable, the routing-policy and GPT-5.5 fallback entries remain selectable.
CLI setup
export MERGE_GATEWAY_API_KEY="your-api-key"
openclaude --provider merge-gateway --model openai/gpt-5.5
To delegate model selection to a Merge Gateway routing policy:
openclaude --provider merge-gateway --model default_routing
The dedicated Merge credential is not replaced by OPENAI_API_KEY. Saved profiles retain it across restarts. It is used only with the canonical inference base above and the native catalog endpoint below; changing a Merge profile to a proxy or another path withholds the credential. Configure a custom OpenAI-compatible profile with its own credentials for a proxy.
Verify
Inside OpenClaude:
- Run
/statusand confirm the active provider is Merge Gateway and the base URL ishttps://api-gateway.merge.dev/v1/openai. - Run
/model, refresh the catalog, and confirm Merge Gateway models appear. - Send a short prompt and confirm the request appears in the Gateway dashboard.
For direct catalog troubleshooting, use the authenticated public model endpoint:
curl --fail --silent --show-error \
-H "Authorization: Bearer $MERGE_GATEWAY_API_KEY" \
"https://api-gateway.merge.dev/v1/models?limit=5"
Never commit the API key or paste it into issue or pull-request text.