Cerebras
Cerebras 在自訂推論硬體上提供高速的 OpenAI 相容推論。OpenClaw 包含了一個內建的 Cerebras 提供者外掛,並附帶一個靜態的四模型目錄。
| 屬性 | 值 |
|---|---|
| 提供者 ID | cerebras |
| 外掛 | 內建,enabledByDefault: true |
| 驗證環境變數 | CEREBRAS_API_KEY |
| 入門旗標 | --auth-choice cerebras-api-key |
| 直接 CLI 旗標 | --cerebras-api-key <key> |
| API | OpenAI 相容(openai-completions) |
| 基礎 URL | https://api.cerebras.ai/v1 |
| 預設模型 | cerebras/zai-glm-4.7 |
取得 API 金鑰
在 Cerebras Cloud Console 中建立 API 金鑰。
執行入門程式
Terminal window openclaw onboard --auth-choice cerebras-api-keyTerminal window openclaw onboard --non-interactive \--auth-choice cerebras-api-key \--cerebras-api-key "$CEREBRAS_API_KEY"Terminal window export CEREBRAS_API_KEY=csk-...驗證模型是否可用
Terminal window openclaw models list --provider cerebras列表應包含所有四個內建模型。如果
CEREBRAS_API_KEY未解析,openclaw models status --json會在auth.unusableProfiles下回報遺失的憑證。
非互動式設定
Section titled “非互動式設定”openclaw onboard --non-interactive \ --mode local \ --auth-choice cerebras-api-key \ --cerebras-api-key "$CEREBRAS_API_KEY"OpenClaw 附帶一個靜態的 Cerebras 目錄,反映公開的 OpenAI 相容端點。所有四個模型都共享 128k 上下文和 8,192 個最大輸出 token。
| 模型參考 | 名稱 | 推理 | 備註 |
|---|---|---|---|
cerebras/zai-glm-4.7 | Z.ai GLM 4.7 | 是 | 預設模型;預覽推理模型 |
cerebras/gpt-oss-120b | GPT OSS 120B | 是 | 生產環境推理模型 |
cerebras/qwen-3-235b-a22b-instruct-2507 | Qwen 3 235B Instruct | 否 | 預覽非推理模型 |
cerebras/llama3.1-8b | Llama 3.1 8B | 否 | 生產環境速度優先模型 |
由於包含捆綁的插件,通常您只需要 API 金鑰。當您想要覆寫模型元數據或針對靜態目錄在 mode: "merge" 中執行時,請使用明確的 models.providers.cerebras 配置:
{ env: { CEREBRAS_API_KEY: "csk-..." }, agents: { defaults: { model: { primary: "cerebras/zai-glm-4.7" }, }, }, models: { mode: "merge", providers: { cerebras: { baseUrl: "https://api.cerebras.ai/v1", apiKey: "${CEREBRAS_API_KEY}", api: "openai-completions", models: [ { id: "zai-glm-4.7", name: "Z.ai GLM 4.7" }, { id: "gpt-oss-120b", name: "GPT OSS 120B" }, ], }, }, },}模型提供者
選擇提供者、模型參照和故障轉移行為。
思考模式
兩個具備推理能力的 Cerebras 模型的推理努力等級。
配置參考
Agent 預設值和模型配置。
模型常見問題
驗證設定檔、切換模型以及解決「no profile」錯誤。