Tutorial 4: Multi-Provider Fallback¶
Status: Stub. The full content ships after the
fallback_policyADT plus aProvider_fallback_attemptedevent 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:
- Register both providers in one config, mark OpenAI as the default.
- Configure a
fallback_policythat retries onRate_limitedandExternal_failure, then crosses over to the standby provider. - Drive the primary into a rate limit and watch the runtime fail over transparently.
- Subscribe to
Provider_fallback_attemptedand 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.