Skip to content

fix(sdk): do not retry a 429 quota_exceeded of the evals routes - #213

Merged
ephraimduncan merged 1 commit into
mainfrom
fix/sdk/no-retry-quota-exceeded
Nov 7, 2026
Merged

ephraimduncan merged 1 commit into
mainfrom
fix/sdk/no-retry-quota-exceeded

Conversation

@ephraimduncan

@ephraimduncan ephraimduncan commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

When a workspace got to a cap of its plan, runExperiment and run_experiment waited approximately 2 minutes before they failed. The Evals routes of ingest answer 429 quota_exceeded with a Retry-After at the start of the next month. The two SDKs tried each 429 again, after a wait of 60 seconds at most, and got the same 429 each time. The run now fails at once with the error of the server, whose message names the cap.

A 429 with the code quota_exceeded gets no retry. This rule also covers a gift budget: its 429 has no Retry-After, so the SDKs tried it again after 1 and then 2 seconds. A 429 with a Retry-After of more than 60 seconds also gets no retry, because a retry at 60 seconds gets the same 429. The rate limit of the API counts by the minute, thus its rate_limited 429 keeps its retry. A 503 keeps its wait of 60 seconds at most.

score() sends one request with no retry, so it does not change. The two READMEs and docs/sdk-conformance.md describe the new rule.

After this merges, telemetry.dev must pin the new SDK and copy the new retry text into its own docs/sdk-conformance.md. telemetry-dev/telemetry.dev#1090 tracks that work.

Fixes telemetry-dev/telemetry.dev#696

Tests: vp test run tests/experiments.test.ts tests/scores.test.ts and vp test run --changed in packages/sdk, and uv run pytest in sdks/python.

The evals routes of ingest answer 429 quota_exceeded when a write goes
past a cap of the plan. The Retry-After is the start of the next month,
or the header is absent for a gift budget. The two SDKs tried each 429
again, thus an experiment waited approximately 2 minutes for 3 attempts
that could not be successful.

A 429 quota_exceeded, or a 429 with a Retry-After of more than 60
seconds, now fails at once with the error of the server. A 503 keeps
its wait of 60 seconds at most.
@ephraimduncan
ephraimduncan merged commit c2eddb5 into main Nov 7, 2026
10 checks passed
@aikins01 aikins01 mentioned this pull request Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant