08. Token Tracking

Chapter 8 of 24 · 15 min
EXERCISE

Implement a rate limiting system that tracks tokens per minute (TPM) for a workspace. If a workspace exceeds their tier's TPM limit, return a 429 response. Include both synchronous checking and background quota monitoring.