[FEATURE] Add support for Github Copilot SDK
Status Open
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 3 comments · opened Jan 25, 2026
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Requirement: A lot of users (including enterprise users) have existing subscription to Github Copilot which gives them access to various AI models including claude. Adding support for Copilot within Claude code would let users use their existing subscriptions within the tool.
Proposed Solution
Integrate the newly launched Copilot SDK to Claude code : copilot-sdk
Alternative Solutions
_No response_
Priority
High - Significant impact on productivity
Feature Category
API and model interactions
Use Case Example
_No response_
Additional Context
_No response_
3 Comments
bump
@pranjalsinha99 @HeegonJin you don't need to wait on first-party SDK support for this - there's a way today that does exactly what you're after: use your Copilot sub (incl. its Claude models) inside Claude Code, no separate Anthropic key.
I maintain a fork that's a local proxy exposing Copilot as a native Anthropic endpoint. point Claude Code at it:
then set
ANTHROPIC_BASE_URL=http://localhost:4141(+ any non-emptyANTHROPIC_API_KEY) and run claude as usual. requests get forwarded straight to Copilot's native/v1/messages, so thinking, tool use and usage reporting all come through afaict.full disclosure it's my own fork, not anything official - been running it ~9 months for a few folks on my team. you're welcome to give it a try: https://www.npmjs.com/package/copilot-api-node20
You can already do this without a proxy: Copilot exposes an Anthropic-compatible
/v1/messagesendpoint, and Claude Code can talk to it directly. I've switched fromcopilot-apito this setup (Copilot Enterprise, Claude Code 2.1.285).Setup
gh auth login) using an account that has a Copilot seat. Copilot's API accepts theghtoken directly as a Bearer token.~/.claude/settings.json:ANTHROPIC_BASE_URL: this is the Copilot Enterprise host. For other plans the host is probablyhttps://api.githubcopilot.com, but I haven't tested that.CLAUDE_CODE_ATTRIBUTION_HEADER=0: needed for prompt caching. Without it,cache_readstays at 0 and every turn is billed as fresh input.ENABLE_TOOL_SEARCH=true: optional. It's off by default with a custom base URL, but works on Copilot and cut my cached prompt prefix from about 38k to 27k tokens.WebSearch
Copilot rejects Anthropic's server-side web search tool.
Workaround: a
PreToolUsehook onWebSearchthat runs the query through Copilot's/responsesendpoint with itsweb_searchtool on a GPT model (that endpoint only accepts OpenAI models; the sameghtoken works there), then returns the answer and sources to Claude as the hook's deny reason. Claude uses it as the search result.WebFetch works as-is, because Claude Code fetches pages client-side.