🧩fallbackModel Option
Also known as fallback_model, Agent SDK fallback model, Claude Agent SDK fallbackModel
The option that names a spare model to use when the main one fails.
Think of it like
It is like a spare driver. If the first one gets sick, the spare one drives.
Example
An agent runs on a busy model that fails now and then. With a spare model set, those runs finish on the spare instead of failing.
Why it matters
An agent that stops halfway can leave work half done. A back-up model keeps it going.
Definition
Example code
typescript
model: "opus", fallbackModel: "sonnet"Common mistake
Key takeaways
- 1Used on failure. Not by choice.
- 2One or a list. Split by commas.
- 3Same as the setting. fallbackModel in Claude Code.