> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LLM Config • AI Agent SDK

> LLMConfig: Configuration for LLM model settings.

# LLMConfig

> Defined in the [**Feature Configs**](../modules/feature_configs) module.

<Badge color="blue">AI Agent</Badge>

Configuration for LLM model settings.

Groups all LLM-related parameters including model selection,
API settings, and fallback configuration.

## Properties

<ResponseField name="model" type="str">
  No description available.
</ResponseField>

<ResponseField name="fallback_models" type="Optional">
  No description available.
</ResponseField>

<ResponseField name="base_url" type="Optional[str]">
  No description available.
</ResponseField>

<ResponseField name="api_key" type="Optional[str]">
  No description available.
</ResponseField>

<ResponseField name="auth" type="Optional">
  No description available.
</ResponseField>

<Accordion title="Internal & Generic Methods">
  * **from\_dict**: Create LLMConfig from dictionary.
  * **to\_dict**: Convert to dictionary.
</Accordion>

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# With primary model only
    Agent(llm_config=LLMConfig(model="gpt-4o"))
    
    # With fallback chain
    Agent(llm_config=LLMConfig(
        model="gpt-4o",
        fallback_models=["claude-3-5-sonnet", "gpt-4o-mini"],
        base_url="https://api.example.com",
        api_key="sk-...",
    ))
    
    # With LiteLLM-style provider prefix
    Agent(llm_config=LLMConfig(
        model="anthropic/claude-3-5-sonnet",
        fallback_models=["openai/gpt-4o", "openai/gpt-4o-mini"],
    ))
```

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/config/feature_configs.py#L1068">
  `praisonaiagents/config/feature_configs.py` at line 1068
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Models Overview" icon="microchip" href="/docs/docs/models" />

  <Card title="LLM Configuration" icon="gear" href="/docs/docs/configuration/llm-config" />

  <Card title="Model Router" icon="route" href="/docs/docs/features/model-router" />

  <Card title="Model Failover" icon="shield" href="/docs/docs/features/model-failover" />

  <Card title="Configuration Overview" icon="gear" href="/docs/docs/configuration/index" />
</CardGroup>
