跳到正文
FunCoding

搜索

搜索文档、文章、Skill 和 MCP

Cohere

Cohere 设置(身份验证 + 模型选择)

Cohere 通过其兼容性 API 提供与 OpenAI 兼容的推理服务。在外部化过渡期间,OpenClaw 内置 Cohere 提供商,同时也将其作为官方外部插件发布。

属性值
提供商 IDcohere
插件过渡期间内置;官方外部软件包
身份验证环境变量COHERE_API_KEY
新手引导标志--auth-choice cohere-api-key
直接 CLI 标志--cohere-api-key <key>
API与 OpenAI 兼容(openai-completions)
基础 URLhttps://api.cohere.ai/compatibility/v1
默认模型cohere/command-a-plus-05-2026
上下文窗口128,000 tokens

内置目录

模型引用输入上下文最大输出说明
cohere/command-a-plus-05-2026文本、图像128,00064,000默认;旗舰级智能体和推理模型
cohere/command-a-03-2025文本256,0008,000上一代 Command A 模型
cohere/command-a-reasoning-08-2025文本256,00032,000智能体推理和工具使用
cohere/command-a-vision-07-2025文本、图像128,0008,000视觉和文档分析;不支持工具使用
cohere/north-mini-code-1-0文本、图像256,00064,000智能体编码;推理;免费额度

支持推理的 Cohere 模型支持两种兼容性 API 推理模式。OpenClaw 将 关闭 映射为 none,并将所有已启用的思考级别映射为 high。Command A Vision 不支持工具使用,因此 OpenClaw 会为该模型禁用智能体工具。

入门指南

  1. 当前 OpenClaw 软件包已包含 Cohere。如果缺少该插件,请安装外部软件包并重启 Gateway 网关:
openclaw plugins install @openclaw/cohere-provider
openclaw gateway restart
  1. 创建 Cohere API key。
  2. 运行新手引导:
openclaw onboard --non-interactive \
  --auth-choice cohere-api-key \
  --cohere-api-key "$COHERE_API_KEY"
  1. 确认目录可用:
openclaw models list --provider cohere

仅当尚未配置主模型时,新手引导才会将 Cohere 设置为主模型。

仅使用环境变量进行设置

让 Gateway 网关进程能够使用 COHERE_API_KEY,然后选择 Cohere 模型:

{
  agents: {
    defaults: {
      model: { primary: "cohere/command-a-plus-05-2026" },
    },
  },
}

如果 Gateway 网关作为守护进程运行或在 Docker 中运行,请为该服务设置 COHERE_API_KEY。仅在交互式 shell 中导出它,不会使已在运行的 Gateway 网关获得该环境变量。

相关内容