For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
Resources
Log inGet a demo
GuidesAPI reference
GuidesAPI reference
    • Get started
    • Install skills
  • Features
    • Projects
    • Cost governance and savings
      • Overview
      • Using policies
      • Single provider
      • Priority
      • Performance
      • Intelligent
    • Tool calling
    • Web search
    • Context compression
  • Security & Compliance
    • Customer blocklist
    • Geo-location routing
    • Prompt injection protection
    • Data loss prevention
    • Audit trail
    • Roles and permissions
    • Zero data retention
    • Provider terms

Get started

  • Overview
  • Introduction
  • Unified API
  • Linked Account
  • Merge Link
  • Use cases

Implementation

  • Sandboxes
  • SDKs
  • API access
  • Syncing data
  • Writing data
  • Data minimization
  • Supplemental data
  • Errors
  • Integration metadata

API reference

  • ATS
  • HRIS
  • Accounting
  • Ticketing
  • CRM
  • File Storage
  • Knowledge Base
  • Chat

Resources

  • Help Center
  • Merge.dev
  • Changelog
© Merge 2026Terms of usePrivacy policy
UnifiedAgent HandlerGateway
UnifiedAgent HandlerGateway
Resources
Log inGet a demo
FeaturesRouting policies

Priority

Deterministic multi-provider failover in priority order

Was this page helpful?
Previous

Single provider

Next

Performance strategies

The Priority strategy tries providers in the order you define. If the first provider fails (timeout, rate limit, 5xx error), the request automatically goes to the next provider in line.

In policy definitions, this strategy uses "type": "fallback" inside default_strategy. The dashboard refers to it as Priority. The JSON below is a policy definition, set once when creating the routing policy, not a field on the POST /responses request body.

Best for: High availability setups and automatic recovery from provider outages.

1{
2 "name": "HA Priority",
3 "default_strategy": {
4 "type": "fallback",
5 "providers": [
6 { "provider": "openai", "model": "gpt-5.2", "priority": 1 },
7 { "provider": "google", "model": "gemini-2.5-flash", "priority": 2 },
8 { "provider": "anthropic", "model": "claude-sonnet-4-20250514", "priority": 3 }
9 ]
10 }
11}

Requests go to the highest-priority provider (lowest priority number). On failure, Gateway automatically retries with the next provider in the list, continuing until a provider succeeds or all providers are exhausted.

Gateway tracks provider health automatically. If a provider accumulates failures, it is temporarily skipped so requests aren’t wasted on a provider that’s down.