Skip to content

fix(sync-model-stats): extend AA retry budget#3089

Closed
kilo-code-bot[bot] wants to merge 1 commit intomainfrom
fix/sync-model-stats-extend-aa-retries
Closed

fix(sync-model-stats): extend AA retry budget#3089
kilo-code-bot[bot] wants to merge 1 commit intomainfrom
fix/sync-model-stats-extend-aa-retries

Conversation

@kilo-code-bot
Copy link
Copy Markdown
Contributor

@kilo-code-bot kilo-code-bot Bot commented May 7, 2026

Summary

The sync-model-stats cron was reporting Artificial Analysis 500s to Sentry even when the AA API itself indicated transient retryable errors (e.g. Could not query the database for the schema cache. Retrying.). The previous retry budget of 10s only allowed a handful of attempts before fetchWithBackoff returned the failed response and the route surfaced it to Sentry.

This bumps the AA fetch budget to 2s base / 120s max, so we only get a Sentry report once retries are truly exhausted.

Verification

N/A — config-only change to retry timing.

Visual Changes

N/A

Reviewer Notes

The cron runs periodically; a 120s upper bound for the AA fetch is well within Vercel cron limits and only kicks in on sustained 5xx/429 responses.

@kilo-code-bot
Copy link
Copy Markdown
Contributor Author

kilo-code-bot Bot commented May 7, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • apps/web/src/lib/model-stats/sync-artificial-analysis.ts

Reviewed by gpt-5.5-2026-04-23 · 217,557 tokens

@chrarnoldus chrarnoldus closed this May 7, 2026
@chrarnoldus chrarnoldus deleted the fix/sync-model-stats-extend-aa-retries branch May 7, 2026 09:02
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