Skip to content

feat: add timeout, retry, and failure recovery for AI/LLM requests (#786)#983

Open
aaniya22 wants to merge 2 commits into
SdSarthak:mainfrom
aaniya22:feat/ai-resilience-786
Open

feat: add timeout, retry, and failure recovery for AI/LLM requests (#786)#983
aaniya22 wants to merge 2 commits into
SdSarthak:mainfrom
aaniya22:feat/ai-resilience-786

Conversation

@aaniya22

@aaniya22 aaniya22 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Closes #786

Changes

Added timeout, retry, and failure recovery directly into the existing
axios instance in api.ts via the response interceptor.

  • 30s timeout on all requests via axios timeout config
  • Auto-retry up to 3x on 5xx, network failure, or timeout
  • Exponential backoff: 500ms → 1s → 2s between retries
  • Structured JSON error logging (url, method, status, attempt, message)
  • Zero changes to existing API callers — works transparently

aaniya22 added 2 commits June 5, 2026 20:50
…dSarthak#786)

- 30s timeout via axios instance config
- auto-retry up to 3x on 5xx / network failure / timeout
- exponential backoff: 500ms, 1s, 2s
- structured JSON error logging with url, status, attempt
- zero changes to existing API callers
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.

Add Timeout, Retry, and Failure Recovery Handling for AI/LLM Requests

1 participant