Skip to main content
Every agent gets a bounded LLM timeout for free — no setting needed. Override it per agent when you need more or less.

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 with praisonaiagents 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. Passing timeout=None (or 0) drops the 600 s default and falls back to litellm’s own ~100 minute ceiling (the old behaviour).
Without the 600 s bound, a stuck provider can hang the agent for up to ~100 minutes per attempt. Prefer a large explicit value like 1800 instead.

Best Practices

A large explicit timeout still bounds a stuck provider. Prefer 1200 or 1800 for very slow local models over an unbounded wait.
Keep the default and raise timeout only for the specific agent that needs it.
PRAISONAI_LLM_TIMEOUT only affects the framework registry / gateway layer. To change the timeout for a praisonaiagents agent, set timeout in its llm dict.
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.

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