Skip to main content

Documentation Index

Fetch the complete documentation index at: https://openclaw.zhcndoc.com/llms.txt

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

Cerebras 提供高速、兼容 OpenAI 的推理服务。
PropertyValue
Providercerebras
AuthCEREBRAS_API_KEY
APIOpenAI-compatible
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 refNameNotes
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 的 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 提供。