You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Note:** If you are using [opencode](https://github.com/sst/opencode), you do not need this project. Opencode supports GitHub Copilot provider out of the box.
@@ -63,7 +61,7 @@ bun install
63
61
Build image
64
62
65
63
```sh
66
-
docker build -t copilot-api .
64
+
docker build -t copilot-proxy-api .
67
65
```
68
66
69
67
Run the container
@@ -75,33 +73,33 @@ mkdir -p ./copilot-data
75
73
# Run the container with a bind mount to persist the token
76
74
# This ensures your authentication survives container restarts
77
75
78
-
docker run -p 4141:4141 -v $(pwd)/copilot-data:/root/.local/share/copilot-api copilot-api
76
+
docker run -p 4141:4141 -v $(pwd)/copilot-data:/root/.local/share/copilot-proxy-api copilot-proxy-api
79
77
```
80
78
81
79
> **Note:**
82
-
> The GitHub token and related data will be stored in `copilot-data` on your host. This is mapped to `/root/.local/share/copilot-api` inside the container, ensuring persistence across restarts.
80
+
> The GitHub token and related data will be stored in `copilot-data` on your host. This is mapped to `/root/.local/share/copilot-proxy-api` inside the container, ensuring persistence across restarts.
83
81
84
82
### Docker with Environment Variables
85
83
86
84
You can pass the GitHub token directly to the container using environment variables:
@@ -291,7 +289,7 @@ There are two ways to configure Claude Code to use this proxy:
291
289
To get started, run the `start`command with the `--claude-code` flag:
292
290
293
291
```sh
294
-
npx copilot-api@latest start --claude-code
292
+
npx copilot-proxy-api@latest start --claude-code
295
293
```
296
294
297
295
You will be prompted to selecta primary model and a "small, fast" model for background tasks. After selecting the models, a command will be copied to your clipboard. This command sets the necessary environment variables for Claude Code to use the proxy.
@@ -341,7 +339,7 @@ model = "gpt-5.2"
341
339
model_provider = "copilot-proxy"
342
340
343
341
[model_providers.copilot-proxy]
344
-
name = "GitHub Copilot (via copilot-api)"
342
+
name = "GitHub Copilot (via copilot-proxy-api)"
345
343
base_url = "http://localhost:4141/v1"
346
344
wire_api = "responses"
347
345
env_key = "OPENAI_API_KEY"
@@ -361,7 +359,7 @@ Start the proxy server and run Codex:
361
359
362
360
```sh
363
361
# Start the proxy
364
-
npx copilot-api@latest start
362
+
npx copilot-proxy-api@latest start
365
363
366
364
# In another terminal, run Codex
367
365
codex
@@ -387,6 +385,6 @@ bun run start
387
385
388
386
- To avoid hitting GitHub Copilot's rate limits, you can use the following flags:
389
387
- `--manual`: Enables manual approval for each request, giving you full control over when requests are sent.
390
-
- `--rate-limit <seconds>`: Enforces a minimum time interval between requests. For example, `copilot-api start --rate-limit 30` will ensure there's at least a 30-second gap between requests.
388
+
- `--rate-limit <seconds>`: Enforces a minimum time interval between requests. For example, `copilot-proxy-api start --rate-limit 30` will ensure there's at least a 30-second gap between requests.
391
389
- `--wait`: Use this with `--rate-limit`. It makes the server wait for the cooldown period to end instead of rejecting the request with an error. This is useful for clients that don't automatically retry on rate limit errors.
392
390
- If you have a GitHub business or enterprise plan account with Copilot, use the `--account-type` flag (e.g., `--account-type business`). See the [official documentation](https://docs.github.com/en/enterprise-cloud@latest/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/managing-github-copilot-access-to-your-organizations-network#configuring-copilot-subscription-based-network-routing-for-your-enterprise-or-organization) for more details.
0 commit comments