An AI feature that answers well for one tester can fall over for a hundred customers. A load test sends many requests at once and reports what a product owner needs:
- p50 and p95 latency of the requests that succeeded, in milliseconds. Use the nearest-rank method: sort the values, take the one at position ceil(p/100 × n).
- Error rate: the share of all HTTP responses that were not 200, retries included.
- Cut-off replies: answers with
finish_reason == "length". They return 200 and look like successes. - Cost per 1,000 requests from the token usage, at Rs 0.05 per 1,000 prompt tokens and Rs 0.20 per 1,000 completion tokens.
This endpoint allows 8 requests in flight. Above that it answers 429 with a Retry-After header. A load test that gives up on a 429 measures nothing useful. One that retries without waiting makes things worse, and so do 50 clients that all retry at the same instant: add random jitter to each wait.
Your task
Send all 50 questions at once, retry every 429 after Retry-After, and print the figures. They are checked against the practice server's own log of your run. On submit it also runs against a busier endpoint.