Providers

Cerebras

Cerebras 在自訂推論硬體上提供高速且相容 OpenAI 的推論服務。此外掛隨附靜態的四模型目錄(不進行即時探索)。

屬性
提供者 ID cerebras
外掛 官方外部套件(@openclaw/cerebras-provider
驗證環境變數 CEREBRAS_API_KEY
初始設定旗標 --auth-choice cerebras-api-key
直接命令列旗標 --cerebras-api-key <key>
API 相容 OpenAI(openai-completions
基礎 URL https://api.cerebras.ai/v1
預設模型 cerebras/zai-glm-4.7

安裝外掛

bash
openclaw plugins install @openclaw/cerebras-provideropenclaw gateway restart

開始使用

  • 取得 API 金鑰

    Cerebras Cloud Console 中建立 API 金鑰。

  • 執行初始設定

    初始設定
    openclaw onboard --auth-choice cerebras-api-key
    直接旗標
    openclaw onboard --non-interactive \--auth-choice cerebras-api-key \--cerebras-api-key "$CEREBRAS_API_KEY"
    僅使用環境變數
    export CEREBRAS_API_KEY=csk-...
  • 確認模型可用

    bash
    openclaw models list --provider cerebras

    列出全部四個靜態模型。如果無法解析 CEREBRAS_API_KEYopenclaw models status --json 會在 auth.unusableProfiles 下回報缺少憑證。

  • 非互動式設定

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

    內建目錄

    全部四個模型都具有 128k 的上下文視窗,以及最多 8,192 個輸出權杖。

    模型參照 名稱 推理 備註
    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 設定:

    json5
    {  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" },        ],      },    },  },}

    相關內容

    Was this useful?
    On this page

    On this page