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

@vultr/model-provider-opencode

v0.0.4

Published

Vultr Inference for OpenCode: the live /v1/models catalog as a model provider

Readme

@vultr/model-provider-opencode

Replaces the model list OpenCode has for Vultr Inference with the live GET /v1/models catalog. OpenCode already knows the vultr provider from models.dev, but that list is written by hand and its ids no longer match what the API serves.

Install

OpenCode installs plugins from npm by the name in opencode.json. Until this package is on a registry, point plugin at a local checkout. OpenCode loads it in place, so the checkout needs its own node_modules:

git clone https://github.com/vultr/model-provider-opencode.git ~/src/vultr/model-provider-opencode
cd ~/src/vultr/model-provider-opencode && npm install
{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["/home/me/src/vultr/model-provider-opencode"]
}
export VULTR_INFERENCE_API_KEY=...
opencode models vultr
opencode run -m vultr/glm-5.3 --variant high "hello"

An absolute path, a file:// URL to the directory and a file:// URL to src/index.ts all work.

How it works

src/index.ts exports a plugin with two hooks. config points provider vultr at VULTR_INFERENCE_API_KEY; an env a user set on the provider is kept. provider.models replaces the model list: OpenCode calls it with the provider it built from models.dev and uses the returned record as that provider's models.

The rest of the provider (name, @ai-sdk/openai-compatible, the base URL) still comes from models.dev, so there is nothing else to configure. OpenCode enables the provider from its credential, so VULTR_INFERENCE_API_KEY is what turns it on.

The last good catalog is kept in $XDG_CACHE_HOME/opencode/vultr-model-catalog.json and served when the network fails. With neither, the hook returns the models OpenCode already had.

Mapping

| OpenCode | Catalog | | --- | --- | | limit.context, limit.output | contextWindow, maxOutputTokens | | cost (USD per million) | pricePerMillion: prompt, completion, cache.read, cache.write | | capabilities.input | text, image, video, audio; pdf from file | | capabilities.attachment | any non-text input | | capabilities.toolcall, reasoning, temperature | tools, the reasoning block, temperature in supportedParameters | | variants | one per entry of supportedEfforts as { reasoningEffort }, plus none unless reasoning is mandatory. No allowlist: OpenCode's defaults | | status | deprecated when deprecationDate is set, else active | | release_date | created | | api | @ai-sdk/openai-compatible at the base URL |

OpenCode caps a request's max_tokens itself (32000), so the published output limit is passed through unchanged.

Environment

| Variable | Meaning | | --- | --- | | VULTR_INFERENCE_API_KEY | Makes OpenCode enable the vultr provider | | VULTR_INFERENCE_BASE_URL | Overrides https://api.vultrinference.com/v1 for the catalog and for requests |

Development

npm install
npm run typecheck
npm test

Verifying against the real harness needs no API key: serve model-catalog-typescript/fixtures/vultr-catalog.json at /v1/models from a local server that records POST /v1/chat/completions and answers with a short SSE stream, then set VULTR_INFERENCE_BASE_URL to it and VULTR_INFERENCE_API_KEY to any value. Read the recorded request body: that is what Vultr would receive.