Skip to main content
kRouter
All posts
Save money

Use your GitHub Copilot plan in Claude Code and any tool

Copilot plans now include monthly AI Credits spent at API rates. How to spend them from Claude Code, scripts and other tools, and when that is worth it.

Kodelyth · The team behind kRouter
· Updated
7 min read

Most people searching for a Copilot alternative want a cheaper one. Before switching, it is worth knowing what the plan you already hold contains -- because for a lot of developers the redundant subscription is the second one, not Copilot. It is also worth knowing that the plan changed shape this year.

What a Copilot plan carries now

Since June 1, 2026, Copilot is billed in GitHub AI Credits. Chat, agent sessions, code review and Copilot CLI spend credits at each model's listed API rate. Code completions and next-edit suggestions do not touch them.

PlanPriceMonthly credits
Copilot Free$0Limited; the model is picked for you
Copilot Pro$101,000 base plus a 500 flex allotment
Copilot Pro+$393,900 base plus a 3,100 flex allotment
Copilot Max$10010,000 base plus a 10,000 flex allotment

Base credits match the plan price and stay fixed; GitHub can change the flex allotment as model costs move. Business ($19 a seat) and Enterprise ($39 a seat) work the same way under admin budgets.

The model list behind those credits spans four vendors. As of October 2026, GitHub lists Claude Haiku 4.5, Sonnet 4.6, Sonnet 5 and 5.5, Opus 4.8, Opus 5 and 5.5, and Fable 5 and 5.1; the GPT-5.x and GPT-6 lines; Gemini 3.7 and 3.8 Flash; and Grok 4.5 to 4.7. Pro gets a selection of these, Pro+ and Max the premium ones.

What changed since this post first ran. It used to say Copilot included Claude Opus 4.7, Sonnet 4.5 and Gemini 3.1 Pro at a flat price. None of the three is on GitHub's list now, and nothing is flat: every model draws credits at its own rate.

What that means in practice

Opus is no longer the bargain it looked like. Opus 5.5 is $4 per million input tokens and $20 per million output on Anthropic's own price list, and a coding agent resends its whole context on every turn. A Pro plan's monthly credits do not go far at that rate.

The opportunity is narrower and still real: credits you are not spending in the editor. If your Copilot use is mostly completions -- which cost no credits -- the monthly pool sits there unused while you pay per token somewhere else. Haiku 4.5, at $1 per million input tokens, stretches it furthest.

Why the access feels locked to the editor

Copilot's backend speaks familiar shapes -- OpenAI chat completions, the Responses API, and an Anthropic-style /v1/messages endpoint for Claude. But it is not a public API. Access takes a GitHub device login, exchanged for a short-lived Copilot token, plus headers that identify the editor. A tool that only knows "base URL plus API key" cannot do that exchange.

That is the practical reason the credits go unused outside the editor. It is a plumbing problem, and a router can do the plumbing.

Bridging it

A local router accepts a standard request, handles Copilot's sign-in and headers, sends it on, and translates the response back:

npm install -g @sifxprime/krouter
krouter -t

Open http://localhost:20128/dashboard, go to Providers and pick GitHub Copilot. kRouter shows a risk notice first: a Copilot login is not licensed for use through a router, and GitHub can restrict the account. Copilot uses GitHub's device login, so the dashboard gives you a code to enter on GitHub. Once connected, the provider page can fetch the models your plan actually enables -- trust that list over kRouter's built-in one, which still includes models GitHub has removed.

From there, any OpenAI-compatible client reaches them:

export OPENAI_BASE_URL=http://localhost:20128/v1
export OPENAI_API_KEY=<your-krouter-key>
# model: gh/claude-sonnet-4.6

Claude Code uses the Anthropic variables instead. kRouter's CLI Tools page can write these into ~/.claude/settings.json for you:

export ANTHROPIC_BASE_URL=http://localhost:20128/v1
export ANTHROPIC_AUTH_TOKEN=<your-krouter-key>
export ANTHROPIC_MODEL=gh/claude-sonnet-4.6
export ANTHROPIC_DEFAULT_HAIKU_MODEL=gh/claude-haiku-4.5

The last line matters more than it looks: Claude Code uses its haiku model for background work, so pointing that slot at Haiku 4.5 keeps the cheap traffic on the cheapest Claude model. On the same machine as kRouter any key value works; from elsewhere, use one from the Endpoint page. Claude models on Copilot go through Copilot's Anthropic-style endpoint (how and why).

Verify before you trust it

curl -s http://localhost:20128/v1/chat/completions \
  -H "content-type: application/json" \
  -d '{"model":"gh/claude-haiku-4.5","messages":[{"role":"user","content":"reply with the word ready"}],"max_tokens":16}'

A JSON body with a choices array means the bridge is working end to end. A 401 means the GitHub connection needs reconnecting. An empty response usually means the router is not running.

What this is genuinely good for

Spending credits you already pay for. If you pay for Copilot plus something else for agent work, test this before the other one renews. If your Copilot credits go mostly unused, this is where the money is.

Background traffic on Haiku. An agent makes far more requests than a human conversation does -- summaries, file classification, commit messages, "what does this function do". Haiku 4.5 is well matched to that traffic and is the cheapest Claude model on the list.

A failover path. Even if Copilot is not your primary, having it connected means a rate limit elsewhere does not end your session. It sits in the chain and catches overflow -- useful when Claude Code's own plan runs out mid-week (keeping going after the weekly limit).

The limits, honestly

It is a prepaid pool, not unlimited. Copilot Chat, agent mode, code review, Copilot CLI and anything you route through kRouter all draw on the same monthly credits. When they run out, you buy more or stop until the next month.

Model availability follows GitHub. Opus 4.7 and Sonnet 4.5 were on the list and are not any more. A model you pinned can disappear; a chain absorbs that better than a hard-coded single model does.

Terms are GitHub's. How a subscription may be used is between you and them -- read the terms and decide for yourself. This is not legal advice.

Serving differences are real. A model served through Copilot has its own request constraints. A prompt tuned against the direct Anthropic API may behave slightly differently, most often around system prompt handling and maximum output length. It is close, not identical.

Errors looked different before 0.5.163. For models Copilot serves through its Responses API, a failed reply could come back as a successful one whose text was the error, and a reply cut off by the token limit ended without a finish reason. kRouter 0.5.163 fixed both, so update if you see either.

Where it fits in a chain

A pattern that works, built as a combo:

1. kr/claude-sonnet-4.5    # Kiro free plan
2. gh/claude-sonnet-4.6    # Copilot credits, already paid for
3. ds/deepseek-v4-flash    # cheap metered, last resort

A free plan takes the volume first. Copilot catches the overflow on credits you have already paid for. A cheap metered tier at the bottom means there is never a hard stop. kRouter also moves entries whose provider reports remaining quota towards the front, the one with the most left first.

If you were about to add a second AI subscription, try this first. The saving is the price of the subscription you did not buy, minus whatever overflow you pay for.

Common questions

Does a GitHub Copilot subscription include Claude?

Yes, as credits. Paid plans include a monthly pool of AI Credits that Claude models draw on at their API rates: Haiku 4.5, Sonnet 4.6 to 5.5, Opus 4.8 to 5.5 and Fable 5 and 5.1 are on GitHub's list, and your plan decides which you get. Copilot Free picks the model for you.

Why can I not point my tools at Copilot directly?

Because it is not a public API. Copilot's endpoints use familiar request shapes, but access needs a GitHub device login exchanged for a short-lived Copilot token, plus editor headers. A router can do that exchange; a plain base URL and key cannot.

Is Copilot model access unlimited?

No. Since June 1, 2026, chat, agent and CLI use spend monthly AI Credits at each model's API rate -- Copilot Pro includes 1,000 base credits plus a 500 flex allotment. Code completions do not use credits.

Is this allowed under GitHub's terms?

How a subscription may be used is between you and GitHub. kRouter flags Copilot with a risk notice because the login is not licensed for router use. Read the terms and decide for yourself; nothing here is legal advice.

Will a model behave exactly like the direct API?

Close, not identical. A model served through Copilot has its own request constraints, most noticeably around system prompt handling and maximum output length.

Kodelyth · The team behind kRouter

Published by Kodelyth, the team that builds kRouter. Posts are drafted with AI assistance and reviewed by a person before they go out. kRouter is free and MIT licensed.

Install kRouter