Skip to content

AiCodingTools/copilot-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Copilot API

⚠️ EDUCATIONAL PURPOSE ONLY ⚠️ This project is a reverse-engineered implementation of the GitHub Copilot API created for educational purposes only. It is not officially supported by GitHub and should not be used in production environments.

Project Overview

A wrapper around GitHub Copilot API to make it OpenAI compatible, making it usable for other tools.

Prerequisites

  • Bun (version 1.0.0 or higher)
  • GitHub account with Copilot Individual subscription

Installation

To install dependencies, run:

bun install

Running the Project

There are two ways to run the project:

Development Mode

bun run dev

Starts the server with hot reloading enabled, which automatically restarts the server when code changes are detected. This is ideal for development.

Production Mode

bun run start

Runs the server in production mode with optimizations enabled and hot reloading disabled. Use this for deployment or production environments.

In both cases, the server will start and listen for API requests.

Tested Tools Compatibility

The following AI tools have been tested with this API:

  • Works with GPT-4o
  • Not compatible with Claude 3.5 Sonnet (prompts too long)
  • Works with GPT-4o
  • Works with Claude 3.5 Sonnet
  • Aider can't use weak models #2867
  • Using o1 as the main model will also result in the same error #2867
  • 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

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the GNU General Public License v3.0.

About

Turn GitHub Copilot into OpenAI/Anthropic API compatible server. Usable with Claude Code!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 73.6%
  • HTML 17.0%
  • JavaScript 8.4%
  • Other 1.0%