Skip to main content

OpenAI-Compatible Integration

Cerebras also exposes an OpenAI-compatible interface, so you can use it with tools and libraries built for the OpenAI API.
Agno v2.7.2 defaults CerebrasOpenAI.id to the retired llama-4-scout-17b-16e-instruct model. Set id="gpt-oss-120b" or another current Cerebras model explicitly.

Basic Usage

The CerebrasOpenAI class provides an OpenAI-style interface for Cerebras models. First, install the required packages:

Configuration Options

The CerebrasOpenAI class accepts the following parameters: CerebrasOpenAI also supports the parameters of OpenAI.

Examples