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

@staticeng/opencode-litellm

v0.1.6

Published

OpenCode plugin that discovers LiteLLM models at runtime.

Readme

opencode-litellm

Runtime LiteLLM model autodiscovery for OpenCode. The plugin fetches LiteLLM /model/info at OpenCode startup and adds an in-memory provider named LiteLLM by default.

Install

Install the package by npm name, then add it to OpenCode plugin config:

npm install @staticeng/opencode-litellm
{
  "$schema": "https://opencode.ai/config.json",
  "plugin": [
    [
      "@staticeng/opencode-litellm",
      {
        "baseURL": "https://litellm.example.com/v1",
        "apiKeyEnv": "LITELLM_API_KEY"
      }
    ]
  ]
}

Set the API key in your environment before starting OpenCode:

export LITELLM_API_KEY="..."

Do not put real API keys in opencode.json. If you pass apiKey directly, the plugin uses it only in memory and never logs it, but environment variables are recommended.

Options

| Option | Default | Purpose | | --- | --- | --- | | baseURL | LITELLM_BASE_URL | LiteLLM proxy base URL. /v1 URLs are supported. | | apiKey | env value | Bearer token for LiteLLM. | | apiKeyEnv | LITELLM_API_KEY | Environment variable used when apiKey is not set. | | providerKey | LiteLLM | Key written to cfg.provider[providerKey]. | | providerName | LiteLLM | Human provider name. | | overrides | {} | Per-model deep-merge overrides. | | providerOverrides | {} | Provider-level deep-merge overrides. | | includeModes | chat, responses | LiteLLM modes to include. | | includeModels | all included modes | Optional allowlist by model name. | | excludeModels | none | Optional denylist by model name. | | timeoutMs | 30000 | /model/info request timeout. | | strict | false | Throw on fetch/mapping failures instead of warning. |

The LiteLLM key must have permission to call GET /model/info.

Overrides

LiteLLM metadata does not expose every OpenCode model field. Use overrides to add variants, thinking controls, cache costs, interleaved reasoning settings, limits, modalities, timeouts, or provider-specific options.

{
  "plugin": [
    [
      "@staticeng/opencode-litellm",
      {
        "baseURL": "https://litellm.example.com/v1",
        "apiKeyEnv": "LITELLM_API_KEY",
        "overrides": {
          "chatgpt/gpt-5.5": {
            "limit": { "context": 262144, "output": 128000 },
            "variants": {
              "high": { "options": { "reasoning_effort": "high" } }
            },
            "interleaved": { "field": "reasoning_details" }
          }
        },
        "providerOverrides": {
          "options": {
            "timeout": 600000
          }
        }
      }
    ]
  ]
}

Overrides win over generated values through a recursive deep merge. Arrays and scalar values are replaced rather than concatenated.

Runtime Behavior

  • Fetches ${baseURL}/model/info with Authorization: Bearer <token>.
  • Handles base URLs with or without a trailing slash, including /v1.
  • Adds or replaces cfg.provider[providerKey] during OpenCode's plugin config hook.
  • Does not write opencode.json, cache model metadata, or persist generated provider data.
  • Includes chat and responses modes by default; non-chat modes such as embedding and rerank are excluded unless explicitly included.
  • No HuggingFace fallback is included in v1.

Publish Notes

The package is ESM-only and publishes the compiled dist/ directory.

npm install
npm run build
npm test
npm pack --dry-run

Confirm package contents before publishing and keep secrets out of fixtures, docs, logs, and config examples.