Summary
- Route Claude Code through a local LiteLLM proxy to GitHub Copilot, reducing direct Anthropic API spend.
- Advanced workaround (not officially GitHub-endorsed) that intercepts Claude Code's Anthropic-shaped requests and forwards them through LiteLLM to GitHub Copilot Requires local config.yaml setup for LiteLLM with GitHub Copilot provider routing, plus four environment variables ( ANTHROPIC_BASE_URL , ANTHROPIC_MODEL , ANTHROPIC_AUTH_TOKEN , CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC ) Handles GitHub device authorization flow automatically on first request and supports persistent or temporary configuration via shell exports or ~/.claude/settings.json merging Includes troubleshooting for model mismatches, missing requests, GitHub 401/403 errors, and port conflicts; optional header overrides for edge cases