Skip to main content

Documentation Index

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

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

Cerebras 在定制推理硬件上提供高速、OpenAI 兼容的推理服务。OpenClaw 包含一个内置的 Cerebras provider 插件,并带有静态的四模型目录。
属性
提供商 IDcerebras
插件内置,enabledByDefault: true
认证环境变量CEREBRAS_API_KEY
新手引导标志--auth-choice cerebras-api-key
直接 CLI 标志--cerebras-api-key <key>
APIOpenAI 兼容(openai-completions
基础 URLhttps://api.cerebras.ai/v1
默认模型cerebras/zai-glm-4.7

入门指南

1

获取 API key

Cerebras Cloud Console 中创建 API key。
2

运行新手引导

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

验证模型可用

openclaw models list --provider cerebras
列表应包含全部四个内置模型。如果 CEREBRAS_API_KEY 未解析,openclaw models status --json 会在 auth.unusableProfiles 下报告缺失的凭证。

非交互式设置

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.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 的支持模型页面。

手动配置

内置插件通常意味着你只需要 API key。当你想覆盖模型元数据,或以 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" },
        ],
      },
    },
  },
}
如果 Gateway 网关以守护进程运行(launchd、systemd、Docker),请确保该进程可以使用 CEREBRAS_API_KEY,例如在 ~/.openclaw/.env 中提供,或通过 env.shellEnv 提供。仅位于 ~/.profile 中的 key 无法帮助托管服务,除非单独导入环境变量。

相关内容

模型提供商

选择提供商、模型引用和故障转移行为。

思考模式

两个支持推理的 Cerebras 模型的推理强度等级。

配置参考

Agent 默认值和模型配置。

Models 常见问题

认证配置文件、切换模型以及解决 “no profile” 错误。