Skip to main content
After the C7 milestone, the LLM helpers live in praisonai-code — no wrapper import required.
The user asks about models; catalogue and credential helpers from praisonai-code answer without wrapper imports.

How It Works

Module Map

Quick Start

1

Simple Usage

2

With Credential Gate

3

Discover Available Models

4

Check Credentials and Resolve Endpoint


How It Works

The user asks about models; the agent queries the catalogue and credential helpers, then answers.

The Four Modules


How It Works

The user asks about models; the catalogue and credential gate resolve an endpoint, then the agent answers.

Which Import Path Should I Use?


Backward Compatibility Guarantee

All four praisonai.llm.* module paths still resolve — a sys.modules alias in the wrapper points at praisonai_code.llm.*. The unit test test_c5_backward_compat.py::test_module_identity asserts:
  • praisonai.llm.catalogue is praisonai_code.llm.catalogue
  • praisonai.llm.config is praisonai_code.llm.config
  • praisonai.llm.env is praisonai_code.llm.env
  • praisonai.llm.credentials is praisonai_code.llm.credentials
You do not need to migrate existing code — both paths point at the same object.

Standalone Smoke Test

This example runs in a venv with only praisonai-agents + praisonai-code installed (no wrapper):

Module Reference

praisonai_code.llm.catalogue

Cache file: ~/.praison/cache/models.json (TTL 3600s). Falls back to 14 curated models (OpenAI 5, Anthropic 3, Google 3, Groq 2, Ollama 1) when litellm is unavailable.

praisonai_code.llm.config

praisonai_code.llm.env

praisonai_code.llm.credentials


Best Practices

New scripts that target the praisonai-code package should import from praisonai_code.llm.* to avoid taking a dependency on the wrapper:
Existing code using from praisonai.llm.catalogue import ModelCatalogue works without change — the shim guarantees module identity. Migration has no functional benefit.
Use is_configured() as a fast gate before running an agent — it checks env vars and the credential store without making any network calls:

Configuration Options

ModelCatalogue Python Reference

Python configuration options for ModelCatalogue

LLMEndpoint Python Reference

Python configuration options for LLMEndpoint

Model Catalogue

CLI commands for models list, describe, validate

AutoGen Config List

Build AutoGen config_list from the resolved endpoint

LLM Endpoint Config

Endpoint precedence and provider routing

PraisonAI Code CLI

The standalone CLI runtime these modules power

Package Boundaries (C7.1)

Three-tier ownership and the _wrapper_bridge pattern