Skip to main content
Model provider plugins map a bare model name (llama-3.1-70b, claude-sonnet-4-6, custom-model) to its canonical provider id (groq, anthropic, …) so runtime and config resolution work for every vendor β€” not just three hard-coded ones.
Your agent picks a model by name; PraisonAI resolves the provider so providers.<name>.runtime_default applies automatically.

Quick Start

1

Resolve a built-in provider

2

Use it from YAML runtime config


How It Works

resolve_provider(model_name) returns the provider id in a fixed precedence. Returns None when nothing matches.

Built-in providers


Publish a Plugin

Register a vendor out-of-tree β€” pip-installable, no PraisonAI code changes.
1

Declare the entry point

The entry-point name (bedrock) is the provider id resolve_provider(...) returns on a match β€” it must equal the key you use under providers: in YAML.
2

Write the matcher

The matcher receives the already-lowercased model name and returns bool.
3

Use it

Registered matchers take precedence over built-ins. Register a matcher named anthropic to override the built-in claude detection, for example.
Failure isolation. A broken plugin β€” import error, load error, or a matcher that raises β€” is skipped silently, so provider inference never falls over on a third-party bug. If your plugin seems ignored, test the matcher import directly.

What Consumes This

praisonai_adapter._resolve_agent_runtime calls resolve_provider(agent_model) to pick providers.<name>.runtime_default. When no provider matches, a logger.debug line explains the miss and the provider-scoped default is not consulted:
See Runtime Selection for the full resolution order.

Public API


Best Practices

resolve_provider(...) returns the entry-point name. Name it exactly what you use under providers: in YAML, or runtime_default won’t apply.
Matchers receive the model name already lowercased. Don’t re-lowercase or compare against mixed-case constants β€” write your checks in lowercase.
Matchers run on every unprefixed model name. Use simple startswith / in checks and never raise β€” a raising matcher is skipped, and slow ones tax every resolution.
For a single model, provider/model in YAML (bedrock/claude-3) resolves without any plugin β€” reserve entry points for whole vendor families.

Runtime Selection

Choose which runtime executes each model, per provider or per agent

Integration Registry

Same static-map + entry-point + built-ins-win pattern for integrations