Skip to main content
When we discuss Models, we are normally referring to Large Language Models (LLMs). These models act as the brain of your Agents - enabling them to reason, act, and respond to the user. The better the model, the smarter the Agent.
from agno.agent import Agent
from agno.models.openai import OpenAIResponses

agent = Agent(
    model=OpenAIResponses(id="gpt-5.2"),
    description="Share 15 minute healthy recipes.",
    markdown=True,
)
agent.print_response("Share a breakfast recipe.", stream=True)
Use model strings ("provider:model_id") for simpler configuration. For advanced use cases requiring custom parameters like temperature or max_tokens, use the full model class syntax.

Error handling

You can configure your Model to retry requests if they fail. This is useful to handle temporary failures or rate limiting errors from the model provider.
model = OpenAIResponses(
  id="gpt-5.2",
  retries=2, # Number of retries to attempt before raising a ModelProviderError
  retry_delay=1, # Delay between retries, in seconds
  exponential_backoff=True, # If True, the delay between retries is doubled each time
)
You can also configure retries, delay_between_retries, and exponential_backoff directly on your Agent or Team, to retry the full runs instead of just the Model requests.

Learn more

Supported Model Providers

See the full list of supported model providers.

Model-as-string

Use the convenient provider:model_id string format to specify models without importing model classes.

Compatibility

See what features are supported by each model provider.

Cache Response

Cache the response from the model provider to avoid duplicate API calls.