OpenAICloudflare Developer PlatformApr 2, 2026, 12:00 AM

AI Gateway - Automatically retry on upstream provider failures on AI Gateway

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

openaienmodel: gpt-5-mini-2025-08-07

AI Gateway - Automatically retry on upstream provider failures

Key Points

  • Gateway-level automatic retries
  • Configurable attempts, delay, and backoff
  • Per-request overrides; use Dynamic Routing for multi-provider failover

Summary

AI Gateway now performs automatic retries for failed upstream provider requests at the gateway level. This lets you apply retry logic centrally (without changing clients) and handle transient upstream errors before they reach callers.

Key Points

  • Gateway-level retries configurable globally and overridden per request via headers.
  • Retry options:
    • count: up to 5 attempts
    • delay: 100ms to 5s
    • backoff: Constant, Linear, or Exponential
  • Defaults apply to all gateway requests unless a per-request header override is provided.
  • Use this when clients cannot implement retry logic; for cross-provider failover or more advanced routing, use Dynamic Routing.
  • See Manage gateways for full configuration and API details.

Full Translation

Translations

A translation section that keeps the flow of the original article.

openaijamodel: gpt-5-mini-2025-08-07

AI Gateway — 上流プロバイダー障害時の自動リトライ機能

AI Gateway — 上流プロバイダー障害時の自動リトライ機能

AI Gatewayはゲートウェイレベルでの自動リトライをサポートしました。上流プロバイダーがエラーを返した場合、ゲートウェイはクライアント側の変更を必要とせずに、設定したリトライポリシーに基づいてリクエストを再試行します。

機能の概要

  • リトライ回数: 最大 5 回まで設定可能
  • リトライ間隔: 100ms5 seconds の範囲で設定可能
  • バックオフ戦略: ConstantLinearExponential のいずれかを選択可能
  • これらのデフォルト設定はゲートウェイ経由のすべてのリクエストに適用され、個別リクエストのヘッダーで上書きできます

利点

  • クライアント(呼び出し元)を制御できず、クライアント側にリトライロジックを実装できない場合でも、ゲートウェイ側で再試行を行えるため可用性が向上します。

注意点

  • 異なるプロバイダー間でのフェイルオーバーなど、より複雑なフェイルオーバーシナリオが必要な場合は、Dynamic Routing を使用してください。

詳細と関連情報

  • 詳しくは Manage gateways を参照してください。

公開日: 2026-04-02T00:00:00.000Z