Cerebras 提供基于专用推理硬件的高速 OpenAI 兼容推理服务。
| 属性 | 值 |
|---|---|
| Provider ID | cerebras |
| 认证 | CEREBRAS_API_KEY |
| API | OpenAI 兼容(openai-completions) |
| Base URL | https://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.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 | 否 | 速度优先生产模型 |
注意: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。
相关链接
- provider-together — 另一个开源模型推理提供商
- provider-fireworks — Fireworks AI 推理
- providers — 所有 provider 总览