Status: [LIVE] Endpoints found: https://api.openai.com/v1/ Source: https://github.com/BackFire/gpt-model-proxy # gpt-model-proxy A small Go reverse proxy for OpenAI-compatible APIs. It routes requests by model or rewrites request JSON fields and headers before forwarding them to a configurable upstream. Primary use case: point Codex at this local proxy and route GPT-6 Astra, Sol, 6.1 Sol, Luna, and internal requests such as `codex-auto-review` to backend-supported models. ## Features - Rewrites the top-level JSON `model` field. - Routes different request models to independent upstreams. - Listens on multiple configured addresses in one process. - Replaces `Authorization` with the selected route's API key. - Rewrites non-Codex `User-Agent` headers. - Supports configurable upstream `base_url`. - Streams upstream responses through `httputil.ReverseProxy`. - No third-party runtime dependencies. ## Build Requires Go 1.26 or newer. ```bash go build -o bin/gpt-model-proxy ./cmd/gpt-model-proxy ``` ## Install ```bash mkdir -p "$HOME/.local/bin" go build -o "$HOME/.local/bin/gpt-model-proxy" ./cmd/gpt-model-proxy mkdir -p "$HOME/.config/gpt-model-proxy" ``` The installed binary path is `$HOME/.local/bin/gpt-model-proxy`. ## Configuration Default config path: ```text $HOME/.config/gpt-model-proxy/config.json ``` Start from the checked-in example: ```bash mkdir -p "$HOME/.config/gpt-model-proxy" cp config/config.example.json "$HOME/.config/gpt-model-proxy/config.json" ``` For an existing installation, merge the example into your config instead of overwriting it. Before starting the proxy, replace the example upstream URLs and provide each route's credentials. Example fields: ```json { "listen_addrs": [ "127.0.0.1:8787" ], "routes": { "gpt-6-astra": { "upstream_base_url": "https://cds.example/v1/", "api_key_env": "GMP_CDS_API_KEY" }, "gpt-6-sol": { "upstream_base_url": "https://cds.example/v1/", "upstream_model": "gpt-6.1-sol", "api_key_env": "GMP_CDS_API_KEY" }, "gpt-6.1-sol": { "upstream_base_url": "ht