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

modelhitch

v0.15.0

Published

Plug-and-play BYOK integration layer — hitch any AI provider or model to your app.

Downloads

2,446

Readme

Provider harness by day. Temp agency for LLMs by accident.

ModelHitch normalizes chat, streaming, tools, BYOK credentials, model discovery, failover, and usage across OpenAI, Anthropic, OpenRouter, Groq, Together, OpenCode, and local runtimes. It can also expose them through one local multi-wire bridge for coding agents and IDEs.

Install

npm install modelhitch
import { ModelHitch } from 'modelhitch';

const mh = new ModelHitch();
const result = await mh.chat({
  provider: 'opencode-zen',
  model: 'big-pickle',
  messages: [{ role: 'user', content: 'Clock in.' }],
});

console.log(result.message.content);

Chat, streaming, tools, custom providers, and React hooks use the same provider-neutral types. Open the technical guide →

Agent skills + plugins

Give your agent the ModelHitch playbook in one command:

npx modelhitch setup codex    # claude | cursor | vscode | all

Personal installs are the default. Add --project for the current repo, --dry-run to preview, or --force to update an existing install.

| Agent | Skill command | Full package | | --- | --- | --- | | Codex | npx modelhitch setup codex | Plugin guide | | Claude | npx modelhitch setup claude | Two-skill guide | | Cursor | npx modelhitch setup cursor | Plugin guide | | VS Code / Copilot | npx modelhitch setup vscode | Agent Plugin guide |

What you get

| Surface | Included | | --- | --- | | Library | chat, stream, tools, model discovery, typed errors, custom providers | | Web apps | Browser bundler support via modelhitch/browser — no Node polyfills | | Android | Native Kotlin SDK, coroutine streaming, Compose sample, Android Keystore BYOK storage | | Flutter | Dart SDK, SSE streaming, secure BYOK storage, OpenAI-compatible providers and bridges | | BYOK | Request keys, memory storage, browser local storage, environment fallback | | React | useChat, useStream, and a bridge client via modelhitch/react | | Bridge | OpenAI Chat/Responses/Images, Anthropic Messages, and Gemini GenerateContent wires | | Reliability | Automatic 429/5xx/network failover across models and providers | | Usage | Tokens, estimated spend, latency, failovers, dashboard, optional SQLite |

Providers

OpenCode Zen · OpenCode Go · OpenAI · Anthropic · Groq · OpenRouter · Together AI · HuggingFace · Google Gemini · DeepSeek · xAI · Mistral · Moonshot · Z.ai (GLM) · LM Studio · Ollama · vLLM · llama.cpp · KoboldCpp · mock

Android SDK

The android-sdk subtree is a native Kotlin implementation for Android 6.0 and later. It provides provider-neutral chat types, Flow streaming, tool-call events, built-in OpenAI-compatible providers, typed errors, model listing, and AES-GCM credential storage backed by Android Keystore. It does not embed Node.js or a JavaScript runtime.

dependencies {
  implementation("io.github.bobbybacklogs.modelhitch:modelhitch-android:0.1.0")
}
val keys = AndroidKeyStoreCredentialStore(applicationContext)
keys.set(selectedProviderId, userProvidedKey)

val hitch = ModelHitch(
  providers = DefaultProviders.all,
  keyStore = keys,
)

hitch.stream(
  ChatRequest(
    provider = selectedProviderId,
    model = selectedModelId,
    messages = listOf(ModelMessage.User(text("Hello from Android"))),
  ),
).collect { chunk ->
  if (chunk is StreamChunk.TextDelta) append(chunk.text)
}

Android setup, architecture, security, sample, and build guide →

Dart and Flutter SDKs

The flutter-sdk subtree contains a Dart 3.4 core and a Flutter 3.22 adapter. modelhitch_dart owns the provider-neutral types, OpenAI-compatible transport, Stream-based SSE events, typed errors, model listing, and extension contracts. modelhitch_flutter re-exports that core and adds encrypted per-provider credential storage through flutter_secure_storage.

dependencies:
  modelhitch_flutter: ^0.1.0
final hitch = ModelHitch(keyStore: FlutterSecureKeyStore());

hitch.stream(
  ChatRequest(
    provider: 'openai',
    model: 'gpt-4o-mini',
    messages: [ModelMessage.user(MessageContent.text('Hello from Flutter'))],
  ),
).listen((chunk) {
  if (chunk case TextDelta(:final text)) append(text);
});

Store only keys provided by a device user. For an application-owned credential, point an OpenAICompatibleProvider at a backend or ModelHitch bridge instead.

Dart/Flutter setup, security, extension contract, and publishing guide →

Local agent bridge

npx modelhitch bridge --background
npx modelhitch status
npx modelhitch settings

Point compatible clients at http://127.0.0.1:3939/v1, then route models as providerId/modelId. The bridge includes automatic failover and a local usage dashboard at http://127.0.0.1:3939/usage. Its OpenAI-compatible image lane is disabled by default and can be enabled from http://127.0.0.1:3939/settings or with --image-lane.

modelhitch settings opens an OpenTUI editor for routing, image-generation, and reliability settings without requiring the bridge or web UI. It edits the same local config file and preserves policy lanes, catalog choices, and API keys. The TUI currently requires Bun; all other ModelHitch commands retain their existing Node.js runtime support.

The packaged bridge uses SQLite persistence and requires Node.js 22.5+. The application library supports Node.js 18+.

Bridge setup, client configs, routing, security, and operations →

Development

npm install
npm run typecheck
npm test
npm run build

The quickstart and BYOK UI use the deterministic mock provider without an API key. Public contributions are currently closed, but the project is MIT licensed—clone it, inspect it, and remix your own.