npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zhzy0077/opencode-copilot-cli-auth

v0.0.17

Published

Package on npm: https://www.npmjs.com/package/@zhzy0077/opencode-copilot-cli-auth

Readme

opencode-copilot-cli-auth

Package on npm: https://www.npmjs.com/package/@zhzy0077/opencode-copilot-cli-auth

This fork replaces the older GitHub Copilot chat-auth flow with the newer Copilot CLI-style OAuth flow and makes opencode use the live Copilot model metadata for your account.

How to use

Add the plugin to your opencode config:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": [
    "@zhzy0077/[email protected]"
  ]
}

Then start opencode and log in to the github-copilot provider. The plugin handles the Copilot CLI-style device flow and will reuse the stored GitHub OAuth token afterward.

For local development before publishing, you can load the file directly:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": [
    "file:///absolute/path/to/index.mjs"
  ]
}

Important: if the file path contains opencode-copilot-auth, current opencode builds may skip loading it because of a hardcoded plugin-name filter. Use a path that does not contain that substring.

What changed in this fork

  • Auth flow: uses the Copilot CLI-style OAuth client flow and keeps the GitHub OAuth token directly.
  • Entitlement: fetches /copilot_internal/user and uses the entitlement-provided Copilot API base URL.
  • Token exchange: does not call /copilot_internal/v2/token.
  • Request profile: uses the newer copilot-developer-cli headers instead of the older chat profile.
  • Model metadata: fetches the live Copilot /models response during auth loading and patches the in-memory opencode provider model objects.

Context window and model limits

The main practical difference from upstream is that this fork patches live per-model limits from Copilot instead of relying only on static metadata.

That means opencode can see the Copilot-advertised values for:

  • limit.context
  • limit.input
  • limit.output

As of March 10, 2026, the live GitHub Copilot /models response used by this fork exposes the Copilot CLI model profile. The table below compares the live Copilot CLI context window against the static github-copilot catalog on models.dev.

| Model | This Fork (CLI Context) | models.dev Context | Difference | | ------------------- | ----------------------: | -------------------: | ---------: | | claude-opus-4.6 | 200,000 | 128,000 | +72,000 | | claude-sonnet-4.6 | 200,000 | 128,000 | +72,000 | | claude-haiku-4.5 | 144,000 | 128,000 | +16,000 |

The practical takeaway is that this fork exposes larger live Claude context windows than the static models.dev values.

Examples observed with this fork:

  • claude-sonnet-4.6
    • context window: 200000
    • prompt/input limit: 168000
    • output limit: 32000
  • claude-opus-4.6
    • context window: 200000
    • prompt/input limit: 168000
    • output limit: 64000
  • claude-haiku-4.5
    • context window: 144000
    • prompt/input limit: 128000
    • output limit: 32000

Without this patching, opencode may show stale or smaller limits depending on the static model catalog it started from.

Claude thinking budget behavior

This fork also changes Copilot Claude request behavior:

  • when the thinking variant is selected, it sends thinking_budget: 16000
  • when no variant is selected, it omits thinking_budget entirely

This differs from upstream opencode, which currently sends thinking_budget: 4000 for the built-in thinking variant.

The plugin intentionally does not try to change the opencode core UI. So the visible Claude variant list is still controlled by opencode itself; this fork changes the request behavior, not the built-in variant picker labels.

Publishing

./script/publish.ts