Skip to content

Weir rounds wait out the public API's rate limit instead of skipping models - #88

Merged
tensorlink-dev merged 1 commit into
mainfrom
fix/weir-rate-limit-429
Oct 22, 2026
Merged

tensorlink-dev merged 1 commit into
mainfrom
fix/weir-rate-limit-429

Conversation

@tensorlink-dev

Copy link
Copy Markdown
Owner

Both 2026-10-22 rounds through the public Ephemeris API scored only chronos2 from the panel:

ok   chronos2 (1280 forecasts)
skip timesfm25: POST /forecast: HTTP 429: {"error":"Rate limit exceeded"}
... (toto2-313m, tirex2, patchtst-fm-r2, timestral-209m, flowstate-r1, paracast-ensemble, paracast-router: same)

The public API limits each account to 10 forecasts/min with a burst of 20. A round sends ~25 requests per model, so the burst ran out after chronos2. _call treated every 4xx as a contract error and never retried, so the remaining models were each skipped on their first 429.

Change: a 429 now waits Retry-After (clamped 1–120 s, default 6 s) and retries. These waits don't count against retries, and each call can wait at most rate_limit_wait (15 min) in total. Rejected requests are not charged, and a forecast reuses its idempotency key across attempts. The transport may return response headers as an optional third element, so existing 2-tuple test transports are unchanged.

Cost: about 225 requests per round at 10/min adds roughly 20–25 min. Runs take about 70 min against the 240 min job timeout.

Tests: two new cases (Retry-After honoured with the same key; gives up after the wait budget). tests/test_paracast_client.py and tests/test_publish_round.py pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FAm6t3mTkhrKZKke8GzULi

…models

The 2026-10-22 rounds through Ephemeris scored only chronos2: the account's
burst (20 forecasts, then 10/min) ran out and every later row was skipped on
its first 429, because the client treated all 4xx as contract errors.
A 429 now waits Retry-After and retries without spending `retries`, up to
`rate_limit_wait` (15 min) per call; the forecast keeps its idempotency key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FAm6t3mTkhrKZKke8GzULi
@tensorlink-dev
tensorlink-dev merged commit 6b70a1c into main Oct 22, 2026
@tensorlink-dev
tensorlink-dev deleted the fix/weir-rate-limit-429 branch October 22, 2026 21:19
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