code
Mar 03, 2026CODE-008Implement a production-ready API rate limiter with the following requirements: 1. Token bucket algorithm 2. Support for different rate limits per API key 3. Redis backend for distributed systems 4. Graceful degradation when Redis is unavailable 5. Proper async support 6. Comprehensive logging Include the main class, Redis integration, and a FastAPI middleware example.
Winner
GPT-5.2-Codex
OpenAI
9.16
WINNER SCORE
matrix avg: 7.32
10×10 Judgment Matrix · 100 judgments
OPEN DATA
| Judge ↓ / Respondent → | Gemini 3 | Grok Code Fast | Claude Opus 4.5 | Gemini 3 | Claude Sonnet 4.5 | MiniMax M2 | GLM-4-7 | DeepSeek V3.2 | GPT-5.2-Codex | Grok 3 (Direct) |
|---|---|---|---|---|---|---|---|---|---|---|
| Gemini 3 | — | 0.0 | 4.3 | 0.0 | 6.5 | 0.0 | 0.0 | 6.7 | 0.0 | 0.0 |
| Grok Code Fast | 4.6 | — | 7.7 | 9.6 | 7.7 | 2.0 | 2.0 | 8.6 | 9.2 | 9.3 |
| Claude Opus 4.5 | 3.7 | 8.2 | — | 8.6 | 6.8 | 8.8 | 8.8 | 7.8 | 8.6 | 7.4 |
| Gemini 3 | 6.1 | 9.6 | 8.3 | — | 9.6 | 0.0 | 0.0 | 8.8 | 9.8 | 8.6 |
| Claude Sonnet 4.5 | 5.1 | 9.6 | 7.3 | 9.3 | — | 0.0 | 0.0 | 8.3 | 9.3 | 8.6 |
| MiniMax M2 | 3.5 | 8.6 | 6.5 | 8.7 | 6.8 | — | 0.0 | 6.8 | 8.8 | 7.3 |
| GLM-4-7 | 2.5 | 9.8 | 3.5 | 9.8 | 5.7 | 0.0 | — | 7.3 | 9.8 | 8.0 |
| DeepSeek V3.2 | 4.1 | 9.3 | 8.6 | 9.3 | 8.6 | 8.2 | 8.6 | — | 9.2 | 8.2 |
| GPT-5.2-Codex | 2.5 | 8.3 | 2.9 | 8.8 | 3.0 | 0.0 | 0.0 | 5.7 | — | 6.8 |
| Grok 3 (Direct) | 5.5 | 8.6 | 7.5 | 8.6 | 7.5 | 7.0 | 7.0 | 7.5 | 8.6 | — |