copilot-api  by ericc-ch

Proxy GitHub Copilot as OpenAI/Anthropic API

created 6 months ago
475 stars

Top 65.1% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a reverse-engineered proxy for the GitHub Copilot API, exposing it as an OpenAI and Anthropic compatible server. It enables users to leverage GitHub Copilot with tools designed for OpenAI or Anthropic APIs, including Claude Code, offering a unified interface for AI-assisted coding.

How It Works

The proxy intercepts requests intended for OpenAI or Anthropic APIs and translates them into calls to the GitHub Copilot backend. It then converts the Copilot responses back into the expected API formats. This approach allows seamless integration with existing AI tooling that relies on these popular API specifications, abstracting away the underlying Copilot communication.

Quick Start & Requirements

  • Install/Run: npx copilot-api@latest start
  • Prerequisites: Bun (>= 1.2.x), GitHub account with Copilot subscription.
  • Setup: Minimal setup time, primarily requiring authentication.
  • Docs: https://github.com/ericc-ch/copilot-api

Highlighted Details

  • Offers OpenAI compatible endpoints (/v1/chat/completions, /v1/models, /v1/embeddings) and Anthropic compatible endpoints (/v1/messages).
  • Includes a web-based dashboard for monitoring usage and quotas.
  • Supports manual request approval, rate limiting, and token visibility for debugging.
  • Facilitates integration with Claude Code via a command-line flag (--claude-code).

Maintenance & Community

The project is actively maintained by ericc-ch. Community interaction channels are not explicitly mentioned in the README.

Licensing & Compatibility

The project's license is not specified in the README. Compatibility for commercial use or closed-source linking is not detailed.

Limitations & Caveats

This is a reverse-engineered proxy and is not officially supported by GitHub, meaning it may break unexpectedly. Users should proceed at their own risk.

Health Check
Last commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
7
Issues (30d)
11
Star History
389 stars in the last 90 days

Explore Similar Projects

Starred by Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
3 more.

composio by ComposioHQ

0.1%
26k
Toolset for AI agent integrations via function calling
created 1 year ago
updated 10 hours ago
Feedback? Help us improve.