Skip to content

Commit 417af69

Browse files
authored
Update fallbacks.mdx
1 parent 4b0d155 commit 417af69

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/content/docs/ai-gateway/configuration/fallbacks.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ sidebar:
77

88
import { Render } from "~/components";
99

10-
Specify model or provider fallback with your [Universal endpoint](/ai-gateway/providers/universal/) to specify what to do if a request fails.
10+
Specify model or provider fallbacks with your [Universal endpoint](/ai-gateway/providers/universal/) to handle request failures and ensure reliability.
11+
12+
Fallbacks are currently triggered only when a request encounters an error. We are working to expand fallback functionality to include time-based triggers, which will allow requests that exceed a predefined response time to timeout and fallback.
1113

1214
## Example
1315

14-
For example, you could set up a gateway endpoint that:
16+
In the following example, a request first goes to the [Workers AI](/workers-ai/) Inference API. If the request fails, it falls back to OpenAI. The response header `cf-aig-step` indicates which provider successfully processed the request.
1517

1618
1. Sends a request to Workers AI Inference API.
1719
2. If that request fails, proceeds to OpenAI.

0 commit comments

Comments
 (0)