#18730 [Bug]: Concurrent requests can bypass TPM rate limits
### What happened?
When multiple requests are sent concurrently, they can bypass the TPM (Tokens Per Minute) rate limit entirely. All concurrent requests execute successfully, even when their combined token usage far exceeds the configured limit.
### The Problem
**Example Scenario:**
Configure a team with **100 TPM limit**. Send 5 concurrent requests:
| Request | Tokens Used | Cumulative Tokens | Result | | ------- | ----------- | ----------------- | ------ | | 1 | 58 | 58 | SUCCESS | | 2 | 80 | 138 | SUCCESS | | 3 | 175 | 313 | SUCCESS | | 4 | 175 | 488 | SUCCESS | | 5 | 175 | 663 | SUCCESS |
All 5 requests succeed, consuming **663 tokens** total ā over **6x the configured limit** of 100 TPM!
### Steps to Reproduce
1. Create a team with a low TPM limit (e.g., 100 TPM) 2. Create an API key for that team 3. Send multiple concurrent requests simultaneously
```typescript const tpmLimit = 100; const team = await createTestTeam({ tpmLimit: tpmLimit, rpmLimit: 100, });
const key = await createTestKey({ teamId: team.teamId }); const cā¦