Why max_output_tokens = 4,000 brings 429s
The rate limiter does not wait to see how long the answer is. When a request arrives it adds prompt + max_output_tokens to this minute's running count, and once that count reaches the deployment's TPM, every further request in the minute gets HTTP 429. Turn the knob and watch the column.
Try it
- Watch one minute at 4,000. Note when the lamp lights and how full the passed tray is by then.
- Before you turn the knob, predict how many of the 40 requests pass at 1,000. Then set it and check the readout at 0:59.
- Set 300. All 40 pass, yet the answers are exactly as long as before: only the reservation changed.
What the bench leaves out
The real estimate is approximate (it is based partly on character count) and also includes best_of. RPM is checked separately over short windows of 1 or 10 seconds; at 40 requests a minute it is not the limit here. Billing counts the tokens really processed, not the estimate.
Source: Microsoft Learn, Azure OpenAI quota management: Understanding rate limits.