ZuploZuplo
LoginStart for Free
  • Documentation
  • API Reference
Introduction
Getting Started
    Develop in the portal
      1 - Setup Your Gateway2 - Rate Limiting3 - API Key Auth4 - Deploy5 - Dynamic Rate LimitingDynamic MCP Server - Quickstart
    Develop locally with the CLI
      1 - Setup Your Gateway2 - Rate Limiting3 - API Key Auth4 - Deploy5 - Dynamic Rate LimitingDynamic MCP Server - Quickstart
Concepts
Development
Policies
Handlers
API Keys
Rate Limiting
Caching
MCP Server
MCP Gateway
AI Gateway
    IntroductionGetting StartedSource ControlUniversal API
    Providers
    Teams
    Apps
    Policies
      OverviewAPI key authenticationModel FilteringFallback ModelBudgets and CostsSemantic cacheAkamai AI FirewallComet Opik tracingGalileo tracing
    Cookbooks
    Integrations
Developer Portal
Monetization
GraphQL
Deploying & Source Control
Analytics
Observability
Networking & Infrastructure
Account Management
Programming API
Build with AI
Zuplo CLI
Migration Guides
Platform LimitsVersion Support PolicySecuritySupportTrust & ComplianceChangelog
powered by Zudoku
Policies

Fallback Model

ai-gateway-fallback-model-v2

Fallback Model adds two kinds of backup to an app's model selection, per capability:

  • fallback—the model to try after a provider error that can be retried, or after a timeout.
  • quotaFallback—the model to use when a usage limit is hit, instead of rejecting the request. Budgets and Costs is what applies this.

fallbackTimeoutSeconds controls how long the gateway waits before giving up on the main model and trying the fallback. It defaults to 60 seconds and accepts 1 to 300. A fallback that names the same model as the main one is skipped.

This policy only enriches a model selection that already exists—it never creates one. An app whose chain has Fallback Model but no Model Filtering does nothing at all: the policy logs a warning and passes the request through unchanged. Place Fallback Model immediately after Model Filtering.

That ordering is also why a fallback can never widen what an app may reach—the filter has already accepted or rejected the request by the time this policy runs.

For the portal workflow and worked examples see Fallback Models; for every option see the generated reference.

Edit this page
Last modified on August 5, 2026
Model FilteringBudgets and Costs