{"id":50508979,"url":"https://github.com/aaronlab/conduit","last_synced_at":"2026-06-02T18:32:51.376Z","repository":{"id":351986084,"uuid":"1212224586","full_name":"aaronlab/conduit","owner":"aaronlab","description":"GitHub Copilot API reverse proxy with native Anthropic Messages API passthrough","archived":false,"fork":false,"pushed_at":"2026-04-23T14:09:47.000Z","size":148,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-09T15:53:22.197Z","etag":null,"topics":["anthropic","bun","claude","claude-code","copilot","github-copilot","hono","opus-4-7","proxy","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/aaronagent/conduit#readme","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aaronlab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-16T07:16:15.000Z","updated_at":"2026-04-23T14:10:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/aaronlab/conduit","commit_stats":null,"previous_names":["aaronagent/conduit","aaronlab/conduit"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/aaronlab/conduit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlab%2Fconduit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlab%2Fconduit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlab%2Fconduit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlab%2Fconduit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaronlab","download_url":"https://codeload.github.com/aaronlab/conduit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlab%2Fconduit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33833277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic","bun","claude","claude-code","copilot","github-copilot","hono","opus-4-7","proxy","typescript"],"created_at":"2026-06-02T18:32:50.645Z","updated_at":"2026-06-02T18:32:51.368Z","avatar_url":"https://github.com/aaronlab.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Conduit\n\n**Run Claude Code with Opus 4.7 — powered by your GitHub Copilot subscription.**\n\n[简体中文](./README_zh.md) · English\n\n---\n\nClaude Code is the best AI coding agent. But its official API:\n\n- Isn't available in many countries\n- Costs real money per token even when you already pay Anthropic or an IDE vendor\n- Requires a separate Anthropic billing account\n\nMeanwhile, **GitHub Copilot includes Claude Opus 4.7, Sonnet 4.6, Haiku 4.5 and more** — and natively speaks the Anthropic Messages API. If you already have a Copilot subscription (individual, Business, or an MSFT account), you can run Claude Code against it today.\n\nConduit is the local proxy that makes it work.\n\n```\nClaude Code ──▶ Conduit (localhost) ──▶ GitHub Copilot API\n                                        │\n                                        └─ Claude Opus 4.7 etc.\n```\n\n## Why not other Copilot proxies?\n\nMost Copilot proxies translate Anthropic Messages → OpenAI Chat Completions and back. In that round-trip they silently drop:\n\n- `thinking` blocks\n- `output_config.effort`\n- `cache_control` (prompt caching!)\n- `context_management`\n- `top_k`, `service_tier`\n\n**Conduit passes Anthropic requests through unchanged.** No translation, no data loss. Tool calls, streaming, thinking, and prompt caching all work the way Anthropic designed them.\n\n## Quick Start\n\n```bash\n# 1. Install\ngit clone https://github.com/aaronagent/conduit.git\ncd conduit\nbun install\n\n# 2. Launch the proxy — you'll be prompted to log in to GitHub once\nCONDUIT_API_KEY=$(openssl rand -hex 16) bun run dev\n```\n\nThe proxy listens on `:7133` and a dashboard on `:7023`. Copy the key it prints — you'll use it below.\n\n### Point Claude Code at Conduit\n\n```bash\nexport ANTHROPIC_BASE_URL=http://localhost:7133\nexport ANTHROPIC_AUTH_TOKEN=\u003cthe-key-from-above\u003e\nexport ANTHROPIC_MODEL=claude-opus-4.7\nexport ANTHROPIC_SMALL_FAST_MODEL=claude-haiku-4.5\nclaude\n```\n\n\u003e **Important:** use `ANTHROPIC_AUTH_TOKEN`, not `ANTHROPIC_API_KEY`. If `ANTHROPIC_API_KEY` is set in your shell, Claude Code will send it to Anthropic's servers and bypass Conduit.\n\nOr save it as a one-shot alias:\n\n```bash\nalias claude-copilot='unset ANTHROPIC_API_KEY; \\\n  ANTHROPIC_BASE_URL=http://localhost:7133 \\\n  ANTHROPIC_AUTH_TOKEN=\u003cyour-key\u003e \\\n  ANTHROPIC_MODEL=claude-opus-4.7 \\\n  ANTHROPIC_SMALL_FAST_MODEL=claude-haiku-4.5 \\\n  claude --dangerously-skip-permissions'\n```\n\nNow `claude-copilot` runs Claude Code on Opus 4.7 via your Copilot subscription.\n\n## Features\n\n- **Anthropic Messages API passthrough** for Claude models — thinking, effort, cache_control, streaming, tool use all native\n- **OpenAI Chat Completions translation** for GPT/Gemini models (so `/chat/completions` works too)\n- **Smart model routing** — one endpoint serves both protocols, detection is automatic\n- **Per-model compatibility shims** — automatically reshapes requests that upstream would reject (e.g. `thinking: enabled` → `adaptive` for Opus 4.7)\n- **GitHub OAuth Device Flow** — one-time login, JWT auto-refreshes\n- **Monitoring dashboard** on `:7023` — live stats, request log, model catalog\n- **SQLite request log** — every request, model, latency, tokens\n- **SSE keepalive \u0026 255s idle timeout** — long `thinking` responses don't get cut off\n\nSee [docs/MODEL_COMPATIBILITY.md](./docs/MODEL_COMPATIBILITY.md) for which models support what, and [docs/ARCHITECTURE.md](./docs/ARCHITECTURE.md) for the internals.\n\n### Drive Claude Code from another device\n\n`bin/conduit-remote` wraps a persistent `tmux` session in a browser-based\nterminal so you can reach Claude Code from your phone, iPad, or another\nlaptop — same Wi-Fi, Tailscale, Cloudflare Tunnel, or SSH all work. See\n[docs/REMOTE_ACCESS.md](./docs/REMOTE_ACCESS.md).\n\n## Environment Variables\n\n| Variable | Default | Description |\n|---|---|---|\n| `CONDUIT_PORT` | `7133` | Proxy listen port |\n| `CONDUIT_API_KEY` | _(empty)_ | API key clients must present. If empty, dev-mode allows any request |\n| `CONDUIT_INTERNAL_KEY` | _(empty)_ | Dashboard → proxy auth |\n| `CONDUIT_TOKEN_PATH` | `data/github_token` | GitHub token file |\n| `CONDUIT_DB_PATH` | `data/conduit.db` | SQLite database path |\n| `CONDUIT_LOG_LEVEL` | `info` | `debug` / `info` / `warn` / `error` |\n| `CONDUIT_BASE_URL` | _(empty)_ | Public URL, used in dashboard Connect page |\n\n## API Endpoints\n\n| Method | Path | Description |\n|---|---|---|\n| POST | `/v1/messages` | Anthropic Messages API (passthrough for Claude) |\n| POST | `/v1/chat/completions` | OpenAI Chat Completions |\n| GET | `/v1/models` | Model list |\n| GET | `/health` | Health check |\n| GET | `/api/stats` | Dashboard stats |\n| GET | `/api/requests` | Request log (paginated) |\n| GET | `/api/copilot/models` | Copilot model capabilities |\n\n## Requirements\n\n- **GitHub Copilot subscription** — Individual / Business / Enterprise all work\n- [**Bun**](https://bun.sh) ≥ 1.3 (the proxy and dashboard both run on Bun)\n- macOS / Linux / WSL\n\n## Troubleshooting\n\n- **`API Error: 401 Invalid API key`** → you probably left `ANTHROPIC_API_KEY` set. `unset ANTHROPIC_API_KEY` and use `ANTHROPIC_AUTH_TOKEN` instead.\n- **`Failed to get Copilot token` on startup** → your GitHub account doesn't have Copilot access. Subscribe or log in with a different account.\n- **Banner shows `Opus 4 · API Usage Billing`** → cosmetic, ignore. Check the Conduit dashboard (`http://localhost:7023`) for the real model being sent.\n- **More** → [docs/FAQ.md](./docs/FAQ.md)\n\n## Tech Stack\n\nBun · Hono 4 · Vite + React 19 · SQLite (WAL mode) · TypeScript (strict)\n\n## License\n\nMIT. Conduit is an independent project and is not affiliated with Anthropic or GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronlab%2Fconduit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaronlab%2Fconduit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronlab%2Fconduit/lists"}