Skip to main content
On lean installs (no litellm), PraisonAI still detects what each model can do — structured outputs, function calling, prompt caching, and web search — via a conservative built-in heuristic. You installed PraisonAI without extra dependencies, and structured outputs still work.

Quick Start

1

Install lean (no litellm)

Capability gating stays usable — gpt-4o still reports structured-output support without litellm.
2

Add litellm for authoritative detection

Same code, now backed by litellm’s live catalogue — recommended for production and for newly-released models.

How It Works

Each supports_* helper checks for litellm first, then falls back to the static heuristic only when litellm is absent. litellm stays authoritative whenever it is installed — even when a helper is missing or raises, the result is False rather than the heuristic, so an unsupported param never reaches a provider request. The static heuristic runs only when litellm is None.

What each model gets on a lean install

These are the exact patterns from the static heuristic — names are lowercased and any provider/ prefix is stripped before matching. ¹ Only *-search-preview variants (e.g. gpt-4o-search-preview) report native web search. ² Claude uses web_fetch instead of native web search, so it is intentionally excluded from the web-search heuristic — this is expected, not a bug. ³ Mistral / Mixtral / Llama / Grok report serial function calling but not parallel — the parallel heuristic is deliberately narrower. ⁴ Function calling is disabled by design for embedding, whisper, tts, and dall-e model names.
The web-search heuristic also matches any model name containing the literal substring search, plus gemini-2 and grok-3. Anthropic Claude is excluded on purpose.

Lean or full install?

Use this to decide whether the lean install is enough or whether you should add litellm.

When to install litellm anyway

Add litellm when a wrong True would break a real request.
  • Newly released models with no matching pattern — the heuristic returns False until you add litellm.
  • Non-standard model IDs — custom deployments, self-hosted proxies, or renamed models.
  • Production workloads where a wrong True would send an unsupported response_format or web_search_options param and fail the call.
The helpers live at praisonaiagents.llm.model_capabilities, but you never call them directly — the Agent uses them for you. Just install litellm when you need authoritative detection.

Best Practices

The static heuristic is conservative, not exhaustive. For production traffic, pip install litellm so capability detection matches each provider’s live catalogue.
When you target a single provider and want a small footprint, skip litellm. Structured outputs, function calling, and prompt caching still gate correctly for mainstream models.
When litellm is installed but a helper is missing or raises, the result is False — not the heuristic. Don’t wrap these helpers with your own fallback; that would send unsupported params to the provider.
A novel model with no matching pattern reports False across the board on a lean install. Install litellm before shipping support for a new provider so its capabilities are detected.

Lite Package (BYO-LLM)

A different feature — the praisonaiagents.lite subpackage with LiteAgent, not the litellm-free capability fallback.

Installation Extras

Optional dependency groups for bots, gateway, and storage.

Model Fallback

Fall back across models — also uses capability info.

Model Capabilities

Higher-level model-selection layer, distinct from these supports_* helpers.