GitHub Copilot LLM adapter: OAuth device-flow sign-in, live model discovery from the Copilot API, vision support for image-capable models (gpt-4.1, gpt-4o), and two wire protocols (Chat Completions and Responses API) with automatic endpoint routing per model.
Install
# from npm (prebuilt)
dsh plugin --profile web add @lujianjun19/dsh-llm-github-copilot
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:lujianjun19/dsh-llm-github-copilot
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
English | 中文
GitHub Copilot sign-in for DeepSeek Harness: a device-flow login page and chat commands. This plugin only supplies credentials; the Harness's built-in github-copilot route owns models, token refresh, images, and requests.
Requirements
- Harness
0.2.2-rc.1(current development baseline); older supported releases and compatibility details. - A GitHub account with Copilot access; Node.js ≥ 24 and pnpm ≥ 9 on
PATH. - The default Web profile, or a custom composition with
@deepseek-ai/dsh-llm-pi-aianddsh-credentials-local.
Install or update
Install from npm:
dsh plugin --profile web add @lujianjun19/dsh-llm-github-copilot -w
Update an existing installation:
dsh plugin --profile web update @lujianjun19/dsh-llm-github-copilot --latest -w
Restart dsh web and hard-refresh the browser. Confirm the version at the bottom of Settings → GitHub Copilot. The bundle is registered automatically; do not add a second plugin insert to the profile patch.
For GitHub source installs, exact versions, or delayed updates, see the guide.
Sign in and use a model
- Open Settings → GitHub Copilot → Sign in.
- Open the displayed GitHub URL, enter the device code, and authorize the GitHub App (VS Code). The plugin saves the token automatically.
- In Settings → Models, add the built-in
github-copilotprovider if absent. No custom endpoint or pasted API key is needed. - Save, choose a model in the chat model selector, and send a request.
Signing in does not add the provider configuration. A visible model is not proof of account access; availability depends on the Harness catalog and your account/organization policies.
Chat commands are also available:
| Command | Purpose |
|---|---|
/copilot-login |
Start sign-in |
/copilot-status |
Check whether a token is stored, not whether a live request succeeds |
/copilot-logout |
Remove the local grant and writable token reference |
Sign-out does not revoke GitHub authorization or remove model configuration. If an external token remains, the UI reports it; remove that token from the environment/.env or external source, restart DSH, and sign out again.
Optional configuration
No configuration is needed for device-flow sign-in. To use an existing compatible long-lived GitHub OAuth token instead:
export GITHUB_COPILOT_OAUTH_TOKEN='<your-github-oauth-token>'
dsh web
An existing grant takes precedence. Do not assume an arbitrary PAT has Copilot access; short-lived Copilot API tokens are not suitable here.
The only plugin option, oauthTokenEnv, changes the credential reference name. Override the installed entry in the active profile's cordis.patch.yml:
- id: llm-github-copilot
config:
oauthTokenEnv: GITHUB_COPILOT_OAUTH_TOKEN
The consuming grant remains at llm-pi-ai/github-copilot; this option does not create another account/provider. Credential details.
More
Links
More in this category
Ebony-Vinyl/dsh-our-free-model★ 77208
Adds free model lanes to DeepSeek Harness — DeepSeek V4.1 Flash, Kimi K3 and others — with no login, sign-up or API key, plus a local OpenAI-compatible gateway, fallback routing and a usage dashboard.
dingminhua/dsh-connect-workbuddy★ 1681
Connects locally signed-in WorkBuddy models, CN and international alike, to DSH, reading each model's credit multiplier from the upstream catalog on every refresh, with per-model image input toggles, account switching backed by an auto-failing-over pool, manual daily check-in, and read-only credit overviews shown as compact pills on the card and in the composer.
Alice-Marx/dsh-model-router★ 966
Routes DeepSeek Harness work across configured model APIs and supported vendor CLIs with dependency-aware packages and cost previews.
V1ki/dsh-plugin-subscriptions★ 618
Use ChatGPT (Codex), Claude, and Grok subscriptions as DeepSeek Harness LLM providers, with Settings login, model catalogs, usage, plus image_generate, video_generate, and x_search tools.
XDTrees/dsh-workbuddy-xdpool★ 541
Merge every locally signed-in WorkBuddy account into DeepSeek Harness as one auto-failing-over model pool (multi-account rotation, live credits, and a model catalog showing per-model credit multipliers and free/night-discount tags).
XDTrees/dsh-xdpool★ 541
Merge every locally signed-in WorkBuddy account into DeepSeek Harness as one auto-failing-over model pool: multi-account rotation, 429 cooldowns, live credits, a model catalog with per-model credit multipliers and free/night-discount tags, QR-code login for 13 vendors, and aggregate free-tier channels. Accounts persist across restarts.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.