Open source
AI Key Scheduler
A local-first scheduler for AI API keys, rate limits, retries, cooldowns, and provider fallback.
github.com/Amon20044/AI-Key-SchedulerTL;DR
Rate limits shouldn't become application logic. A small tool built around a recurring problem. Not every engineering contribution needs a giant system. Sometimes the useful thing is a careful abstraction that removes one source of repeated mistakes.
The problem
An AI application may have multiple providers, models, and API keys.
When a key hits a quota, a provider route fails, or a request times out, the application needs a consistent recovery strategy.
Without a shared abstraction, every developer eventually writes another version of the same key-rotation and retry logic.
What I built
AI Key Manager is a local-first scheduler for TypeScript and Node.js.
It selects eligible keys, manages cooldowns, detects rate-limit failures, and supports fallback between configured provider and model groups.
The main abstraction wraps the application call so developers can focus on generation rather than manually coordinating keys.
The decisions that matter
- Secrets stay secret. Keys are handled as sensitive values with explicit access rather than ordinary strings.
- State without exposure. Optional persisted scheduler state excludes raw API keys.
- Visible fallback. Provider fallback stays visible to the execution callback, so the application knows which provider and model are actually handling a request.
- Failure is public behavior. Timeouts, cancellation, and exhausted-key states are part of the public API.
