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

@autonome-research/fleet-router

v0.2.0

Published

Client-side request routing across heterogeneous local LLM inference endpoints: context-window eligibility, capacity-normalized least-loaded selection, health probing. Zero dependencies.

Readme

fleet-router

Client-side request routing across heterogeneous local LLM inference endpoints — the case where your instances differ in context window, output budget, multimodal overhead, and concurrency capacity, and your requests differ enough in size that "send it anywhere" produces 400s and queues.

Extracted from a production batch pipeline (305-session litigation transcription + vision-description corpus) that ran a Qwen3-VL fleet across two 98 GB cards (262k ctx, 16 seats each) and one 32 GB card (49k ctx, 2 seats).

Why not an existing tool?

A mid-2026 survey of the space (LiteLLM Router, vLLM production-stack, SGLang router, Ray Serve, Envoy/Kong/Portkey gateways, llm-d/KServe, GPUStack, Paddler, npm ecosystem) found no tool that combines:

  1. Token-estimated context eligibility — per request, only endpoints whose window fits (prompt + output reserve + per-endpoint overhead like video-frame tokens) are candidates. Gateways rate-limit on tokens; none place on tokens.
  2. Capacity-normalized selection — lowest inflight/capacity, so a 16-seat instance absorbs 8× the traffic of a 2-seat one. LiteLLM's least-busy uses raw counts; everything else is static weights.
  3. Embedded TypeScript, zero infra — a library in your pipeline process, not a Python sidecar (+Redis) or a k8s gateway data path.
  4. Local-only — no cloud calls, suitable for confidential workloads.

The industry's routing investment is going the other way (KV-cache-aware gateways for homogeneous replica pools), so this niche is likely to stay open.

Usage

import { FleetRouter, waitHealthy } from 'fleet-router';

const router = new FleetRouter([
  { url: 'http://localhost:30010/v1', maxContext: 262_144, capacity: 16, outputReserve: 16_384, overheadTokens: 40_000 },
  { url: 'http://localhost:30011/v1', maxContext: 262_144, capacity: 16, outputReserve: 16_384, overheadTokens: 40_000 },
  { url: 'http://localhost:30009/v1', maxContext: 49_152, capacity: 3, outputReserve: 8_192, overheadTokens: 19_000 },
]);

const result = await router.withEndpoint({ promptChars: transcript.length }, async (lease) => {
  const prompt = transcript.length > lease.promptBudgetChars
    ? transcript.slice(0, lease.promptBudgetChars) + '\n[...truncated...]'
    : transcript;
  return callOpenAIChat(lease.endpoint.url, { prompt, max_tokens: lease.maxTokens });
});

On a connection error (engine mid-restart under k8s), await waitHealthy(lease.endpoint.url) then retry.

Status

v0.2.0 (unpublished; name and home TBD). The full three-axis surface from DESIGN.md is implemented and tested: outcome-fed circuit breaker (failureThreshold/cooldownMs), failover in withEndpoint (exclusion-set retries), blocking acquire with per-endpoint hardCap and AbortSignal, capability tags/require, rendezvous-hash affinityKey with spill-over, and pluggable estimateTokens/score. 18 unit tests.

Deferred by design: latency-EWMA selection (needs collected outcome timing), cost weighting, cross-process state. See DESIGN.md for rationale.