Skip to content

Tutorial 4: Multi-Provider Fallback

Status: Stub. The full content ships after the fallback_policy ADT plus a Provider_fallback_attempted event land. Neither has shipped yet.

This tutorial will demonstrate configuring two providers (OpenAI as primary, Anthropic as standby), then triggering a fallback when the primary returns Rate_limited. You will subscribe to the Provider_fallback_attempted event for observability so a dashboard can show when and why the runtime switched.

The planned walkthrough:

  1. Register both providers in one config, mark OpenAI as the default.
  2. Configure a fallback_policy that retries on Rate_limited and External_failure, then crosses over to the standby provider.
  3. Drive the primary into a rate limit and watch the runtime fail over transparently.
  4. Subscribe to Provider_fallback_attempted and log every crossover.

Until A.3 ships: PAR holds one active provider per runtime. Switching is manual via the CLI or the registry API. See the provider integration material in the how-to guides for current single-provider usage, and Tutorial 1: RAG Q&A Bot for a runnable end-to-end example against one provider.