Quick Start
As of PraisonAI 4.6.106 (PR #2549),
ModelCatalogue is a first-class module of the standalone praisonai-code package. The models commands work without installing the full praisonai wrapper:Browse all models
List every available model grouped by provider:Filter to a single provider:Search by name substring:
Agent-Centric Example
Use the catalogue to pick the right model for your agent before you run it:llm: values emit a warning at load time, and pairing tools: with a non-tool-calling model (like o1) triggers a compatibility warning:
YAML aliases defined under a top-level
models: key are accepted even if they are not in the catalogue. This lets you point to custom or private deployments without triggering warnings.How It Works
Data sources — priority order:| Source | When used | What it provides |
|---|---|---|
~/.praison/cache/models.json | Cache < 1 h old | Full list saved from previous live call |
litellm (model_list + model_cost) | Cache miss, litellm installed | Live data: 100+ models with cost & limits |
| Curated static list | litellm unavailable / error | OpenAI, Anthropic, Google, Groq, Ollama |
Commands Reference
praisonai models list
List available models, grouped by provider.
| Flag / Argument | Type | Description |
|---|---|---|
search | str (positional) | Filter by substring in the model ID (e.g. gpt, claude) |
--provider, -p | str | Filter by provider (openai, anthropic, google, groq, ollama) |
--json | bool | Machine-readable JSON output |
praisonai models describe <model>
Show full metadata for one model, including capabilities, limits, and cost.
praisonai models validate <model>
Validate a model ID. Exits with code 1 and shows close matches if the ID is unknown.
Capabilities & Limits Reference
Every model in the catalogue exposes these fields:| Field | Type | Default | Description |
|---|---|---|---|
id | str | — | Model identifier (e.g. gpt-4o) |
provider | str | — | openai, anthropic, google, groq, ollama, cohere, … |
description | str | None | Short human description |
max_context | int | None | Max context window (tokens) |
max_output | int | None | Max output tokens |
input_cost | float | None | Cost per 1K input tokens (USD) |
output_cost | float | None | Cost per 1K output tokens (USD) |
supports_tools | bool | False | Tool-calling support |
supports_vision | bool | False | Image input support |
supports_reasoning | bool | False | Reasoning-class model |
supports_streaming | bool | True | Token streaming |
notes | str | None | Caveats (e.g. “Requires Ollama running locally”) |
Configuration Options
ModelCatalogue accepts two constructor arguments:
| Option | Type | Default | Description |
|---|---|---|---|
cache_dir | Path | None | ~/.praison/cache | Directory for the model cache file |
cache_ttl | int | 3600 | Cache TTL in seconds (1 hour) |
test_c5_backward_compat.py::test_module_identity asserts praisonai.llm.catalogue is praisonai_code.llm.catalogue.
Cache file location: ~/.praison/cache/models.json
Force refresh: delete the cache file, then run any praisonai models command:
Validation Behaviour
- YAML local aliases — if your YAML file defines model aliases under a top-level
models:key, those aliases are accepted even when absent from the catalogue. - Tool-compatibility warnings — if an agent has
tools:configured but itsllmdoes not advertisesupports_tools(e.g.o1,o1-mini), a warning is emitted at load time. - Opt-out — pass
validate_model=Falsetoresolve_llm_endpoint(orresolve_llm_endpoint_with_credentials) to skip validation entirely and make the call unconditionally.
Best Practices
Install litellm for the full catalogue
Install litellm for the full catalogue
The static fallback covers ~15 models. Installing
litellm unlocks 100+ models with live pricing data:Refresh the cache when providers release new models
Refresh the cache when providers release new models
The cache is valid for 1 hour. To pull the latest model list immediately:
Use --json in CI to pin your model selection
Use --json in CI to pin your model selection
Pick a tool-calling model when your agent uses tools
Pick a tool-calling model when your agent uses tools
Before adding Models like
tools: to an agent, verify the model supports them:o1 and o1-mini do not support tool calling.Offline / Fallback Behaviour
Whenlitellm is not installed or the network is unavailable, the catalogue degrades gracefully to a curated static list covering:
- OpenAI —
gpt-4o,gpt-4o-mini,gpt-3.5-turbo,o1,o1-mini - Anthropic —
claude-3-5-sonnet-latest,claude-3-5-haiku-latest,claude-3-opus-latest - Google —
gemini-1.5-pro,gemini-1.5-flash,gemini-2.0-flash-exp - Groq —
llama-3.3-70b-versatile,mixtral-8x7b-32768 - Ollama —
llama3.2(requires Ollama running locally)
list, describe, validate) work against the static list without any external calls.
Related
Standalone LLM Modules
All four LLM modules available without the wrapper package
AutoGen Config List
Build AutoGen config_list from the resolved endpoint
LLM Endpoint Config
Configure model and base URL via environment variables
Model Capabilities
Model capability flags and how to use them
tool_resolver), safe loader (_safe_loader), framework probes (_framework_availability), and plugin registry (tool_registry) all live in praisonai_code — the same C7 arc that moved LLM config here. See Tool Discovery Order and Local Tools Loading.
