Skip to content

Cerebras

CerebrasProvider in the Vercel.AI.Cerebras namespace creates the Cerebras models that this port implements. The API reference lists every option: CerebrasProvider.

Browse the upstream catalog of Cerebras models and their pricing on the Vercel AI Gateway models page.

Kind Factory method Model ids in this port’s tests and docs
Language LanguageModel gpt-oss-120b

A model id in the table is one that the tests or docs use. It is not the complete list of ids the provider accepts. Pass any id that the provider documents.

Language model:

var model = CerebrasProvider.Create().LanguageModel("gpt-oss-120b");
var result = await Ai.GenerateTextAsync(
new GenerateTextOptions
{
Model = model,
Prompt = "Invent a new holiday and describe its traditions.",
}
);
Console.WriteLine(result.Text);

snippet source | anchor

See the Providers guide for authentication and provider options.

Use CerebrasModelCapabilitiesLookup.Get(modelId) from Vercel.AI.Cerebras to look up a model’s declared capabilities and provider options, grouped by endpoint. It makes no API request and needs no configuration. It returns null for a model id the catalog does not list.

using Vercel.AI.Cerebras;
var model = CerebrasModelCapabilitiesLookup.Get("gpt-oss-120b");
foreach (var (endpoint, metadata) in model?.Endpoints ?? [])
{
Console.WriteLine($"{endpoint}: {metadata.Operation}");
}

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product