DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to point Claude Code at your own OpenAI-compatible gateway with Setup Gateway

Write the gateway URL, key, and model into Claude Code settings without losing existing config.

Short answer: Clone the repo and run node bin/setup-gateway.mjs claude in a terminal to start the interactive setup; then Enter the Base URL, the API key, and pick a model from the list that appears; Restart Claude Code so the new env values are read. All steps.

Credentials. The API key is written in plaintext into the Claude Code config file, so restrict that file's permissions and do not commit it.

Who it is forA developer or team lead who wants Claude Code to route through a company LiteLLM, OpenRouter, or internal proxy instead of the default endpoint.

The problemEditing ~/.claude/settings.json by hand is error prone, and a wrong edit can break other environment settings the user already relies on.

The outcomeClaude Code uses the chosen gateway, the original settings are kept, and a timestamped backup exists for rollback.

What you need first

  • Node.js 18 or newer installed
  • A gateway base URL that exposes /v1 and an API key for it
  • A model id the gateway serves, or access to GET /v1/models so the picker can list them
  • For Codex: a gateway that serves the Responses API (/v1/responses)

Steps

  1. Clone the repo and run node bin/setup-gateway.mjs claude in a terminal to start the interactive setup.
  2. Enter the Base URL, the API key, and pick a model from the list that appears.
  3. Restart Claude Code so the new env values are read.
  4. Run node setup-gateway.mjs status to confirm the base URL and model (the key is shown masked).

Prompt for your agent

Work in the cloned repo Sinholms/setup-gateway. Run `node bin/setup-gateway.mjs claude --base-url <GATEWAY_BASE_URL> --api-key <API_KEY> --model <MODEL_ID> --yes` and report the written file path. Then run `node setup-gateway.mjs status` and verify the printed base URL and model match the values passed in.

Caveat. Base URLs that start with http:// trigger a warning and need y/N confirmation, or --yes in non-interactive mode, because the key is sent without TLS.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for Sinholms/setup-gateway and "Point Claude Code at your own OpenAI-compatible gateway"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer