惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
C
Check Point Blog
博客园_首页
B
Blog
D
Docker
U
Unit 42
量子位
I
InfoQ
有赞技术团队
有赞技术团队
Martin Fowler
Martin Fowler
GbyAI
GbyAI
L
LangChain Blog
云风的 BLOG
云风的 BLOG
博客园 - Franky
美团技术团队
T
The Blog of Author Tim Ferriss
阮一峰的网络日志
阮一峰的网络日志
月光博客
月光博客
Vercel News
Vercel News
Recent Announcements
Recent Announcements
雷峰网
雷峰网
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
Google DeepMind News
Google DeepMind News

Vercel News

Vercel Open Source Program: Winter 2026 cohort How Notion Workers run untrusted code at scale with Vercel Sandbox How we run Vercel's CDN in front of Discourse From idea to secure checkout in minutes with Stripe Building Slack agents can be easy Scaling redirects to infinity on Vercel Advancing Python typing Gamma builds design-first agents with Vercel How Avalara turns pipe dreams into patent-pending with v0 Keeping community human while scaling with agents How OpenEvidence built a healthcare AI that physicians actually trust Security boundaries in agentic architectures Skills Night: 69,000+ ways agents are getting smarter Video Generation with AI Gateway We Ralph Wiggumed WebStreams to make them 10x faster How Stably ships AI testing agents in hours, not weeks How we built AEO tracking for coding agents Anyone can build agents, but it takes a platform to run them Introducing Geist Pixel The Vercel AI Accelerator is back with $6m in credits Making agent-friendly pages with content negotiation The Vercel OSS Bug Bounty program is now available Introducing the new v0 Run untrusted code with Vercel Sandbox, now generally available How Stripe built a game-changing app in a single flight with v0 How Sensay went from zero to product in six weeks AGENTS.md outperforms skills in our agent evals Agent skills explained: An FAQ Testing if "bash is all you need" AWS databases are now live on the Vercel Marketplace and v0
Customize timeouts for faster automatic failover on Verce...
Rohan TanejaSoftware Engineer, AI GatewayJerilyn ZhengProduct, A · 2026-03-05 · via Vercel News

AI Gateway now supports per-inference provider timeouts for faster failover than the provider default. If a provider doesn't start responding within your configured timeout, AI Gateway aborts the request and falls back to the next available provider.

Provider timeouts are available in beta for BYOK (Bring Your Own Key) credentials only, with support for system provider timeouts coming soon. Note that some providers don't support stream cancellation, so you may still be charged for timed-out requests depending on the provider.

Basic usage

Set timeouts per provider in milliseconds using providerTimeouts in providerOptions.gateway.

/* In this example, the BYOK credentials for GPT 5.4 would timeout

after 15 seconds and fallback to system credentials. */

const result = streamText({

model: 'openai/gpt-5.4',

prompt,

providerOptions: {

gateway: {

providerTimeouts: {

byok: { openai: 15000 }, // 15 seconds

},

},

},

});

Advanced usage with multiple providers and failover

Use with order to control both the provider sequence and failover speed.

/* This example tries Anthropic first with a 10-second timeout, falls back to Bedrock

with 15 seconds, then Vertex with the default gateway timeout. */

const result = streamText({

model: 'anthropic/claude-sonnet-4.6',

prompt,

providerOptions: {

gateway: {

order: ['anthropic', 'bedrock', 'vertex'],

providerTimeouts: {

byok: {

anthropic: 10000,

bedrock: 15000,

},

},

},

},

});

This example tries Anthropic first with a 10-second timeout, falls back to Bedrock with 15 seconds, then Vertex with the default gateway timeout.


For more information, read the custom provider timeouts documentation.