-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AI gateway] Request timeouts for fallback providers #19391
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, 1 total issue(s) found.
You can use the Universal endpoint to contact every provider. The payload is expecting an array of message, and each message is an object with the following parameters: | ||
|
||
- `provider` : the name of the provider you would like to direct this message to. Can be OpenAI, workers-ai, or any of our supported providers. | ||
- `endpoint`: the pathname of the provider API you’re trying to reach. For example, on OpenAI it can be `chat/completions`, and for Workers AI this might be [`@cf/meta/llama-3.1-8b-instruct`](/workers-ai/models/llama-3.1-8b-instruct/). See more in the sections that are specific to [each provider](/ai-gateway/providers/). | ||
- `authorization`: the content of the Authorization HTTP Header that should be used when contacting this provider. This usually starts with “Token” or “Bearer”. | ||
- `headers`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kathayl, I think this is accurate, but fact check me here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switched from caching and authentication to caching and custom metadata.
bc authentication is at the level of the request, not provider.
- `query`: the payload as the provider expects it in their official API. | ||
|
||
## cURL example | ||
|
||
The following example shows a simple setup with a primary model and a [fallback](/ai-gateway/configuration/fallbacks/) option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wanted to add more cross-links over to fallbacks page
@@ -41,6 +41,10 @@ entries: | |||
general_definition: |- | |||
Header to [bypass caching for a specific request](/ai-gateway/configuration/caching/#skip-cache-cf-aig-skip-cache). | |||
|
|||
- term: cf-aig-request-timeout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adds automatically to headers glossary page
Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
Deploying cloudflare-docs with Cloudflare Pages
|
Makes the `skip_region_validation = true` and related options clearer.
* Use 'Cloudflare origin CA' more consistently and callout proxied traffic * Create origin-ca folder and add placeholder page for ts * Create partial for pause CF error * Add NET::ERR_CERT_AUTHORITY_INVALID and solutions * Add origin server errors and list necessary root CA files * Fix missing period Co-authored-by: Pedro Sousa <[email protected]> * Reword troubleshooting steps for proxying on and off --------- Co-authored-by: Pedro Sousa <[email protected]>
* Feature nodejs compat issues in troubleshooting * thomasgauvin: fix formatting on hyperdrive nodejs errors troubleshooting page * thomasgauvin: nit
Summary
New feature, request timeouts for fallback providers.
Updated several pages in AI gateway docs + changelog entry.