Skip to content
Source
Sign inSign up
TanStack/schemas

Azure retail price list: retry 429 on each page #691

Send to my agent
Closedtombeckenham opened this issue 0 comments
tombeckenhamcommented

The Azure models poll fails with 429 Too Many Requests from the public Retail Prices API, about once a day and now on consecutive polls.

Evidence (PostHog ingest_failed, providerId azure)

UTCURLStatus
2026-11-19 00:46prices.azure.com/api/retail/prices?$filter=…429
2026-11-19 00:31…&$skip=1000 (page 2)429
2026-11-16 04:01first page429
2026-11-16 03:46first page429
2026-11-14 02:01first page429
2026-11-13 01:01…&$skip=1000 (page 2)429 ("Too many requests at this point. Please retry…")

Cause

fetchMeters in src/server/providers/azure-pricing.ts:247 walks the paged price list with plain fetchJson, which has no retry. A single 429 on any page fails the provider's whole price load.

Fix

Use the shared fetchWithRetry (src/server/providers/types.ts:891) for each page, as fal.ts and openai.ts already do. It retries 429/5xx with backoff, honours Retry-After (15s cap), and still throws with the URL after the last attempt, so it is not a silent fallback. Add a test where page 2 returns 429 once and then succeeds.

The poll should not swallow the failure: if every attempt fails it must still throw as it does today.

  1. tombeckenham assignedtombeckenham

  2. tombeckenham assignedtombeckenham

  3. tombeckenham linked this to #692

  4. tombeckenham closed this

Sign in to join this conversation.