You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Requires Python 3.12+. The Redis backend requires Redis 6.2+, standalone or Sentinel only — not Redis Cluster or client-side sharding (see [docs/operations.md](docs/operations.md)).
24
24
25
-
token-throttle follows strict semver: breaking changes ship only as major versions, and several recent majors were correctness hardening found through fault-injection testing rather than churn. Pin an exact major range (as shown above) and review the [CHANGELOG](CHANGELOG.md) before upgrading — each major's breaking changes and upgrade steps are recorded there. Public constants and type aliases: [docs/api.md](docs/api.md).
25
+
token-throttle is beta and follows strict semver. The recent major-version sequence reflects rapid beta development, with each incompatible API or correctness change released as a major. Pin an exact major range (as shown above) and review the [CHANGELOG](CHANGELOG.md) before upgrading — each major's breaking changes and upgrade steps are recorded there. Public constants and type aliases: [docs/api.md](docs/api.md).
26
26
27
27
## Quickstart
28
28
@@ -146,6 +146,10 @@ Unrecognized model names raise a clear error directing you to pass a custom
146
146
billing, so compare reserved tokens with actual usage periodically. Full
Anthropic's Messages API enforces RPM, input tokens/minute (ITPM), and output tokens/minute (OTPM) independently; most current models exclude cache reads from ITPM, while OTPM counts actual output rather than `max_tokens`. The runnable [Anthropic prompt-caching example](examples/anthropic_prompt_caching.py) uses the Anthropic SDK's server-side token count, reserves ITPM and an observed output p99 separately, pre-warms a cache entry, refunds from the response's actual usage, and logs the two remaining-token headers. Supply the real limits from Claude Console (Settings > Limits) or the Rate Limits API instead of copying a tier table. Provider contracts: [rate limits](https://platform.claude.com/docs/en/api/rate-limits), [token counting](https://platform.claude.com/docs/en/build-with-claude/token-counting), and [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching).
152
+
149
153
### Any provider (manual usage)
150
154
151
155
The manual acquire -> refund pattern that `reserve()` wraps, with explicit error handling:
0 commit comments