Skip to main content
Marvin delegates model access to Pydantic AI. Use a provider:model-name string or a Pydantic AI model instance.

Set the default before importing Marvin

Provider credentials use the provider’s environment variables. Marvin-specific settings use the MARVIN_ prefix.

Choose a model for an agent

For Anthropic, export ANTHROPIC_API_KEY and use an Anthropic model identifier, such as anthropic:claude-haiku-4-5.

Change the application default

For a temporary override:
Pass provider-supported settings through Agent(model_settings={...}). Accepted settings and model identifiers depend on the provider; consult its Pydantic AI documentation rather than assuming that all models accept temperature or the same options.