Documentation Index
Fetch the complete documentation index at: https://docs.ccs.kaitran.ca/llms.txt
Use this file to discover all available pages before exploring further.
GitHub Copilot Provider (Deprecated)
Access GitHub Copilot models via OAuth Device Code flow for existing local setups. This provider is now a deprecated compatibility path.Compatibility Quick Start
Authentication
Device Code Flow
GitHub Copilot uses Device Code flow instead of browser OAuth - ideal for headless servers and remote machines.Available since v7.37.1 - Device code and verification URL are also displayed in the CCS Dashboard for convenient access during authentication.
- Device code shown with copy button
- Verification URL as clickable link
- 15-minute expiration timer countdown
- Auto-refresh on successful authorization
Device Code vs Browser OAuth
GHCP uses Device Code flow because GitHub Copilot OAuth does not support callback servers.
| Feature | Device Code (GHCP) | Browser OAuth (Gemini/Codex) |
|---|---|---|
| Browser required? | No - works headless | Yes - opens automatically |
| User action | Copy code to browser manually | Click “Allow” in popup |
| Headless support | Native | Requires --headless flag |
| Callback server | None - polling only | Spawns local HTTP server |
Authentication Commands
Multi-Account Support
GitHub Copilot supports multiple accounts with filename-based identification:Account Identification
Pattern:ghcp-{oauth}-{profile_id}.json → {oauth}-{profile_id}
Example:
- Token file:
ghcp-github-ABC123.json - Account ID:
github-ABC123 - Nickname: Auto-generated or custom via
--nickname
Account Commands
Configuration
Config Keys
Configure via~/.ccs/config.yaml:
Account Types
| Type | Use Case | Rate Limits |
|---|---|---|
individual | Personal Copilot subscription | Standard limits |
business | GitHub Copilot for Business | Higher limits |
Rate Limiting
GitHub Copilot has rate limits - configure behavior on limit:- Wait (Default)
- Fail Fast
Environment Variables
Auto-managed by CCS. Manual override rarely needed.
Commands Reference
Basic Usage
Authentication Commands
Account Management
Troubleshooting
Improved OAuth Failure Diagnostics
Available since v7.51.0
Token not found
After v7.51: Specific errors surfaced from GitHub’s OAuth flow:
| Error | Meaning | Action |
|---|---|---|
authorization_pending | User hasn’t completed login yet | Wait and retry |
slow_down | Polling too fast | CCS handles automatically |
expired_token | Device code expired (15 min limit) | Re-run ccs ghcp --auth |
access_denied | User denied the authorization | Re-run and approve in browser |
unsupported_grant_type | OAuth config issue | Contact support |
Device Code Expired
Symptom: “Device code expired” error during authorization Cause: User didn’t complete authorization within 15 minutes Solution: Re-run--auth to get new code:
Rate Limit Exceeded
Symptom:429 Too Many Requests error
Cause: Exceeded GitHub Copilot rate limit
Solution 1: Wait for rate limit reset (if wait_on_limit: true)
Solution 2: Configure wait behavior:
Wrong Account Type
Symptom: Unexpected rate limits or quota errors Cause: Account type mismatch (Individual vs Business) Solution: Set correct account type:Token Refresh Failures
Symptom: “Unauthorized” errors after initial auth Cause: OAuth token expired, refresh failed Solution: Re-authenticate:Storage Locations
| Path | Description |
|---|---|
~/.ccs/cliproxy/auth/ghcp-*.json | OAuth tokens (one per account) |
~/.ccs/cliproxy/accounts.json | Account registry, nicknames |
~/.ccs/cliproxy/config.yaml | CLIProxy configuration |
~/.ccs/config.yaml | Copilot settings (rate limits, account type) |
Token Structure
GitHub Copilot OAuth token file format:ghcp-{oauth}-{profile_id}.json
Account Identification: Extracted from filename (no email field)
Device Code Flow Details
Authorization Flow
- CCS requests device code from GitHub API
- GitHub returns:
device_code(internal use)user_code(user enters in browser)verification_uri(URL to visit)interval(polling frequency)
- User visits URL, enters code manually
- CCS polls GitHub API every
intervalseconds - GitHub returns access token when user completes authorization
- CCS caches token to auth directory
Polling Behavior
- Interval: 5 seconds (default from GitHub API)
- Timeout: 15 minutes (device code expiry)
- Retry: Stops on authorization or expiry
No Callback Server Needed
Device Code flow eliminates need for:- Local HTTP server
- Port availability
- Firewall configuration
- Localhost access
- Headless servers
- Remote SSH sessions
- Docker containers
- CI/CD pipelines
Rate Limiting Behavior
Rate Limit Detection
CLIProxyAPI detects rate limits via:- HTTP 429 status code
X-RateLimit-Remaining: 0headerRetry-Afterheader
Wait Strategy
Whenwait_on_limit: true:
- Detect rate limit (429 response)
- Read
Retry-Afterheader or calculate reset time - Display wait message with countdown
- Sleep until reset (or user abort)
- Retry request automatically
Fail Fast Strategy
Whenwait_on_limit: false:
- Detect rate limit (429 response)
- Display error message with reset time
- Exit immediately with exit code 6 (
PROVIDER_ERROR)
Quota Information
CCS tracks GitHub Copilot quota viaccs cliproxy quota and ccs copilot usage:
| Quota Type | Description |
|---|---|
premiumInteractions | High-capability model requests (Opus, GPT-5) |
chat | Chat completions requests |
completions | Code completions (usually unlimited) |
ccs copilot usage output)
Cost Information
| Tier | Cost | Rate Limits |
|---|---|---|
| Individual | $10/month | Standard limits |
| Business | $19/user/month | Higher limits |
| Enterprise | Custom pricing | Custom limits |
- Individual: ~100 requests/hour
- Business: ~200 requests/hour (configurable)
- Exact limits set by GitHub, vary by account
Advanced Features
Model Mapping
GitHub Copilot models are mapped to Claude model IDs internally by CLIProxyAPI:Account Registry Integration
GHCP uses same multi-account system as other OAuth providers:- Accounts stored in
~/.ccs/cliproxy/accounts.json - Nicknames auto-generated from account ID
- Default account tracked per provider
lastUsedAttimestamp for analytics
Session Persistence
GitHub Copilot sessions benefit from CLIProxy session persistence:- First
ccs ghcpspawns proxy (1-2s startup) - Subsequent commands reuse existing proxy (instant)
- Proxy terminates when last session exits
- Version mismatch detection → auto-restart on upgrade
Next Steps
Multi-Account Setup
Manage multiple GitHub accounts
Rate Limiting
Configure rate limit behavior
Device Code Flow
Understand headless authentication
CLIProxy Config
Advanced CLIProxy settings
