ModelsProviders
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 |
安裝外掛
bashopenclaw 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-...
確認模型可用
bashopenclaw models list --provider cerebras
此命令會列出兩個靜態模型。如果 CEREBRAS_API_KEY 無法解析,openclaw models status --json 會在 auth.unusableProfiles 下回報缺少的認證資訊。
非互動式設定
bashopenclaw onboard --non-interactive \ --mode local \ --auth-choice cerebras-api-key \ --cerebras-api-key "$CEREBRAS_API_KEY"
內建目錄
兩個模型都共用 128k 上下文視窗,且輸出 Token 上限為 8,192。
| 模型參照 |
名稱 |
推理 |
備註 |
cerebras/zai-glm-4.7 |
Z.ai GLM 4.7 |
是 |
預設模型;預覽版推理模型 |
cerebras/gpt-oss-120b |
GPT OSS 120B |
是 |
正式環境推理模型 |
手動設定
大多數設定只需要 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" }, ], }, }, },}
相關內容