Skip to main content
The GPT models are the best in class LLMs and used as the default LLM by Agents. OpenAI supports a variety of world-class models. See their models here. We recommend experimenting to find the best-suited model for your use-case. Here are some general recommendations:
  • gpt-5.4 is good for most general use-cases.
  • gpt-5.4-mini is good for smaller tasks and faster inference.
  • o4-mini and o3 are good for complex reasoning and multi-step tasks.
OpenAI has tier-based rate limits. See the rate limit docs.

Authentication

Set your OPENAI_API_KEY environment variable. You can get one from OpenAI here.

Example

Use OpenAIChat with your Agent:

Prompt caching

Prompt caching will happen automatically using our OpenAIChat model. You can read more about how OpenAI handle caching in their docs.
View more examples here.

Parameters

See the OpenAI docs. OpenAIChat is a subclass of the Model class and has access to the same params.