rezzminator

GPT Gateway — AI skill for Claude Code

AI community

Local passthrough between Claude Code and the Anthropic API with a middleware hook API, and a ChatGPT route that runs GPT models as Claude Code sub-agents.

How to install GPT Gateway

This entry records only its repository, not the path inside it, so there is no exact command to give. Open rezzminator/gpt-gateway and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What GPT Gateway does

Local passthrough between Claude Code and the Anthropic API with a middleware hook API, and a ChatGPT route that runs GPT models as Claude Code sub-agents.

Alternatives in AI

  • Deepreasoning — A high-performance LLM inference API and Chat UI that integrates DeepSeek R1's CoT reasoning traces with Anthr 5.4k ★
  • WindsurfAPI — Turn Windsurf / Devin Desktop's 100+ AI models (Claude, GPT, Gemini, DeepSeek, Kimi, GLM, SWE) into OpenAI-, A 3k ★
  • Claude To ChatGPT — This project converts the API of Anthropic's Claude model to the OpenAI Chat API format 1.3k ★

README

gpt-gateway

A local passthrough between Claude Code and the Anthropic API, with a middleware hook API.

Claude Code reaches it through `ANTHROPIC_BASE_URL=http://127.0.0.1:18787`. By default, every request goes to `https://api.anthropic.com` byte for byte, and every response streams back chunk by chunk as it arrives. Your login (`Authorization`, `x-api-key`) passes through and is never logged or captured. Middleware you install can watch requests and responses, add a note to the request's database row, and edit a request body; with no middleware the default route changes nothing. The optional [ChatGPT route](#chatgpt-route) runs GPT sub-agents over your ChatGPT subscription.

The supervisor points Claude Code at the gateway only while the gateway answers, and removes that setting whenever it is down, so a broken gateway never cuts Claude Code off (§ Fail-open).

macOS, Python 3.9+ standard library only (`/usr/bin/python3`), `jq` for the settings edits.

Install, update, remove

launchd/install.sh            # install or update; --port N (default 18787)
~/.local/share/gpt-gateway/ctl.sh status
launchd/uninstall.sh          # --purge also deletes the logs and the database

`install.sh` runs the unit tests first and refuses to install when one fails: it keeps the whole run in `~/Library/Logs/gpt-gateway-install-tests.log` (`uninstall.sh --purge` deletes it), prints that path and the names of the failing tests, and stops a run still going after `GPT_GATEWAY_TEST_SECONDS` (default 1800) with every thread's stack at the end of the log. It copies `gateway.py`, the `gpt_gateway/` package (all Python sources, preserving subdirectories), `run.sh`, `ctl.sh`, this README, the LICENSE and `THIRD_PARTY_NOTICES.md` to `~/.local/share/gpt-gateway/`, creates a `middleware` directory there and copies the shipped middleware into it (each file replaces only its own copy, so your own modules stay), writes `settings.json` on a first install, listing `status_label` (§ Ship