You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Request timeouts and Request retries with AI Gateway
3
+
description: AI Gateway has added additional request handing, with request timeouts and request retries
4
+
products:
5
+
- ai-gateway
6
+
date: 2025-02-05T11:00:00Z
7
+
---
8
+
9
+
AI Gateway adds additional ways to handle requests - [Request Timeouts](/ai-gateway/configuration/request-handling/#request-timeouts) and [Request Retries](/ai-gateway/configuration/request-handling/#request-retries). This helps allowing you to manage AI interactions effectively and ensure your applications remain responsive and reliable.
10
+
11
+
These can be used on both the [Universal Endpoint](/ai-gateway/providers/universal) or directly to a [supported provider](/ai-gateway/providers/).
12
+
13
+
**Request timeouts**
14
+
- A [request timeout](/ai-gateway/configuration/request-handling/#request-timeouts) allows you to trigger [fallbacks](/ai-gateway/configuration/fallbacks/) or a retry if a provider takes too long to respond.
15
+
16
+
To set a request timeout directly to a provider, add a `cf-aig-request-timeout` header.
- A [request retry](/ai-gateway/configuration/request-handling/#request-retries) automatically retries failed requests, so you can recover from temporary issues without manual intervention.
27
+
28
+
To set up request retries directly to a provider, add the following headers:
0 commit comments