Skip to content

Commit fc5a4de

Browse files
authored
feat(cohere): add current Command models (#102563)
* feat(cohere): add current Command models * docs: keep release notes out of PR
1 parent 5cb5f38 commit fc5a4de

13 files changed

Lines changed: 223 additions & 28 deletions

File tree

docs/concepts/model-providers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ Claude CLI reuse (`claude -p`) is a sanctioned OpenClaw integration path. Anthro
205205
- Provider: `google`
206206
- Auth: `GEMINI_API_KEY`
207207
- Optional rotation: `GEMINI_API_KEYS`, `GEMINI_API_KEY_1`, `GEMINI_API_KEY_2`, `GOOGLE_API_KEY` fallback, and `OPENCLAW_LIVE_GEMINI_KEY` (single override)
208-
- Example models: `google/gemini-3.1-pro-preview`, `google/gemini-3-flash-preview`
208+
- Example models: `google/gemini-3.1-pro-preview`, `google/gemini-3.5-flash`
209209
- Compatibility: legacy OpenClaw config using `google/gemini-3.1-flash-preview` is normalized to `google/gemini-3-flash-preview`
210210
- Alias: `google/gemini-3.1-pro` is accepted and normalized to Google's live Gemini API id, `google/gemini-3.1-pro-preview`
211211
- CLI: `openclaw onboard --auth-choice gemini-api-key`
@@ -285,7 +285,7 @@ messages and normalizes `stats.cached` into `cacheRead`; legacy
285285
| Cerebras | `cerebras` | `CEREBRAS_API_KEY` | `cerebras/zai-glm-4.7` |
286286
| Chutes | `chutes` | `CHUTES_API_KEY` or `CHUTES_OAUTH_TOKEN` | `chutes/zai-org/GLM-4.7-TEE` |
287287
| ClawRouter | `clawrouter` | `CLAWROUTER_API_KEY` | `clawrouter/anthropic/claude-sonnet-4-6` |
288-
| Cohere | `cohere` | `COHERE_API_KEY` | `cohere/command-a-03-2025` |
288+
| Cohere | `cohere` | `COHERE_API_KEY` | `cohere/command-a-plus-05-2026` |
289289
| DeepInfra | `deepinfra` | `DEEPINFRA_API_KEY` | `deepinfra/deepseek-ai/DeepSeek-V4-Flash` |
290290
| DeepSeek | `deepseek` | `DEEPSEEK_API_KEY` | `deepseek/deepseek-v4-flash` |
291291
| Featherless AI | `featherless` | `FEATHERLESS_API_KEY` | `featherless/Qwen/Qwen3-32B` |

docs/help/testing-live.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,13 +360,13 @@ Narrow, explicit allowlists are fastest and least flaky:
360360
- `OPENCLAW_LIVE_GATEWAY_MODELS="openai/gpt-5.5" pnpm test:live src/gateway/gateway-models.profiles.live.test.ts`
361361

362362
- Tool calling across several providers:
363-
- `OPENCLAW_LIVE_GATEWAY_MODELS="openai/gpt-5.5,anthropic/claude-opus-4-6,google/gemini-3-flash-preview,deepseek/deepseek-v4-flash,zai/glm-5.1,minimax/MiniMax-M3" pnpm test:live src/gateway/gateway-models.profiles.live.test.ts`
363+
- `OPENCLAW_LIVE_GATEWAY_MODELS="openai/gpt-5.5,anthropic/claude-opus-4-6,google/gemini-3.5-flash,deepseek/deepseek-v4-flash,zai/glm-5.1,minimax/MiniMax-M3" pnpm test:live src/gateway/gateway-models.profiles.live.test.ts`
364364

365365
- Z.AI Coding Plan GLM-5.2 direct smoke:
366366
- `ZAI_CODING_LIVE_TEST=1 pnpm test:live src/agents/zai.live.test.ts`
367367

368368
- Google focus (Gemini API key + Antigravity):
369-
- Gemini (API key): `OPENCLAW_LIVE_GATEWAY_MODELS="google/gemini-3-flash-preview" pnpm test:live src/gateway/gateway-models.profiles.live.test.ts`
369+
- Gemini (API key): `OPENCLAW_LIVE_GATEWAY_MODELS="google/gemini-3.5-flash" pnpm test:live src/gateway/gateway-models.profiles.live.test.ts`
370370
- Antigravity (OAuth): `OPENCLAW_LIVE_GATEWAY_MODELS="google-antigravity/claude-opus-4-6-thinking,google-antigravity/gemini-3-pro-high" pnpm test:live src/gateway/gateway-models.profiles.live.test.ts`
371371

372372
- Google adaptive thinking smoke (`qa manual` from the private QA CLI - requires `OPENCLAW_ENABLE_PRIVATE_QA_CLI=1` and a source checkout; see [QA overview](/concepts/qa-e2e-automation)):
@@ -389,10 +389,12 @@ Live is opt-in, so there is no fixed "CI model list." `OPENCLAW_LIVE_MODELS=mode
389389
| Provider/model | Notes |
390390
| --------------------------------------------- | ---------- |
391391
| `anthropic/claude-opus-4-8` | |
392+
| `anthropic/claude-sonnet-5` | |
392393
| `anthropic/claude-sonnet-4-6` | |
393394
| `anthropic/claude-opus-4-7` | |
394395
| `google/gemini-3.1-pro-preview` | Gemini API |
395-
| `google/gemini-3-flash-preview` | Gemini API |
396+
| `google/gemini-3.5-flash` | Gemini API |
397+
| `cohere/command-a-plus-05-2026` | |
396398
| `moonshot/kimi-k2.7-code` | |
397399
| `anthropic/claude-opus-4-6` | |
398400
| `deepseek/deepseek-v4-flash` | |
@@ -404,6 +406,7 @@ Live is opt-in, so there is no fixed "CI model list." `OPENCLAW_LIVE_MODELS=mode
404406
| `opencode-go/glm-5` | |
405407
| `openrouter/ai21/jamba-large-1.7` | |
406408
| `xai/grok-4.5` | |
409+
| `xai/grok-4.20-0309-reasoning` | |
407410
| `zai/glm-5.1` | |
408411
| `fireworks/accounts/fireworks/models/glm-5p1` | |
409412
| `minimax-portal/minimax-m3` | |
@@ -430,7 +433,7 @@ Notes on the modern list:
430433
Run gateway smoke with tools + image across a hand-picked cross-provider set:
431434

432435
```bash
433-
OPENCLAW_LIVE_GATEWAY_MODELS="openai/gpt-5.5,anthropic/claude-opus-4-6,google/gemini-3.1-pro-preview,google/gemini-3-flash-preview,google-antigravity/claude-opus-4-6-thinking,deepseek/deepseek-v4-flash,zai/glm-5.1,minimax/MiniMax-M3" pnpm test:live src/gateway/gateway-models.profiles.live.test.ts
436+
OPENCLAW_LIVE_GATEWAY_MODELS="openai/gpt-5.5,anthropic/claude-opus-4-6,google/gemini-3.1-pro-preview,google/gemini-3.5-flash,google-antigravity/claude-opus-4-6-thinking,deepseek/deepseek-v4-flash,zai/glm-5.1,minimax/MiniMax-M3" pnpm test:live src/gateway/gateway-models.profiles.live.test.ts
434437
```
435438

436439
Optional additional coverage outside the curated lists (nice to have, pick a "tools"-capable model you have enabled):

docs/providers/cohere.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,20 @@ read_when:
1717
| Direct CLI flag | `--cohere-api-key <key>` |
1818
| API | OpenAI-compatible (`openai-completions`) |
1919
| Base URL | `https://api.cohere.ai/compatibility/v1` |
20-
| Default model | `cohere/command-a-03-2025` |
21-
| Context window | 256,000 tokens |
20+
| Default model | `cohere/command-a-plus-05-2026` |
21+
| Context window | 128,000 tokens |
2222

2323
## Built-in catalog
2424

25-
| Model ref | Input | Context | Max output | Notes |
26-
| ---------------------------- | ----------- | ------- | ---------- | -------------------------------------- |
27-
| `cohere/command-a-03-2025` | text | 256,000 | 8,000 | Default model |
28-
| `cohere/north-mini-code-1-0` | text, image | 256,000 | 64,000 | Agentic coding; reasoning; free limits |
25+
| Model ref | Input | Context | Max output | Notes |
26+
| ------------------------------------ | ----------- | ------- | ---------- | --------------------------------------------- |
27+
| `cohere/command-a-plus-05-2026` | text, image | 128,000 | 64,000 | Default; flagship agentic and reasoning model |
28+
| `cohere/command-a-03-2025` | text | 256,000 | 8,000 | Previous Command A model |
29+
| `cohere/command-a-reasoning-08-2025` | text | 256,000 | 32,000 | Agentic reasoning and tool use |
30+
| `cohere/command-a-vision-07-2025` | text, image | 128,000 | 8,000 | Vision and document analysis; no tool use |
31+
| `cohere/north-mini-code-1-0` | text, image | 256,000 | 64,000 | Agentic coding; reasoning; free limits |
2932

30-
North Mini Code supports Cohere's two Compatibility API reasoning modes. OpenClaw maps **off** to `none` and every enabled thinking level to `high`.
33+
Reasoning-capable Cohere models support two Compatibility API reasoning modes. OpenClaw maps **off** to `none` and every enabled thinking level to `high`. Command A Vision does not support tool use, so OpenClaw keeps agent tools disabled for that model.
3134

3235
## Get started
3336

@@ -63,7 +66,7 @@ Make `COHERE_API_KEY` available to the Gateway process, then select the Cohere m
6366
{
6467
agents: {
6568
defaults: {
66-
model: { primary: "cohere/command-a-03-2025" },
69+
model: { primary: "cohere/command-a-plus-05-2026" },
6770
},
6871
},
6972
}

extensions/cohere/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ openclaw plugins install @openclaw/cohere-provider
1010
openclaw gateway restart
1111
```
1212

13-
Configure a Cohere API key, then select `cohere/command-a-03-2025` or
14-
`cohere/north-mini-code-1-0`.
13+
Configure a Cohere API key, then select `cohere/command-a-plus-05-2026`,
14+
`cohere/command-a-reasoning-08-2025`, `cohere/command-a-vision-07-2025`,
15+
`cohere/command-a-03-2025`, or `cohere/north-mini-code-1-0`.

extensions/cohere/index.test.ts

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ import { registerSingleProviderPlugin } from "openclaw/plugin-sdk/plugin-test-ru
55
import { buildOpenAICompletionsParams } from "openclaw/plugin-sdk/provider-transport-runtime";
66
import { describe, expect, it } from "vitest";
77
import plugin from "./index.js";
8-
import { COHERE_NORTH_MINI_CODE_MODEL_ID } from "./models.js";
8+
import {
9+
COHERE_COMMAND_A_PLUS_MODEL_ID,
10+
COHERE_COMMAND_A_REASONING_MODEL_ID,
11+
COHERE_COMMAND_A_VISION_MODEL_ID,
12+
COHERE_NORTH_MINI_CODE_MODEL_ID,
13+
} from "./models.js";
914
import { buildCohereProvider } from "./provider-catalog.js";
1015
import { createCohereCompletionsWrapper } from "./stream.js";
1116

@@ -16,7 +21,7 @@ function readManifest() {
1621
};
1722
}
1823

19-
function requireCohereModel(modelId = "command-a-03-2025"): Model<"openai-completions"> {
24+
function requireCohereModel(modelId = COHERE_COMMAND_A_PLUS_MODEL_ID): Model<"openai-completions"> {
2025
const provider = buildCohereProvider();
2126
const model = provider.models?.find((candidate) => candidate.id === modelId);
2227
if (!model) {
@@ -91,6 +96,17 @@ describe("Cohere provider plugin", () => {
9196
baseUrl: "https://api.cohere.ai/compatibility/v1",
9297
api: "openai-completions",
9398
models: [
99+
expect.objectContaining({
100+
id: COHERE_COMMAND_A_PLUS_MODEL_ID,
101+
reasoning: true,
102+
input: ["text", "image"],
103+
contextWindow: 128000,
104+
maxTokens: 64000,
105+
compat: expect.objectContaining({
106+
supportsReasoningEffort: true,
107+
supportedReasoningEfforts: ["none", "high"],
108+
}),
109+
}),
94110
expect.objectContaining({
95111
id: "command-a-03-2025",
96112
compat: {
@@ -99,6 +115,21 @@ describe("Cohere provider plugin", () => {
99115
maxTokensField: "max_tokens",
100116
},
101117
}),
118+
expect.objectContaining({
119+
id: COHERE_COMMAND_A_REASONING_MODEL_ID,
120+
reasoning: true,
121+
input: ["text"],
122+
contextWindow: 256000,
123+
maxTokens: 32000,
124+
}),
125+
expect.objectContaining({
126+
id: COHERE_COMMAND_A_VISION_MODEL_ID,
127+
reasoning: false,
128+
input: ["text", "image"],
129+
contextWindow: 128000,
130+
maxTokens: 8000,
131+
compat: expect.objectContaining({ supportsTools: false }),
132+
}),
102133
expect.objectContaining({
103134
id: "north-mini-code-1-0",
104135
reasoning: true,
@@ -171,4 +202,40 @@ describe("Cohere provider plugin", () => {
171202
}).reasoning_effort,
172203
).toBe("high");
173204
});
205+
206+
it("maps Command A+ and Command A Reasoning to Cohere's supported reasoning efforts", () => {
207+
const context = { messages: [] } as Context;
208+
209+
for (const modelId of [COHERE_COMMAND_A_PLUS_MODEL_ID, COHERE_COMMAND_A_REASONING_MODEL_ID]) {
210+
expect(captureCoherePayload(context, { modelId, reasoning: "off" }).reasoning_effort).toBe(
211+
"none",
212+
);
213+
expect(captureCoherePayload(context, { modelId, reasoning: "medium" }).reasoning_effort).toBe(
214+
"high",
215+
);
216+
}
217+
});
218+
219+
it("advertises only tool-capable current Cohere models to modern live sweeps", async () => {
220+
const provider = await registerSingleProviderPlugin(plugin);
221+
222+
expect(
223+
provider.isModernModelRef?.({ provider: "cohere", modelId: COHERE_COMMAND_A_PLUS_MODEL_ID }),
224+
).toBe(true);
225+
expect(
226+
provider.isModernModelRef?.({
227+
provider: "cohere",
228+
modelId: COHERE_COMMAND_A_REASONING_MODEL_ID,
229+
}),
230+
).toBe(true);
231+
expect(provider.isModernModelRef?.({ provider: "cohere", modelId: "command-a-03-2025" })).toBe(
232+
false,
233+
);
234+
expect(
235+
provider.isModernModelRef?.({
236+
provider: "cohere",
237+
modelId: COHERE_COMMAND_A_VISION_MODEL_ID,
238+
}),
239+
).toBe(false);
240+
});
174241
});

extensions/cohere/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { defineSingleProviderPluginEntry } from "openclaw/plugin-sdk/provider-entry";
2+
import { isModernCohereModelId } from "./models.js";
23
import { applyCohereConfig, COHERE_DEFAULT_MODEL_REF } from "./onboard.js";
34
import { buildCohereProvider } from "./provider-catalog.js";
45
import { createCohereCompletionsWrapper } from "./stream.js";
@@ -33,5 +34,6 @@ export default defineSingleProviderPluginEntry({
3334
},
3435
wrapStreamFn: (ctx) => createCohereCompletionsWrapper(ctx.streamFn),
3536
wrapSimpleCompletionStreamFn: (ctx) => createCohereCompletionsWrapper(ctx.streamFn),
37+
isModernModelRef: ({ modelId }) => isModernCohereModelId(modelId),
3638
},
3739
});

extensions/cohere/models.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,22 @@ const COHERE_MANIFEST_CATALOG = manifest.modelCatalog.providers.cohere;
99

1010
export const COHERE_BASE_URL = COHERE_MANIFEST_CATALOG.baseUrl;
1111
export const COHERE_MODEL_CATALOG = COHERE_MANIFEST_CATALOG.models;
12+
export const COHERE_COMMAND_A_PLUS_MODEL_ID = "command-a-plus-05-2026";
13+
export const COHERE_COMMAND_A_REASONING_MODEL_ID = "command-a-reasoning-08-2025";
14+
export const COHERE_COMMAND_A_VISION_MODEL_ID = "command-a-vision-07-2025";
1215
export const COHERE_NORTH_MINI_CODE_MODEL_ID = "north-mini-code-1-0";
1316

17+
const COHERE_MODERN_MODEL_IDS = new Set([
18+
COHERE_COMMAND_A_PLUS_MODEL_ID,
19+
COHERE_COMMAND_A_REASONING_MODEL_ID,
20+
// Modern sweeps require agent tool use; Vision explicitly does not support tools.
21+
COHERE_NORTH_MINI_CODE_MODEL_ID,
22+
]);
23+
24+
export function isModernCohereModelId(modelId: string): boolean {
25+
return COHERE_MODERN_MODEL_IDS.has(modelId.trim().toLowerCase());
26+
}
27+
1428
export function buildCohereCatalogModels(): ModelDefinitionConfig[] {
1529
return buildManifestModelProviderConfig({
1630
providerId: "cohere",

extensions/cohere/onboard.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { describe, expect, it } from "vitest";
44
import {
55
buildCohereCatalogModels,
66
COHERE_BASE_URL,
7+
COHERE_COMMAND_A_REASONING_MODEL_ID,
8+
COHERE_COMMAND_A_VISION_MODEL_ID,
79
COHERE_MODEL_CATALOG,
810
COHERE_NORTH_MINI_CODE_MODEL_ID,
911
} from "./models.js";
@@ -20,6 +22,9 @@ describe("Cohere onboarding", () => {
2022
});
2123
expect(provider?.models?.map((model) => model.id)).toEqual([
2224
COHERE_DEFAULT_MODEL_ID,
25+
"command-a-03-2025",
26+
COHERE_COMMAND_A_REASONING_MODEL_ID,
27+
COHERE_COMMAND_A_VISION_MODEL_ID,
2328
COHERE_NORTH_MINI_CODE_MODEL_ID,
2429
]);
2530
expect(buildCohereCatalogModels()).toHaveLength(COHERE_MODEL_CATALOG.length);
@@ -38,7 +43,7 @@ describe("Cohere onboarding", () => {
3843

3944
expect(resolveAgentModelPrimaryValue(result.agents?.defaults?.model)).toBe("openai/gpt-5.5");
4045
expect(result.agents?.defaults?.models?.[COHERE_DEFAULT_MODEL_REF]).toEqual({
41-
alias: "Cohere Command A",
46+
alias: "Cohere Command A+",
4247
});
4348
});
4449

extensions/cohere/onboard.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@ import {
22
createModelCatalogPresetAppliers,
33
type OpenClawConfig,
44
} from "openclaw/plugin-sdk/provider-onboard";
5-
import { buildCohereModelDefinition, COHERE_BASE_URL, COHERE_MODEL_CATALOG } from "./models.js";
5+
import {
6+
buildCohereModelDefinition,
7+
COHERE_BASE_URL,
8+
COHERE_COMMAND_A_PLUS_MODEL_ID,
9+
COHERE_MODEL_CATALOG,
10+
} from "./models.js";
611

7-
export const COHERE_DEFAULT_MODEL_ID = "command-a-03-2025";
12+
export const COHERE_DEFAULT_MODEL_ID = COHERE_COMMAND_A_PLUS_MODEL_ID;
813
export const COHERE_DEFAULT_MODEL_REF = `cohere/${COHERE_DEFAULT_MODEL_ID}`;
914

1015
const coherePresetAppliers = createModelCatalogPresetAppliers({
@@ -14,7 +19,7 @@ const coherePresetAppliers = createModelCatalogPresetAppliers({
1419
api: "openai-completions",
1520
baseUrl: COHERE_BASE_URL,
1621
catalogModels: COHERE_MODEL_CATALOG.map(buildCohereModelDefinition),
17-
aliases: [{ modelRef: COHERE_DEFAULT_MODEL_REF, alias: "Cohere Command A" }],
22+
aliases: [{ modelRef: COHERE_DEFAULT_MODEL_REF, alias: "Cohere Command A+" }],
1823
}),
1924
});
2025

0 commit comments

Comments
 (0)