Quick Start
1
Do nothing — you get a 600s bound
No timeout set → each request is bounded to 600 seconds (10 minutes). A black-holed provider stops the turn after 10 minutes instead of litellm’s 100-minute ceiling.
2
Set your own timeout
An explicit
timeout always wins over the default.How It Works
There are two timeout layers. Agents built withpraisonaiagents use the first one.
Why 600 s? It matches the OpenAI SDK default already used for bare model names, so every route has the same bound. It is long enough for non-streaming reasoning-model calls that legitimately exceed 2 minutes, while cutting a stuck call from 100 minutes to 10.
Streaming: for streaming calls the 600 s is a read-gap bound (max gap between chunks), not the total duration — a slow stream that keeps sending data is not cut off.
Configuration Options
An invalid
PRAISONAI_LLM_TIMEOUT (e.g. abc) safely falls back to 60 seconds and logs a warning — a bad value never breaks a run.Opting Out
Rarely needed. Passingtimeout=None (or 0) drops the 600 s default and falls back to litellm’s own ~100 minute ceiling (the old behaviour).
Best Practices
Raise the timeout, don't remove it
Raise the timeout, don't remove it
A large explicit
timeout still bounds a stuck provider. Prefer 1200 or 1800 for very slow local models over an unbounded wait.Override per agent for one slow model
Override per agent for one slow model
Keep the default and raise
timeout only for the specific agent that needs it.Know which layer you're on
Know which layer you're on
PRAISONAI_LLM_TIMEOUT only affects the framework registry / gateway layer. To change the timeout for a praisonaiagents agent, set timeout in its llm dict.Registry retries are bounded on purpose
Registry retries are bounded on purpose
The registry default
num_retries=2 recovers from transient blips without amplifying a real outage into a retry storm. Raise it only when a provider is known-flaky.Related
LLM Configuration
Full reference for timeouts, retries, and headers
Model Fallback
Switch models when a provider fails
Tool Timeout
Bound tool execution the same way
Models
Configure providers and model names

