Interface: FallbackProviderEntry
Defined in: packages/agentos/src/api/generateText.ts:263
A fallback provider entry specifying an alternative provider (and optionally model) to try when the primary provider fails with a retryable error.
See
GenerateTextOptions.fallbackProviders
Properties
cache?
optionalcache:false| {ttl?:"5m"|"1h"; }
Defined in: packages/agentos/src/api/generateText.ts:292
Per-hop prompt-cache disposition applied ONLY when THIS entry serves the
call (same override shape as FallbackProviderEntry.effort).
false sends zero cache_control on the hop; { ttl } re-times the
hop's markers. Omitted -> the hop inherits the call-level
GenerateTextOptions.cache.
The canonical chains (buildFallbackChain /
buildPolicyAwareFallbackChain) pin cache: false on every leg:
rescue traffic is sporadic and one-shot-shaped, so cache writes on a
fallback hop rarely earn their reads back (the claude-sonnet-5 leg
measured 0.45x write amortization in wilds prod, 2026-07-13..20 — the
writes cost ~2x what the reads saved). A caller-supplied entry keeps
full control: omit to inherit, or set a ttl to cache a hop deliberately.
effort?
optionaleffort:string
Defined in: packages/agentos/src/api/generateText.ts:276
Per-hop reasoning depth applied ONLY when THIS entry serves the call,
forwarded as output_config.effort (Anthropic) / reasoning_effort
(OpenAI). Lets a chain run a fallback at a different depth than the primary
— e.g. a gpt-5.5 frontier fallback at 'max' while the primary keeps its
own (or no) effort, so arming the chain is dormant for the primary call.
Omitted -> the hop inherits the call-level effort.
model?
optionalmodel:string
Defined in: packages/agentos/src/api/generateText.ts:267
Model identifier override. When omitted, the provider's default text model is used.
provider
provider:
string
Defined in: packages/agentos/src/api/generateText.ts:265
Provider identifier (e.g. "openai", "anthropic", "openrouter").