SIGN IN SIGN UP

The all-in-one AI productivity accelerator. On device and privacy first with no annoying setup or configuration.

0 0 45 JavaScript

feat: add Cerebras as an LLM provider (#5699)

* feat: add Cerebras as an LLM provider

Adds Cerebras (https://www.cerebras.ai) as a first-class LLM provider for
chat and agents. Cerebras exposes an OpenAI-compatible inference API, so the
integration mirrors the existing fast-inference providers (Groq/SambaNova):

- New `CerebrasLLM` provider with streaming, prompt-window limits sourced from
  the shared model map, and dynamic model discovery via the customModels
  helper (`GET /v1/models`).
- New `CerebrasProvider` agent provider with the standard UnTooled fallback and
  optional native OpenAI-compatible tool calling, gated behind the existing
  `PROVIDER_SUPPORTS_NATIVE_TOOL_CALLING` ENV (since tool-calling support
  varies per Cerebras model).
- Wires the provider through getLLMProvider/getLLMProviderClass, agent
  selection, ENV validation/persistence, system settings, and the agent
  sub-task client builder so agent helpers (e.g. web-scraping summarization)
  work for Cerebras.
- Registers `cerebras` in the context-window model map (tracked LiteLLM
  provider + legacy fallback values) for accurate context limits.
- Frontend: API key + model-selection options, onboarding/settings provider
  entries, agent-provider enablement, privacy-policy entry, and provider logo.
- Documents the new `CEREBRAS_API_KEY` / `CEREBRAS_MODEL_PREF` env vars in the
  example env files and adds Cerebras to the supported-provider lists.

resolves #5605

* use proper model fallback
use public endpoint for model fetching

* context window reporting + better chat repsonses + show thinking

* add Cerebrase agent tool calling, capability detection, context windows, and usage reporting

* add safety caching

* stub out images

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
A
Asish Kumar committed
bee224171c1ea2236643b2c6f6622a0a63b6b7b3
Parent: 668b273
Committed by GitHub <noreply@github.com> on 5/27/2026, 6:38:30 PM