> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Model Fallback Input • AI Agent SDK

> ModelFallbackInput: Input for MODEL_FALLBACK hooks (primary model unavailable mid-turn).

# ModelFallbackInput

> Defined in the [**events**](../modules/events) module.

<Badge color="blue">AI Agent</Badge>

Input for MODEL\_FALLBACK hooks (primary model unavailable mid-turn).

Fired by the agent's LLM recovery loop at the exact point it swaps the
primary model for the next entry in the configured `fallback_models`
chain, so an otherwise silent quality/cost degradation becomes an
observable state transition (Issue #3820). Notification only: the turn
continues on `to_model`. Only the failure class is exposed
(`reason_category`) — provider internals stay redacted, mirroring the
redaction discipline of the other error-path events.

## Properties

<ResponseField name="from_model" type="str">
  No description available.
</ResponseField>

<ResponseField name="to_model" type="str">
  No description available.
</ResponseField>

<ResponseField name="reason_category" type="str">
  No description available.
</ResponseField>

<ResponseField name="fallback_index" type="int">
  No description available.
</ResponseField>

<Accordion title="Internal & Generic Methods">
  * **to\_dict**: Generic utility method.
</Accordion>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/hooks/events.py#L216">
  `praisonaiagents/hooks/events.py` at line 216
</Card>
