feat(providers): add GitHub Copilot CLI agent provider#476
feat(providers): add GitHub Copilot CLI agent provider#476johntmyers merged 5 commits intoNVIDIA:mainfrom
Conversation
Add copilot as a new supported agent provider, following the same pattern as existing providers (claude, codex, opencode). Copilot CLI manages its own API communication so no inference routing changes are needed. - New CopilotProvider with COPILOT_GITHUB_TOKEN/GH_TOKEN/GITHUB_TOKEN credential discovery - Normalization aliases: copilot, gh-copilot, github-copilot - Two-token command detection for `gh copilot` wrapper invocation - Network policy with GitHub and Copilot API endpoints - Updated docs and README with Copilot agent references
feat(providers): add GitHub Copilot CLI agent provider
|
Thank you for your interest in contributing to OpenShell, @htekdev. This project uses a vouch system for first-time contributors. Before submitting a pull request, you need to be vouched by a maintainer. To get vouched:
See CONTRIBUTING.md for details. |
|
All contributors have signed the DCO ✍️ ✅ |
|
I have read the DCO document and I hereby sign the DCO. |
johntmyers
left a comment
There was a problem hiding this comment.
That policy is only for testing. I would recommend creating a new sandbox template here: https://github.com/NVIDIA/OpenShell-community where you can ensure co-pilot installs on the image and you can provide a default policy to be used. The other templates should give you a good blueprint for doing that. Not a blocker to adding this as a provider here but I think is useful for anyone wanting to get up and running quickly.
We have another PR coming for that one too. |
The copilot provider uses a standalone copilot binary, not gh copilot. Removes the two-token subcommand detection block and its corresponding test.
The copilot provider is just 'copilot', not 'gh copilot' or 'github-copilot'. Simplifies the normalize_provider_type match to only accept 'copilot'.
Adds missing endpoints from GitHub's official Copilot allowlist reference: - api.individual.githubcopilot.com (Pro/Pro+ plan routing) - api.business.githubcopilot.com (Business plan routing) - copilot-proxy.githubusercontent.com (model proxy) - copilot-telemetry.githubusercontent.com (telemetry) - default.exp-tas.com (feature flags/experimentation) - origin-tracker.githubusercontent.com (API service) Removes gh binaries since copilot is a standalone binary, not gh copilot. Source: https://docs.github.com/en/copilot/reference/copilot-allowlist-reference
Summary
copilotas a new supported agent provider following the existing provider pattern (claude, codex, opencode)copilotbinary — it manages its own API communication to*.githubcopilot.com, so no inference routing changes are neededCOPILOT_GITHUB_TOKEN,GH_TOKEN, andGITHUB_TOKENenv varsRelated Issue
N/A — new agent support request.
Changes
crates/openshell-providers/src/providers/copilot.rs—CopilotProviderstruct with credential discovery and unit testCopilotProviderinProviderRegistry::new()copilotas a recognized provider typecopilotbinary detection (including full path resolution);ghalone still resolves togithubcopilotblock insandbox-policy.yamlwith endpoints from GitHub's official Copilot allowlist reference:github.com,api.github.com(auth, user management)api.githubcopilot.com,api.individual.githubcopilot.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com(subscription-based API routing)copilot-proxy.githubusercontent.com,origin-tracker.githubusercontent.com(model proxy)copilot-telemetry.githubusercontent.com,default.exp-tas.com(telemetry, feature flags)release-assets.githubusercontent.com(binary updates)/usr/lib/node_modules/@github/copilot/...),/usr/local/bin/copilot,~/.local/bin/copilot,/usr/bin/nodesupported-agents.md,README.md(quickstart, tools table, providers section, supported agents table)Testing
discovers_copilot_env_credentialscopilotcopilot,/usr/local/bin/copilot,ghalone still maps togithubChecklist
codex.rs)