[ol]
安装uv
uv venv
[/ol]
安装 LiteLLM
pip install litellm[proxy]
uv pip install litellm[proxy]
配置 config.yaml
litellm_settings:
drop_params: true
model_list:
- model_name: claude-opus-4-6
litellm_params:
model: github_copilot/claude-opus-4.6
- model_name: claude-sonnet-4-6
litellm_params:
model: github_copilot/claude-sonnet-4.6
配置 Claude Code
[ol]
[/ol]
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "sk-996",
"ANTHROPIC_BASE_URL": "http://localhost:4000",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
},
"permissions": {
"allow": [],
"deny": []
},
"model": "sonnet[1m]",
"enabledPlugins": {
"playwright@claude-plugins-official": true,
"og-image@og-image-skill": true
}
}
启动 LiteLLM
litellm --config config.yaml
注意:启动后会有设备码,你需要打开 Github 网页输入设备码授权
参考
https://docs.litellm.ai/docs/providers/github_copilot#usage---litellm-proxy

