Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt

Use this file to discover all available pages before exploring further.

Cerebras 提供高速的 OpenAI 相容推論。
屬性
提供者cerebras
驗證CEREBRAS_API_KEY
APIOpenAI 相容
基底 URLhttps://api.cerebras.ai/v1

入門

1

取得 API 金鑰

Cerebras Cloud Console 建立 API 金鑰。
2

執行 onboarding

openclaw onboard --auth-choice cerebras-api-key
3

確認模型可用

openclaw models list --provider cerebras

非互動式設定

openclaw onboard --non-interactive \
  --mode local \
  --auth-choice cerebras-api-key \
  --cerebras-api-key "$CEREBRAS_API_KEY"

內建目錄

OpenClaw 為公開的 OpenAI 相容端點隨附靜態 Cerebras 目錄:
模型參照名稱備註
cerebras/zai-glm-4.7Z.ai GLM 4.7預設模型;預覽推理模型
cerebras/gpt-oss-120bGPT OSS 120B生產環境推理模型
cerebras/qwen-3-235b-a22b-instruct-2507Qwen 3 235B Instruct預覽非推理模型
cerebras/llama3.1-8bLlama 3.1 8B生產環境速度導向模型
Cerebras 將 zai-glm-4.7qwen-3-235b-a22b-instruct-2507 標示為預覽模型,而 llama3.1-8b / qwen-3-235b-a22b-instruct-2507 文件記載將於 2026 年 5 月 27 日淘汰。在生產環境依賴它們之前,請先查看 Cerebras 的支援模型頁面。

手動設定

內建 Plugin 通常表示你只需要 API 金鑰。當你想覆寫模型中繼資料時,請使用明確的 models.providers.cerebras 設定:
{
  env: { CEREBRAS_API_KEY: "sk-..." },
  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" },
        ],
      },
    },
  },
}
如果 Gateway 以守護程式(launchd/systemd)執行,請確保 CEREBRAS_API_KEY 可供該程序使用,例如放在 ~/.openclaw/.env 中,或透過 env.shellEnv