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
API兼容 OpenAI
Base URLhttps://api.cerebras.ai/v1

入门指南

1

获取 API 密钥

Cerebras Cloud Console 中创建一个 API 密钥。
2

运行新手引导

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 目录:
Model ref名称备注
cerebras/zai-glm-4.7Z.ai GLM 4.7默认模型;预览版 reasoning 模型
cerebras/gpt-oss-120bGPT OSS 120B生产级 reasoning 模型
cerebras/qwen-3-235b-a22b-instruct-2507Qwen 3 235B Instruct预览版非 reasoning 模型
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 的 supported-models 页面。

手动配置

内置插件通常意味着你只需要 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 提供。