Status: [UNTESTED] Endpoints found: http://localhost:8000/v1/chat/completions http://localhost:8000/v1/ http://localhost:8001/v1/messages http://localhost:8000/v1/responses Source: https://github.com/hamachi-dev/polyllm-gateway # polyllm-gateway > **Unofficial.** Not affiliated with Anthropic, OpenAI, or OpenCode. Local LLM API proxy that translates OpenAI, Anthropic, and OpenAI Responses API requests to upstream LLM providers via OpenCode Go. Compatible with Claude Code 2.1+ and Codex CLI 0.144+. ## Architecture ``` Client (OpenAI API) Client (Anthropic API) Client (Responses API) │ │ │ ▼ ▼ ▼ OpenAI Handler Anthropic Handler Responses Handler /v1/chat/completions /v1/messages /v1/responses │ │ │ └─────────────────────── Model Resolver ───────────────┘ │ ▼ Provider.Chat() │ ▼ Upstream LLM API ``` ## Setup ### 1. Build ```bash cd ~/LLM/proxy ~/.local/go/bin/go build -o bin/proxy ./cmd/proxy/ ``` ### 2. Auto-start with systemd (recommended) ```bash mkdir -p ~/.config/systemd/user cat > ~/.config/systemd/user/llm-proxy.service << 'EOF' [Unit] Description=LLM API Proxy After=network.target [Service] Type=simple ExecStart=%h/LLM/proxy/bin/proxy %h/LLM/proxy/config.yaml Restart=always RestartSec=3 Environment=OPENCODE_API_KEY=your-key-here [Install] WantedBy=default.target EOF systemctl --user daemon-reload systemctl --user enable --now llm-proxy ``` The proxy uses ~8MB RAM and 0% CPU idle. It auto-starts on login and auto-restarts on crash. **Useful commands:** ```bash systemctl --user status llm-proxy # check status systemctl --user restart llm-proxy # restart after config change journalctl --user -u llm-proxy -f # tail logs ``` ### 3. Run directly (alternative)