Add GitHub Copilot API proxy integration to LLM Gateway: * Implement copilot-bridge service: - HTTP wrapper managing copilot-api (GitHub Copilot API proxy) - OpenAI-compatible /v1/chat/completions endpoint (port 3252) - Graceful startup and SIGTERM shutdown handling - Health check endpoint with service diagnostics * Register copilot-bridge in provider fallback chain: - Position: After OpenAI, before free LLM APIs (tier 4) - Rate limit: 60 requests/min (GitHub Copilot API limit) - Models: gpt-4 (reasoning), gpt-3.5-turbo (medium) - Authentication: GitHub Copilot subscription (internal to copilot-api) * Update PM2 ecosystem configuration: - Add copilot-bridge service definition (port 3252) - Configure COPILOT_BRIDGE_URL in gateway environment - Add copilot to LLM_PROVIDERS list * Enhance deployment automation: - Update ensure-bridges.sh with copilot-bridge deployment - Copy service files from repo to /opt/copilot-bridge - Run npm install for copilot-api dependency * Comprehensive documentation: - Expand DEPLOYMENT-BRIDGES.md with copilot-bridge section - Prerequisites: Node.js 20+, GitHub Copilot subscription - Authentication workflow: npm run auth with GitHub OAuth - Troubleshooting: subscription verification, auth cache reset Provider chain now supports: 1. Ollama (local, free) 2. claude-bridge (Claude subscription) 3. openai-bridge (OpenAI subscription) 4. copilot-bridge (GitHub Copilot subscription) ← NEW 5. Free APIs: Cerebras, Groq, Mistral, NVIDIA, Cloudflare Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
31 lines
655 B
JSON
31 lines
655 B
JSON
{
|
|
"name": "copilot-bridge",
|
|
"version": "1.0.0",
|
|
"description": "GitHub Copilot API bridge for LLM Gateway integration",
|
|
"type": "module",
|
|
"main": "server.js",
|
|
"scripts": {
|
|
"start": "node server.js",
|
|
"pm2": "pm2 start server.js --name copilot-bridge",
|
|
"auth": "npx copilot-api@latest auth",
|
|
"debug": "npx copilot-api@latest debug --json"
|
|
},
|
|
"keywords": [
|
|
"github",
|
|
"copilot",
|
|
"api",
|
|
"bridge",
|
|
"llm",
|
|
"openai-compatible"
|
|
],
|
|
"author": "Rene Fichtmüller",
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"copilot-api": "^1.0.0"
|
|
},
|
|
"devDependencies": {},
|
|
"engines": {
|
|
"node": ">=20.0.0"
|
|
}
|
|
}
|