pydantic_ai.exceptions
ModelRetry
Bases:Exception
Exception raised when a tool function should be retried.
The agent will return the message to the model and ask it to try calling the function/tool again.
Source code inpydantic_ai_slim/pydantic_ai/exceptions.py
262728293031323334353637 |
|
UserError
Bases:RuntimeError
Error caused by a usage mistake by the application developer — You!
Source code inpydantic_ai_slim/pydantic_ai/exceptions.py
404142434445464748 |
|
AgentRunError
Bases:RuntimeError
Base class for errors occurring during an agent run.
Source code inpydantic_ai_slim/pydantic_ai/exceptions.py
515253545556575859606162 |
|
UsageLimitExceeded
Bases:AgentRunError
Error raised when a Model's usage exceeds the specified limits.
Source code inpydantic_ai_slim/pydantic_ai/exceptions.py
6566 |
|
UnexpectedModelBehavior
Bases:AgentRunError
Error caused by unexpected Model behavior, e.g. an unexpected response code.
Source code inpydantic_ai_slim/pydantic_ai/exceptions.py
697071727374757677787980818283848586878889909192 |
|
ModelHTTPError
Bases:AgentRunError
Raised when an model provider response has a status code of 4xx or 5xx.
Source code inpydantic_ai_slim/pydantic_ai/exceptions.py
95 96 97 98 99100101102103104105106107108109110111112113114115 |
|
FallbackExceptionGroup
Bases:ExceptionGroup
A group of exceptions that can be raised when all fallback models fail.
Source code inpydantic_ai_slim/pydantic_ai/exceptions.py
118119 |
|