A wrapper around GitHub Copilot API to make it OpenAI compatible, making it usable for other tools.
Note: Image/vision capabilities are not supported as GitHub Copilot's API does not support image input.
- Bun (version 1.0.0 or higher)
- GitHub account with Copilot Individual subscription
To install dependencies, run:
bun installThe project can be run in several ways:
bun run devStarts the server with hot reloading enabled, which automatically restarts the server when code changes are detected. This is ideal for development.
bun run startRuns the server in production mode with optimizations enabled and hot reloading disabled. Use this for deployment or production environments.
The server accepts several command line options:
| Option | Description | Default |
|---|---|---|
| --help, -h | Show help message | false |
| --emulate-streaming | Enable streaming response emulation | false |
| --port, -p | Port to listen on | 4141 |
Example with options:
bun run start --port 8080 --emulate-streamingIn all cases, the server will start and listen for API requests on the specified port.
The following AI tools have been tested with this API:
- Works with GPT-4o
- Not compatible with Claude 3.5 Sonnet (prompts too long)
- Fully compatible
- Works with some caveats:
- Sometimes models fail to load - you can set any random API key in the UI to refresh the models list
- May encounter "The operation is insecure." issue #362
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the GNU General Public License v3.0.