Cerebras 提供基于专用推理硬件的高速 OpenAI 兼容推理服务。

属性值
Provider IDcerebras
认证CEREBRAS_API_KEY
APIOpenAI 兼容(openai-completions)
Base URLhttps://api.cerebras.ai/v1
默认模型cerebras/zai-glm-4.7

快速开始

openclaw onboard --auth-choice cerebras-api-key
# 或非交互式
openclaw onboard --non-interactive --mode local \
  --auth-choice cerebras-api-key \
  --cerebras-api-key "$CEREBRAS_API_KEY"

内置模型目录

所有模型共享 128k 上下文和 8,192 最大输出 token。

模型 ref名称推理说明
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否速度优先生产模型

注意:zai-glm-4.7 和 qwen-3-235b-a22b-instruct-2507 为预览模型,llama3.1-8b 和 qwen-3-235b-a22b-instruct-2507 计划于 2026-05-27 弃用。

配置示例

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

daemon 环境(launchd/systemd)需确保 CEREBRAS_API_KEY 对该进程可见,建议写入 ~/.openclaw/.env。

相关链接