@useautumn/gateway has 4,483 recorded weekly downloads on npm, a decrease of 68.9% over the past 30 days.
It ranks #1119 of 2,251 tracked npm listings by weekly downloads.
Over 90 days, weekly downloads changed by +138%.
PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.
About @useautumn/gateway
@useautumn/gateway
Autumn adapters for AI SDKs and gateways. Wrap your model or client once and every LLM call's token usage is tracked against the customer's AI credit balance — no manual trackTokens calls.
Autumn converts the token counts to a dollar cost server-side using live models.dev rates plus your configured markup, so pricing changes never require a client redeploy.
Install
Requires Node.js 22+ and ESM imports. The AI SDK adapter targets AI SDK 7 and V4 language models; AI SDK 6 applications should stay on the previous gateway release.
Authentication: pass an autumn client (from autumn-js), or set AUTUMN_API_KEY (or AUTUMN_SECRET_KEY) in the environment and omit it.
Vercel AI SDK
The wrapped model is a drop-in LanguageModelV4. Usage is read per model call from the response (or the stream's finish chunk), including each step in a tool loop, and reported as / (e.g. anthropic/claude-sonnet-4-5). Tracking does not use AI SDK 7's aggregated top-level result.usage.
OpenAI, Anthropic, and Google provider names are normalized automatically: plain names and dotted SDK namespaces such as openai.responses, anthropic.messages, and google.generative-ai use their models.dev provider keys. Vercel's gateway namespace maps to vercel. Model IDs retain all dots and slashes. Other provider names pass through unchanged; use providerId for a custom mapping. Explicit overrides are always used verbatim.
OpenRouter
The wrapper forces OpenRouter usage accounting on every request, tracks chat.send (streaming and non-streaming) and the responses API (including @openrouter/agent's callModel), and reports models as openrouter/ using the response's resolved model — router aliases like openrouter/auto bill against the model that actually served the request. OpenRouter's own reported charge is attached to each event as openrouter_cost.
Streaming usage is tracked in the background; call await trackingSettled(client) before reading balances that must reflect calls just made. For consumption patterns the wrapper doesn't cover, trackOpenRouterUsage({ usage, model, customerId }) accepts both SDK camelCase and raw snake_case usage objects.
Options
Both adapters accept the shared tracking options:
| Option | Required | Description |
| customerId | Yes | Autumn customer ID to attribute usage to | | autumn | No | autumn-js client; falls back to AUTUMN_API_KEY env | | featureId | No | Target AI credit system feature (auto-detected if you have one) | | entityId | No | Entity for entity-scoped balances | | properties | No | Extra properties attached to each usage event |
Tracking failures are caught and logged — they never break your AI responses.
Docs
• Vercel AI SDK guide • OpenRouter guide • trackTokens API reference
Description from the npm listing.
- autumn
- billing
- usage-based-billing
- ai-sdk
- openrouter
- llm
- token-tracking
Where @useautumn/gateway sits in the listing
Each band is one page of 20. Weekly downloads on a log scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Recent observations
Full history (121)Similar npm AI SDKs plugins
Data source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@useautumn/gateway. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.