快速开始

Cerebras

Cerebras 在定制推理硬件上提供高速、兼容 OpenAI 的推理服务。该插件附带静态的四模型目录(不支持实时发现)。

属性
提供商 ID cerebras
插件 官方外部软件包(@openclaw/cerebras-provider
身份验证环境变量 CEREBRAS_API_KEY
新手引导标志 --auth-choice cerebras-api-key
直接 CLI 标志 --cerebras-api-key <key>
API 兼容 OpenAI(openai-completions
基础 URL https://api.cerebras.ai/v1
默认模型 cerebras/zai-glm-4.7

安装插件

bash
openclaw plugins install @openclaw/cerebras-provideropenclaw gateway restart

入门指南

  • 获取 API key

    Cerebras Cloud Console 中创建 API key。

  • 运行新手引导

    新手引导
    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-...
  • 验证模型可用

    bash
    openclaw models list --provider cerebras

    列出全部四个静态模型。如果无法解析 CEREBRAS_API_KEYopenclaw models status --json 会在 auth.unusableProfiles 下报告缺失的凭据。

  • 非交互式设置

    bash
    openclaw onboard --non-interactive \  --mode local \  --auth-choice cerebras-api-key \  --cerebras-api-key "$CEREBRAS_API_KEY"

    内置目录

    全部四个模型都具有 128k 上下文窗口和最多 8,192 个输出 token。

    模型引用 名称 推理 说明
    cerebras/zai-glm-4.7 Z.ai GLM 4.7 默认模型;预览版推理模型
    cerebras/gpt-oss-120b GPT OSS 120B 生产级推理模型
    cerebras/qwen-3-235b-a22b-instruct-2507 Qwen 3 235B Instruct 预览版非推理模型
    cerebras/llama3.1-8b Llama 3.1 8B 注重速度的生产级模型

    手动配置

    大多数设置只需要 API key。若要覆盖模型元数据,或针对静态目录以 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" },        ],      },    },  },}

    相关内容

    Was this useful?
    On this page

    On this page