Status: [LIVE] Endpoints found: https://martinforreal.github.io/ghc-proxy https://update.code.visualstudio.com/api/releases/stable` Source: https://github.com/MartinForReal/ghc-proxy # ghc-proxy ![ghc-proxy dashboard showing token consumption, remaining quota, and request traffic](docs/assets/dashboard.png) *Dashboard overview with example traffic.* A **GitHub Copilot API proxy** written in Rust. It exposes standard **OpenAI** and **Anthropic** compatible HTTP endpoints so any tool (Claude Code, the Codex CLI, OpenAI/Anthropic SDKs, etc.) can talk to GitHub Copilot models. This is a Rust backend port of the [`ghc-tunnel`](https://www.npmjs.com/package/ghc-tunnel) Node.js project. 📖 **Documentation:** 🧩 **Single-port Headroom deployment:** [run Copilot transport inside Headroom](https://martinforreal.github.io/ghc-proxy/headroom-plugin.html) ## Quick Start ```bash # Build cargo build --release # Run — on first launch in a terminal this opens the interactive setup wizard ./target/release/ghc-proxy # Re-run the setup wizard at any time ./target/release/ghc-proxy --setup # Generate the default config file non-interactively and exit ./target/release/ghc-proxy --config ``` On a first run with no config file, when launched from a terminal, the proxy opens an **interactive setup wizard** that signs you in to GitHub (Device Flow), fetches the live model catalog, and helps you configure model mappings. In headless or piped contexts the wizard is skipped: the proxy falls back to GitHub Device Flow auth (or a `*_TOKEN` environment variable) and a default config file. ## Features - **OpenAI-compatible** `/v1/chat/completions` and `/v1/responses` endpoints (with Codex adapters: `apply_patch` tool rewrite, `X-Initiator` header, context compaction trimming, `service_tier` nulling, unsupported-tool stripping). Codex model discovery is negotiated through its `client_version` query so per-model context windows come from the live Copilot catalog. - **Anthropic-compatible** `/v1/messages` endpoint (direct passthrough when the upstream model supports it, otherwise translated through chat com