Answers from the documentation; checking which model is on duty
Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
upstash-ratelimit-js - Skill - OpenSmartRoute
Skillv1.0.0
upstash-ratelimit-js
Rate limiting for serverless and edge apps with the @upstash/ratelimit TypeScript/JavaScript SDK backed by Upstash Redis.
Imported from upstash/skills (skills/upstash-ratelimit-js/SKILL.md) via skills.sh. Install upstream with npx skills add upstash/skills --skill upstash-ratelimit-js. Copyright stays with the author (MIT).
Rate Limit TS SDK
Quick Start
Install the SDK and connect to Redis.
Create a rate limiter and apply it to incoming operations.
Example:
import { Ratelimit } from "@upstash/ratelimit";import { Redis } from "@upstash/redis";const redis = new Redis({ url: "<url>", token: "<token>" });const limiter = new Ratelimit({ redis, limiter: Ratelimit.slidingWindow(5, "10s") });const { success } = await limiter.limit("user-id");if (!success) { // throttled}
Other Skill Files
algorithms.md: Describes all available rate‑limiting algorithms and how they behave.
pricing-cost.md: Explains pricing, Redis cost implications, and operational considerations.
features.md: Lists SDK features such as prefixes, custom keys, and behavioral options.
methods-getting-started.md: Full method reference for the SDK's API and getting started guide.
traffic-protection.md: Guidance on applying rate limiting for traffic shaping, abuse prevention, and protection patterns.
Installed into a catalogue, chosen by a router
Install upstash-ratelimit-js and it becomes one more candidate the router can pick - when it fits.
A listing is a routing target with a manifest: what it does, which domains it covers, what it costs and who publishes it. Once installed it sits beside your own models and tools, is scored like any other candidate for each request, and shows up in the trace when it wins. Ratings come from workspaces that installed it, one per account.
When a provider is down or over quota the request moves on; the trace says it did.
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
# after Install: the listing is in your workspace's routing pool - a plan picks it for its slotcurl-s-X POST https://osr-api.kindrock-caaab1a2.centralindia.azurecontainerapps.io/api/v1/route -H 'Authorization: Bearer $OSR_API_KEY' -H 'Content-Type: application/json' -d '{"text": "...", "plan": true}'
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.
upstash-skills-upstash-ratelimit-js.ocm.jsonjson
{
"ocm": "1",
"id": "upstash-skills-upstash-ratelimit-js",
"kind": "skill",
"name": "upstash-ratelimit-js",
"description": "Rate limiting for serverless and edge apps with the @upstash/ratelimit TypeScript/JavaScript SDK backed by Upstash Redis. Use when adding a rate limiter or throttling to an API route, Next.js middleware, Vercel Edge, Cloudflare Workers, or any HTTP endpoint; returning 429 Too Many Requests; choosing between fixed window, sliding window, and token bucket algorithms; limiting per user, IP, API key, or tenant with prefixes and custom keys; protecting login, signup, form, or AI endpoints from abuse, bots, and brute force; using deny lists, ephemeral caching, analytics, timeouts, and multi-region rate limits; or estimating the Redis command cost of rate limiting. Also use when the user says rate limit, rate-limiting, throttle, quota, request limits, or traffic protection.",
"publisher": "upstash",
"version": "1.0.0",
"capabilities": {
"domains": [
"coding"
],
"tags": [
"skill-md",
"skills-sh"
],
"languages": [
"en"
]
},
"quality_prior": 0.6,
"examples": [
"Rate limiting for serverless and edge apps with the @upstash/ratelimit TypeScript/JavaScript SDK backed by Upstash Redis. Use when adding a rate limiter or throttling to an API route, Next.js middleware, Vercel Edge, Cloudflare Workers, or any HTTP endpoint; returning 429 Too Many Requests; choosing between fixed window, sliding window, and token bucket algorithms; limiting per user, IP, API key, or tenant with prefixes and custom keys; protecting login, signup, form, or AI endpoints from abuse, bots, and brute force; using deny lists, ephemeral caching, analytics, timeouts, and multi-region rate limits; or estimating the Redis command cost of rate limiting. Also use when the user says rate limit, rate-limiting, throttle, quota, request limits, or traffic protection."
],
"primary": false,
"metadata": {
"source": {
"provider": "skills.sh",
"repository": "https://github.com/upstash/skills",
"path": "skills/upstash-ratelimit-js/SKILL.md",
"ref": "HEAD",
"url": "https://www.skills.sh/upstash/skills/upstash-ratelimit-js",
"key": "upstash/skills/skills/upstash-ratelimit-js/SKILL.md"
},
"license": "MIT"
},
"instructions": "# Rate Limit TS SDK\n\n## Quick Start\n- Install the SDK and connect to Redis.\n- Create a rate limiter and apply it to incoming operations.\n\nExample:\n```ts\nimport { Ratelimit } from \"@upstash/ratelimit\";\nimport { Redis } from \"@upstash/redis\";\n\nconst redis = new Redis({ url: \"<url>\", token: \"<token>\" });\nconst limiter = new Ratelimit({ redis, limiter: Ratelimit.slidingWindow(5, \"10s\") });\n\nconst { success } = await limiter.limit(\"user-id\");\nif (!success) {\n // throttled\n}\n```\n\n## Other Skill Files\n- **algorithms.md**: Describes all available rate‑limiting algorithms and how they behave.\n- **pric",
"cost": {
"context_tokens": 252
}
}
Fetch it by URL: GET /api/v1/registry/upstash-skills-upstash-ratelimit-js/manifest?version=1.0.0
Reviews
Star ratings from people who tried it. One review per account; edit yours any time.
No reviews yet. Install it, try it, and be the first to rate it.