diff --git a/Home.md b/Home.md deleted file mode 100644 index 67f308f..0000000 --- a/Home.md +++ /dev/null @@ -1,32 +0,0 @@ -# go-ratelimit Wiki - -Token counting, model quotas, and sliding window rate limiter. Module: `forge.lthn.ai/core/go-ratelimit` - -## Architecture - -Provides rate limiting primitives for AI model API calls. Tracks token usage per model, enforces quotas, and implements sliding window algorithms. - -### Features - -- **Token counting**: Estimate token usage before API calls -- **Model quotas**: Per-model rate limits with configurable windows -- **Sliding window**: Smooth rate limiting without burst spikes -- **YAML config**: Load quota definitions from configuration files - -### Usage - -```go -limiter := ratelimit.New(ratelimit.Config{ - Models: map[string]ratelimit.ModelQuota{ - "claude-opus-4": {TokensPerMinute: 100000, RequestsPerMinute: 60}, - }, -}) - -if limiter.Allow("claude-opus-4", estimatedTokens) { - // proceed with API call -} -``` - -## Dependencies - -- `gopkg.in/yaml.v3` — Configuration parsing