Model Fallback Input • AI Agent SDK
ModelFallbackInput: Input for MODEL_FALLBACK hooks (primary model unavailable mid-turn).
ModelFallbackInput
Defined in the events module.
AI Agent
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
strNo description available.
strNo description available.
strNo description available.
intNo description available.
Internal & Generic Methods
- to_dict: Generic utility method.
Source
View on GitHubpraisonaiagents/hooks/events.py at line 216