Skip to main content
PraisonAI picks the vendor from your model string, so claude-3-5-sonnet-latest goes to Anthropic and gemini-2.0-flash goes to Google — no prefix required.

Quick Start

1

Just name the model

Name the model and PraisonAI routes it to the right vendor.
2

Be explicit when the name isn't enough

Add a provider/ prefix for custom-named or gateway models the bare name would not resolve.

How It Works

PraisonAI runs four checks in order to resolve every model string. An explicit provider/model prefix wins over everything, including a custom baseURL.

Routing Decision Table

This table is the single source of truth for user-visible routing behaviour.

The baseURL Exception

Pointing at a proxy that serves claude-* over an OpenAI-shaped API is a real deployment, so a bare name plus a custom baseURL stays on the OpenAI-compatible path — prefix inference would otherwise route it away from the endpoint you explicitly asked for. An explicit provider/model prefix still wins, because that request is unambiguous.

Per-Agent Credentials

Pass apiKey on the agent and PraisonAI honours it for whichever provider the model routes to.
A programmatically-passed apiKey is honoured for every provider — env vars are optional, not required.

Best Practices

claude-3-5-sonnet-latest reads more clearly than anthropic/claude-3-5-sonnet-latest and routes the same way.
A baseURL keeps a bare name on the OpenAI-compatible path; an explicit provider/model prefix overrides that.
No env-var juggling, no cross-tenant leakage — each agent carries its own key.
The prefix inference is deliberate — a custom model with that name will route to Anthropic or Google.

Providers

Full provider reference and configuration

Multi-Provider Agents (AI SDK)

Build agents across 30+ providers