# Route Claude Code Through LiteLLM Copilot

Claude Code users may need a local proxy path for Copilot-backed model access. This skill explains setup, verification, and troubleshooting steps.

## Install

```bash
npx skillstore add xixu-me/running-claude-code-via-litellm-copilot
```

## Metadata

- Status: approved
- Slug: xixu-me-running-claude-code-via-litellm-copilot
- Skillstore revision: r1
- Version status: missing
- Tree hash: fc88d8c2dd7265defc5be8d5164cde504c3f152f8041b1c31fec2272e763f7bb
- Author: xixu-me
- GitHub username: xixu-me
- License: MIT
- Repository: https://github.com/xixu-me/skills/tree/main/skills/running-claude-code-via-litellm-copilot/
- Ref: 64ca8af0f54a325752f08bd54e52151061ea659a
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: confirmation\_required
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network, filesystem
- Quality score: 38
- Quality tier: warning
- Public page: https://skillstore.pages.dev/skills/xixu-me-running-claude-code-via-litellm-copilot
- Manifest: https://skillstore.pages.dev/api/skills/xixu-me-running-claude-code-via-litellm-copilot/manifest

## Capabilities

- Explains when a Claude Code to LiteLLM to Copilot proxy path is relevant.
- Provides temporary shell setup guidance for Bash, Zsh, and PowerShell sessions.
- Shows the expected LiteLLM model mapping pattern for GitHub Copilot provider routes.
- Guides safe persistent configuration by merging Claude Code settings instead of replacing them.
- Troubleshoots model-name mismatches, silent localhost traffic, and Copilot authorization failures.
- Distinguishes default provider setup from advanced header override fallback guidance.

## Use Cases

- Prototype a Local Proxy Path: Set up a temporary LiteLLM proxy route before changing persistent Claude Code settings.
- Fix Model Routing Failures: Diagnose mismatched model names, missing localhost traffic, or LiteLLM route errors.
- Document Team Setup Steps: Create a clear checklist for prerequisites, authorization, verification, and rollback.

## Prompt Templates

### Explain the Workflow

```
Explain how Claude Code, LiteLLM, and GitHub Copilot connect in this workflow. Include the main compliance caveat.
```

### Plan Temporary Setup

```
Give me a temporary setup plan for my shell. Keep persistent files unchanged and list verification steps.
```

### Troubleshoot Proxy Traffic

```
Help me diagnose why Claude Code is not reaching LiteLLM. Ask for the minimum logs and settings needed.
```

### Review Persistent Configuration

```
Review my intended persistent Claude Code configuration change. Show the exact keys to merge and the rollback plan.
```

## Limitations

- It does not decide whether the workflow is allowed by current GitHub or Anthropic terms.
- It depends on LiteLLM and Copilot behavior that may change without notice.
- It does not verify current Copilot model availability unless the user asks for fresh checks.
- It requires user consent before persistent Claude Code configuration changes.

## Best Practices

- Start with temporary environment variables before changing persistent Claude Code settings.
- Keep the Claude Code requested model name exactly aligned with the LiteLLM model name.
- Verify the full request chain with LiteLLM logs before troubleshooting advanced header behavior.

## Anti Patterns

- Do not present the workaround as officially supported by GitHub or Anthropic.
- Do not replace the entire Claude Code settings file to add this workflow.
- Do not use header overrides until the default provider route has failed with clear evidence.

## Security Audit

- Audited at: 2026-07-08T09:55:48.541\+00:00
- Summary: The static findings are mostly Markdown false positives from documented commands, local URLs, and guarded settings examples rather than hidden execution. Two semantic risks remain: the workflow may conflict with provider policy, and the advanced header override section can emulate Copilot client identity.

## Stats

- Views: 131
- Downloads: 8
- Favorites: 0
- Popularity score: 0
