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

openqwencode

v0.1.6

Published

OpenCode plugin for Qwen OAuth login and free Qwen Code models

Readme

openqwencode

Local OpenCode plugin for qwen.ai OAuth, with the same persistent credential cache style as qwen-code and opencode-qwen-auth, but without the legacy built-in Qwen providers/models.

This plugin builds on the newer Qwen Code direction and refresh work, adapted for OpenCode as a dedicated plugin-based integration.

It was also created because older OpenCode Qwen auth plugins like 1579364808/opencode-qwen-auth and gustavodiasdev/opencode-qwencode-auth no longer work.

Reviewed external references

This plugin was built after reviewing the main public Qwen/OpenCode auth implementations and forks, not just a single upstream:

The current design intentionally follows the strongest parts of those implementations while keeping the plugin small, current, and focused on the official free Qwen OAuth path.

Language rule

  • Everything in this project must be written in English.

What this plugin does

  • login provider: openqwencode
  • model path: openqwencode/coder-model
  • only the official free OAuth model: coder-model
  • image input through the same coder-model
  • tokens stored in qwen-code-compatible format in ~/.qwen/oauth_creds.json
  • automatic refresh so you do not have to log in again every day
  • atomic writes + lockfile so multiple processes do not corrupt credentials
  • in-memory cache with periodic disk sync
  • backoff for 429 and temporary server errors
  • cancellable auth polling, including process-signal cancellation
  • removes/overrides legacy qwen and qwen-code providers

OpenCode config

{
  "$schema": "https://opencode.ai/config.json",
  "disabled_providers": ["qwen", "qwen-code"],
  "plugin": ["file:///ABSOLUTE/PATH/TO/openqwencode"]
}

Login:

opencode auth login -p openqwencode

Then use:

opencode --model openqwencode/coder-model

Install and use in OpenCode

Install the package:

npm install openqwencode

Add it to your OpenCode config:

{
  "$schema": "https://opencode.ai/config.json",
  "disabled_providers": ["qwen", "qwen-code"],
  "plugin": ["openqwencode"]
}

Authenticate:

opencode auth login -p openqwencode

Run OpenCode with the plugin model:

opencode --model openqwencode/coder-model

If you upgraded from an older published version and OpenCode still does not see the model, clear the cached package and refresh:

rm -rf ~/.cache/opencode/packages/openqwencode@latest ~/.cache/opencode/node_modules/openqwencode
opencode models --refresh

Notes

  • upstream QwenLM/qwen-code only uses coder-model for the free OAuth flow
  • qwen3-coder-plus, qwen3-vl-plus, and vision-model are intentionally no longer exposed
  • the plugin injects the Qwen OAuth headers and a minimal Qwen Code system message
  • the local credential file is the primary source of truth; OpenCode auth state is only used as a bootstrap/migration path
  • project rules, release workflow, and backlog now live in AGENTS.md