> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-docs-scavio-google-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Model as String

> Configure Agent and Team model fields with the provider:model_id shorthand.

<Badge icon="code-branch" color="orange">
  <Tooltip tip="Introduced in v2.2.6" cta="View release notes" href="https://github.com/agno-agi/agno/releases/tag/v2.2.6">v2.2.6</Tooltip>
</Badge>

```python theme={null}
from agno.agent import Agent

agent = Agent(
    model="openai:gpt-5.4",
    instructions="Answer in two sentences.",
)

agent.print_response("Why is the sky blue?")
```

Agno resolves `"openai:gpt-5.4"` to `OpenAIResponses(id="gpt-5.4")` when it initializes the Agent. The string form configures the provider class and model ID without a model-class import.

Install the provider integration and set its credentials as you would for the class form. For this example:

```bash theme={null}
uv pip install "agno[openai]"
export OPENAI_API_KEY="your-api-key"
```

## Format

```text theme={null}
provider:model_id
```

| Part       | Behavior                                                                                                                      |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `provider` | Selects a registered provider class. Agno trims whitespace and matches this key case-insensitively.                           |
| `model_id` | Is passed to the selected class after surrounding whitespace is removed. Its format and capitalization are provider-specific. |

Agno splits the string at the first colon, so model IDs can contain colons. For example, `"ollama:llama3.1:8b"` selects the `Ollama` class with `id="llama3.1:8b"`.

An empty provider, empty model ID, missing colon, or unsupported provider key raises `ValueError` during initialization.

Agno validates the provider key, then passes the model ID to that provider class. It does not validate the ID against a model catalog. An unavailable or misspelled ID fails when the provider handles the request.

## Provider Keys and API Variants

The provider key selects a specific Agno class. Similar keys can use different provider APIs and support different features.

| Provider key          | Model class          | Example                                        |
| --------------------- | -------------------- | ---------------------------------------------- |
| `openai`              | `OpenAIResponses`    | `"openai:gpt-5.4"`                             |
| `openai-responses`    | `OpenAIResponses`    | `"openai-responses:gpt-5.4"`                   |
| `openai-chat`         | `OpenAIChat`         | `"openai-chat:gpt-5.4-mini"`                   |
| `anthropic`           | `Claude`             | `"anthropic:claude-sonnet-4-5-20250929"`       |
| `google`              | `Gemini`             | `"google:gemini-3.5-flash"`                    |
| `google-interactions` | `GeminiInteractions` | `"google-interactions:gemini-3-flash-preview"` |
| `groq`                | `Groq`               | `"groq:openai/gpt-oss-120b"`                   |
| `ollama`              | `Ollama`             | `"ollama:llama3.1:8b"`                         |
| `ollama-responses`    | `OllamaResponses`    | `"ollama-responses:gpt-oss:20b"`               |
| `azure-ai-foundry`    | `AzureAIFoundry`     | `"azure-ai-foundry:Phi-4"`                     |
| `mistral`             | `MistralChat`        | `"mistral:mistral-small-latest"`               |

This table covers common providers and API variants. Use the exact provider key for the class you need, then confirm the model ID in that provider's documentation. See [all model providers](/models/providers/model-index) for setup, authentication, and the complete canonical key catalog.

<Warning>
  Use canonical keys when a provider has multiple implementations. For example, `azure:model_id` resolves to `AzureOpenAI`; `azure-ai-foundry:model_id` selects `AzureAIFoundry`.
</Warning>

Agno v2.7.2 also accepts these compatibility aliases. Prefer the canonical keys in new configuration:

| Compatibility alias | Canonical key          |
| ------------------- | ---------------------- |
| `awsbedrock`        | `aws-bedrock`          |
| `azure`             | `azure-openai`         |
| `azurefoundry`      | `azure-foundry-claude` |
| `cerebrasopenai`    | `cerebras-openai`      |
| `inceptionlabs`     | `inception`            |
| `llama`             | `meta`                 |
| `llamacpp`          | `llama-cpp`            |
| `llamaopenai`       | `llama-openai`         |
| `openresponses`     | `open-responses`       |
| `tuning engines`    | `tuning-engines`       |
| `vertexai`          | `vertexai-claude`      |
| `xiaomi mimo`       | `xiaomi`               |

<Note>
  Model capabilities depend on the resolved class and model ID. String syntax does not make unsupported features available. See [Model Compatibility](/models/compatibility).
</Note>

## String or Model Class

| Configuration         | What it sets               | Use it when                                                                         |
| --------------------- | -------------------------- | ----------------------------------------------------------------------------------- |
| `"provider:model_id"` | Provider class and `id`    | Class defaults and environment-based credentials are sufficient                     |
| Model class instance  | All constructor parameters | You need generation settings, retry settings, a custom endpoint, or a custom client |

```python theme={null}
from agno.agent import Agent
from agno.models.openai import OpenAIResponses

agent = Agent(
    model=OpenAIResponses(
        id="gpt-5.4",
        retries=2,
        timeout=30,
    )
)
```

The string form has the same behavior as constructing its resolved class with only `id`. Additional model constructor parameters require a class instance.

## Other Model Fields

Agents and Teams accept model strings for `model`, `reasoning_model`, `parser_model`, and `output_model`:

```python theme={null}
from agno.agent import Agent

agent = Agent(
    model="openai:gpt-5.4",
    reasoning=True,
    reasoning_model="openai:gpt-5.4",
    parser_model="openai:gpt-5.4-mini",
    output_model="openai:gpt-5.4-mini",
)
```

## Teams

```python theme={null}
from agno.agent import Agent
from agno.team import Team

researcher = Agent(
    name="Researcher",
    model="openai:gpt-5.4-mini",
)

team = Team(
    members=[researcher],
    model="openai:gpt-5.4",
)

team.print_response("Explain how sleep supports memory.")
```

## Developer Resources

* [All Model Providers](/models/providers/model-index)
* [Model Compatibility](/models/compatibility)
* [Agent reference](/reference/agents/agent)
* [Team reference](/reference/teams/team)
