@openclaw/cohere-provider 2026.10.10-beta.5 → 2026.11.5-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"entries":[{"output":"index.js","source":"extensions/cohere/index.ts"}],"chunks":[{"output":"index.js","sha256":"63581c423cf4b250cdb6b0a4263627432df79b02840697a8c619d7dd6e73f7e3","facadeSource":"extensions/cohere/index.ts","sources":["extensions/cohere/index.ts","extensions/cohere/openclaw.plugin.json"]}],"unrenderedSources":[]}
package/dist/index.js CHANGED
@@ -1,9 +1,233 @@
1
- import { i as openclaw_plugin_default, r as isModernCohereModelId } from "./.setup/models-BtjAnVPh.mjs";
2
- import { applyCohereConfig } from "./onboard.js";
3
- import { COHERE_LIVE_MODEL_DISCOVERY } from "./provider-catalog.js";
4
- import { wrapCohereProviderStream } from "./stream.js";
1
+ import { buildManifestModelProviderConfig, readManifestProviderDefaultModelRef } from "openclaw/plugin-sdk/provider-catalog-shared";
5
2
  import { defineSingleProviderPluginEntry } from "openclaw/plugin-sdk/provider-entry";
6
- //#region extensions/cohere/index.ts
3
+ import { createProviderConnectionPresetAppliers } from "openclaw/plugin-sdk/provider-onboard";
4
+ import { createPayloadPatchStreamWrapper } from "openclaw/plugin-sdk/provider-stream-shared";
5
+ import { asOptionalObjectRecord, asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
+ // extensions/cohere/openclaw.plugin.json
7
+ var openclaw_plugin_default = {
8
+ id: "cohere",
9
+ categories: ["models"],
10
+ name: "Cohere",
11
+ description: "OpenClaw Cohere provider plugin.",
12
+ activation: { "onStartup": false },
13
+ enabledByDefault: true,
14
+ providers: ["cohere"],
15
+ modelCatalog: {
16
+ "modelsDev": { "cohere": "cohere" },
17
+ "providers": { "cohere": {
18
+ "baseUrl": "https://api.cohere.ai/compatibility/v1",
19
+ "api": "openai-completions",
20
+ "defaultModel": "command-a-plus-05-2026",
21
+ "family": "cohere",
22
+ "models": [
23
+ {
24
+ "id": "command-a-plus-05-2026",
25
+ "name": "Command A+",
26
+ "reasoning": true,
27
+ "input": ["text", "image"],
28
+ "contextWindow": 128e3,
29
+ "maxTokens": 64e3,
30
+ "cost": {
31
+ "input": 0,
32
+ "output": 0,
33
+ "cacheRead": 0,
34
+ "cacheWrite": 0
35
+ },
36
+ "compat": {
37
+ "supportsStore": false,
38
+ "supportsUsageInStreaming": false,
39
+ "supportsReasoningEffort": true,
40
+ "supportedReasoningEfforts": ["none", "high"],
41
+ "reasoningEffortMap": {
42
+ "off": "none",
43
+ "none": "none",
44
+ "minimal": "high",
45
+ "low": "high",
46
+ "medium": "high",
47
+ "high": "high",
48
+ "xhigh": "high",
49
+ "adaptive": "high",
50
+ "max": "high"
51
+ },
52
+ "maxTokensField": "max_tokens"
53
+ }
54
+ },
55
+ {
56
+ "id": "command-a-03-2025",
57
+ "name": "Command A",
58
+ "status": "deprecated",
59
+ "replacedBy": "command-a-plus-05-2026",
60
+ "input": ["text"],
61
+ "contextWindow": 256e3,
62
+ "maxTokens": 8e3,
63
+ "cost": {
64
+ "input": 2.5,
65
+ "output": 10,
66
+ "cacheRead": 0,
67
+ "cacheWrite": 0
68
+ },
69
+ "compat": {
70
+ "supportsStore": false,
71
+ "supportsUsageInStreaming": false,
72
+ "maxTokensField": "max_tokens"
73
+ }
74
+ },
75
+ {
76
+ "id": "command-a-reasoning-08-2025",
77
+ "name": "Command A Reasoning",
78
+ "status": "deprecated",
79
+ "replacedBy": "command-a-plus-05-2026",
80
+ "reasoning": true,
81
+ "input": ["text"],
82
+ "contextWindow": 256e3,
83
+ "maxTokens": 32e3,
84
+ "cost": {
85
+ "input": 0,
86
+ "output": 0,
87
+ "cacheRead": 0,
88
+ "cacheWrite": 0
89
+ },
90
+ "compat": {
91
+ "supportsStore": false,
92
+ "supportsUsageInStreaming": false,
93
+ "supportsReasoningEffort": true,
94
+ "supportedReasoningEfforts": ["none", "high"],
95
+ "reasoningEffortMap": {
96
+ "off": "none",
97
+ "none": "none",
98
+ "minimal": "high",
99
+ "low": "high",
100
+ "medium": "high",
101
+ "high": "high",
102
+ "xhigh": "high",
103
+ "adaptive": "high",
104
+ "max": "high"
105
+ },
106
+ "maxTokensField": "max_tokens"
107
+ }
108
+ },
109
+ {
110
+ "id": "command-a-vision-07-2025",
111
+ "name": "Command A Vision",
112
+ "status": "deprecated",
113
+ "replacedBy": "command-a-plus-05-2026",
114
+ "reasoning": false,
115
+ "input": ["text", "image"],
116
+ "contextWindow": 128e3,
117
+ "maxTokens": 8e3,
118
+ "cost": {
119
+ "input": 0,
120
+ "output": 0,
121
+ "cacheRead": 0,
122
+ "cacheWrite": 0
123
+ },
124
+ "compat": {
125
+ "supportsStore": false,
126
+ "supportsUsageInStreaming": false,
127
+ "supportsTools": false,
128
+ "maxTokensField": "max_tokens"
129
+ }
130
+ },
131
+ {
132
+ "id": "north-mini-code-1-0",
133
+ "name": "North Mini Code 1.0",
134
+ "reasoning": true,
135
+ "input": ["text"],
136
+ "contextWindow": 256e3,
137
+ "maxTokens": 64e3,
138
+ "cost": {
139
+ "input": 0,
140
+ "output": 0,
141
+ "cacheRead": 0,
142
+ "cacheWrite": 0
143
+ },
144
+ "compat": {
145
+ "supportsStore": false,
146
+ "supportsUsageInStreaming": false,
147
+ "supportsReasoningEffort": true,
148
+ "supportedReasoningEfforts": ["none", "high"],
149
+ "reasoningEffortMap": {
150
+ "off": "none",
151
+ "none": "none",
152
+ "minimal": "high",
153
+ "low": "high",
154
+ "medium": "high",
155
+ "high": "high",
156
+ "xhigh": "high",
157
+ "adaptive": "high",
158
+ "max": "high"
159
+ },
160
+ "maxTokensField": "max_tokens"
161
+ }
162
+ }
163
+ ]
164
+ } },
165
+ "discovery": { "cohere": "refreshable" }
166
+ },
167
+ setup: { "providers": [{
168
+ "id": "cohere",
169
+ "envVars": ["COHERE_API_KEY"]
170
+ }] },
171
+ providerAuthChoices: [{
172
+ "provider": "cohere",
173
+ "method": "api-key",
174
+ "choiceId": "cohere-api-key",
175
+ "appGuidedSecret": true,
176
+ "choiceLabel": "Cohere API key",
177
+ "groupId": "cohere",
178
+ "groupLabel": "Cohere",
179
+ "groupHint": "OpenAI-compatible inference",
180
+ "optionKey": "cohereApiKey",
181
+ "cliFlag": "--cohere-api-key",
182
+ "cliOption": "--cohere-api-key <key>",
183
+ "cliDescription": "Cohere API key"
184
+ }],
185
+ configSchema: {
186
+ "type": "object",
187
+ "additionalProperties": false,
188
+ "properties": {}
189
+ }
190
+ };
191
+ // extensions/cohere/index.ts
192
+ const COHERE_MANIFEST_CATALOG = openclaw_plugin_default.modelCatalog.providers.cohere;
193
+ const COHERE_BASE_URL = COHERE_MANIFEST_CATALOG.baseUrl;
194
+ const COHERE_MODERN_MODEL_IDS = /* @__PURE__ */ new Set([
195
+ "command-a-plus-05-2026",
196
+ "command-a-reasoning-08-2025",
197
+ "north-mini-code-1-0"
198
+ ]);
199
+ function buildCohereCatalogModels() {
200
+ return buildManifestModelProviderConfig({
201
+ providerId: "cohere",
202
+ catalog: COHERE_MANIFEST_CATALOG
203
+ }).models;
204
+ }
205
+ const COHERE_DEFAULT_MODEL_REF = readManifestProviderDefaultModelRef(openclaw_plugin_default, "cohere");
206
+ const { applyConfig } = createProviderConnectionPresetAppliers({
207
+ primaryModelRef: COHERE_DEFAULT_MODEL_REF,
208
+ resolveParams: () => ({
209
+ providerId: "cohere",
210
+ api: "openai-completions",
211
+ baseUrl: COHERE_BASE_URL,
212
+ catalogModels: buildCohereCatalogModels,
213
+ aliases: [{
214
+ modelRef: COHERE_DEFAULT_MODEL_REF,
215
+ alias: "Cohere Command A+"
216
+ }]
217
+ })
218
+ });
219
+ function wrapCohereProviderStream(ctx) {
220
+ return createPayloadPatchStreamWrapper(ctx.streamFn, ({ payload }) => {
221
+ if (Array.isArray(payload.messages)) payload.messages = payload.messages.map((message) => {
222
+ const record = asOptionalObjectRecord(message);
223
+ return record?.role === "system" ? {
224
+ ...record,
225
+ role: "developer"
226
+ } : message;
227
+ });
228
+ delete payload.tool_choice;
229
+ });
230
+ }
7
231
  var cohere_default = defineSingleProviderPluginEntry({
8
232
  id: "cohere",
9
233
  name: "Cohere Provider",
@@ -12,15 +236,32 @@ var cohere_default = defineSingleProviderPluginEntry({
12
236
  provider: {
13
237
  label: "Cohere",
14
238
  docsPath: "/providers/cohere",
15
- manifestAuth: { applyConfig: applyCohereConfig },
239
+ manifestAuth: { applyConfig },
16
240
  catalog: {
17
241
  discoveryMode: "strict",
18
- liveModelDiscovery: COHERE_LIVE_MODEL_DISCOVERY
242
+ liveModelDiscovery: {
243
+ endpointUrl: {
244
+ url: "https://api.cohere.com/v1/models?endpoint=chat&page_size=1000",
245
+ requireBaseUrl: COHERE_BASE_URL
246
+ },
247
+ readRows: (body) => {
248
+ const models = asOptionalObjectRecord(body)?.models;
249
+ if (!Array.isArray(models)) throw new Error("Cohere model catalog response must contain models[]");
250
+ return models.flatMap((row) => {
251
+ const record = asOptionalRecord(row);
252
+ const modelId = normalizeOptionalString(record?.name);
253
+ return modelId ? [{
254
+ ...record,
255
+ id: modelId,
256
+ active: record?.is_deprecated !== true
257
+ }] : [];
258
+ });
259
+ }
260
+ }
19
261
  },
20
262
  wrapStreamFn: wrapCohereProviderStream,
21
263
  wrapSimpleCompletionStreamFn: wrapCohereProviderStream,
22
- isModernModelRef: ({ modelId }) => isModernCohereModelId(modelId)
264
+ isModernModelRef: ({ modelId }) => COHERE_MODERN_MODEL_IDS.has(modelId.trim().toLowerCase())
23
265
  }
24
266
  });
25
- //#endregion
26
267
  export { cohere_default as default };
@@ -17,6 +17,7 @@
17
17
  "baseUrl": "https://api.cohere.ai/compatibility/v1",
18
18
  "api": "openai-completions",
19
19
  "defaultModel": "command-a-plus-05-2026",
20
+ "family": "cohere",
20
21
  "models": [
21
22
  {
22
23
  "id": "command-a-plus-05-2026",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/cohere-provider",
3
- "version": "2026.10.10-beta.5",
3
+ "version": "2026.11.5-beta.1",
4
4
  "description": "OpenClaw Cohere provider plugin.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,10 +18,10 @@
18
18
  "minHostVersion": ">=2026.6.8"
19
19
  },
20
20
  "compat": {
21
- "pluginApi": ">=2026.10.10-beta.5"
21
+ "pluginApi": ">=2026.11.5-beta.1"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.10.10-beta.5",
24
+ "openclawVersion": "2026.11.5-beta.1",
25
25
  "bundledDist": false
26
26
  },
27
27
  "release": {
@@ -40,7 +40,7 @@
40
40
  "assets/activity.svg"
41
41
  ],
42
42
  "peerDependencies": {
43
- "openclaw": ">=2026.10.10-beta.5"
43
+ "openclaw": ">=2026.11.5-beta.1"
44
44
  },
45
45
  "peerDependenciesMeta": {
46
46
  "openclaw": {
@@ -1,205 +0,0 @@
1
- import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared";
2
- //#region extensions/cohere/openclaw.plugin.json
3
- var openclaw_plugin_default = {
4
- id: "cohere",
5
- categories: ["models"],
6
- name: "Cohere",
7
- description: "OpenClaw Cohere provider plugin.",
8
- activation: { "onStartup": false },
9
- enabledByDefault: true,
10
- providers: ["cohere"],
11
- modelCatalog: {
12
- "modelsDev": { "cohere": "cohere" },
13
- "providers": { "cohere": {
14
- "baseUrl": "https://api.cohere.ai/compatibility/v1",
15
- "api": "openai-completions",
16
- "defaultModel": "command-a-plus-05-2026",
17
- "models": [
18
- {
19
- "id": "command-a-plus-05-2026",
20
- "name": "Command A+",
21
- "reasoning": true,
22
- "input": ["text", "image"],
23
- "contextWindow": 128e3,
24
- "maxTokens": 64e3,
25
- "cost": {
26
- "input": 0,
27
- "output": 0,
28
- "cacheRead": 0,
29
- "cacheWrite": 0
30
- },
31
- "compat": {
32
- "supportsStore": false,
33
- "supportsUsageInStreaming": false,
34
- "supportsReasoningEffort": true,
35
- "supportedReasoningEfforts": ["none", "high"],
36
- "reasoningEffortMap": {
37
- "off": "none",
38
- "none": "none",
39
- "minimal": "high",
40
- "low": "high",
41
- "medium": "high",
42
- "high": "high",
43
- "xhigh": "high",
44
- "adaptive": "high",
45
- "max": "high"
46
- },
47
- "maxTokensField": "max_tokens"
48
- }
49
- },
50
- {
51
- "id": "command-a-03-2025",
52
- "name": "Command A",
53
- "status": "deprecated",
54
- "replacedBy": "command-a-plus-05-2026",
55
- "input": ["text"],
56
- "contextWindow": 256e3,
57
- "maxTokens": 8e3,
58
- "cost": {
59
- "input": 2.5,
60
- "output": 10,
61
- "cacheRead": 0,
62
- "cacheWrite": 0
63
- },
64
- "compat": {
65
- "supportsStore": false,
66
- "supportsUsageInStreaming": false,
67
- "maxTokensField": "max_tokens"
68
- }
69
- },
70
- {
71
- "id": "command-a-reasoning-08-2025",
72
- "name": "Command A Reasoning",
73
- "status": "deprecated",
74
- "replacedBy": "command-a-plus-05-2026",
75
- "reasoning": true,
76
- "input": ["text"],
77
- "contextWindow": 256e3,
78
- "maxTokens": 32e3,
79
- "cost": {
80
- "input": 0,
81
- "output": 0,
82
- "cacheRead": 0,
83
- "cacheWrite": 0
84
- },
85
- "compat": {
86
- "supportsStore": false,
87
- "supportsUsageInStreaming": false,
88
- "supportsReasoningEffort": true,
89
- "supportedReasoningEfforts": ["none", "high"],
90
- "reasoningEffortMap": {
91
- "off": "none",
92
- "none": "none",
93
- "minimal": "high",
94
- "low": "high",
95
- "medium": "high",
96
- "high": "high",
97
- "xhigh": "high",
98
- "adaptive": "high",
99
- "max": "high"
100
- },
101
- "maxTokensField": "max_tokens"
102
- }
103
- },
104
- {
105
- "id": "command-a-vision-07-2025",
106
- "name": "Command A Vision",
107
- "status": "deprecated",
108
- "replacedBy": "command-a-plus-05-2026",
109
- "reasoning": false,
110
- "input": ["text", "image"],
111
- "contextWindow": 128e3,
112
- "maxTokens": 8e3,
113
- "cost": {
114
- "input": 0,
115
- "output": 0,
116
- "cacheRead": 0,
117
- "cacheWrite": 0
118
- },
119
- "compat": {
120
- "supportsStore": false,
121
- "supportsUsageInStreaming": false,
122
- "supportsTools": false,
123
- "maxTokensField": "max_tokens"
124
- }
125
- },
126
- {
127
- "id": "north-mini-code-1-0",
128
- "name": "North Mini Code 1.0",
129
- "reasoning": true,
130
- "input": ["text"],
131
- "contextWindow": 256e3,
132
- "maxTokens": 64e3,
133
- "cost": {
134
- "input": 0,
135
- "output": 0,
136
- "cacheRead": 0,
137
- "cacheWrite": 0
138
- },
139
- "compat": {
140
- "supportsStore": false,
141
- "supportsUsageInStreaming": false,
142
- "supportsReasoningEffort": true,
143
- "supportedReasoningEfforts": ["none", "high"],
144
- "reasoningEffortMap": {
145
- "off": "none",
146
- "none": "none",
147
- "minimal": "high",
148
- "low": "high",
149
- "medium": "high",
150
- "high": "high",
151
- "xhigh": "high",
152
- "adaptive": "high",
153
- "max": "high"
154
- },
155
- "maxTokensField": "max_tokens"
156
- }
157
- }
158
- ]
159
- } },
160
- "discovery": { "cohere": "refreshable" }
161
- },
162
- setup: { "providers": [{
163
- "id": "cohere",
164
- "envVars": ["COHERE_API_KEY"]
165
- }] },
166
- providerAuthChoices: [{
167
- "provider": "cohere",
168
- "method": "api-key",
169
- "choiceId": "cohere-api-key",
170
- "appGuidedSecret": true,
171
- "choiceLabel": "Cohere API key",
172
- "groupId": "cohere",
173
- "groupLabel": "Cohere",
174
- "groupHint": "OpenAI-compatible inference",
175
- "optionKey": "cohereApiKey",
176
- "cliFlag": "--cohere-api-key",
177
- "cliOption": "--cohere-api-key <key>",
178
- "cliDescription": "Cohere API key"
179
- }],
180
- configSchema: {
181
- "type": "object",
182
- "additionalProperties": false,
183
- "properties": {}
184
- }
185
- };
186
- //#endregion
187
- //#region extensions/cohere/models.ts
188
- const COHERE_MANIFEST_CATALOG = openclaw_plugin_default.modelCatalog.providers.cohere;
189
- const COHERE_BASE_URL = COHERE_MANIFEST_CATALOG.baseUrl;
190
- const COHERE_MODERN_MODEL_IDS = /* @__PURE__ */ new Set([
191
- "command-a-plus-05-2026",
192
- "command-a-reasoning-08-2025",
193
- "north-mini-code-1-0"
194
- ]);
195
- function isModernCohereModelId(modelId) {
196
- return COHERE_MODERN_MODEL_IDS.has(modelId.trim().toLowerCase());
197
- }
198
- function buildCohereCatalogModels() {
199
- return buildManifestModelProviderConfig({
200
- providerId: "cohere",
201
- catalog: COHERE_MANIFEST_CATALOG
202
- }).models;
203
- }
204
- //#endregion
205
- export { openclaw_plugin_default as i, buildCohereCatalogModels as n, isModernCohereModelId as r, COHERE_BASE_URL as t };
@@ -1 +0,0 @@
1
- {"version":3,"entries":[{"output":"index.js","source":"extensions/cohere/index.ts"},{"output":"models.js","source":"extensions/cohere/models.ts"},{"output":"onboard.js","source":"extensions/cohere/onboard.ts"},{"output":"provider-catalog.js","source":"extensions/cohere/provider-catalog.ts"},{"output":"stream.js","source":"extensions/cohere/stream.ts"}],"chunks":[{"output":".setup/models-BtjAnVPh.mjs","sha256":"bcbb932eafe6343d94f57233daa5fb1b61d8eefe780a480e0c7fb2f88d959d8d","facadeSource":null,"sources":["extensions/cohere/models.ts","extensions/cohere/openclaw.plugin.json"]},{"output":"index.js","sha256":"f19ec27a21b78646053b84e0f42c380e03dab9a1d30cdf92c37526779259331c","facadeSource":"extensions/cohere/index.ts","sources":["extensions/cohere/index.ts"]},{"output":"models.js","sha256":"baf9b20368a171c5375a8790305029f3677be09b7def7606258023e03a43a2fa","facadeSource":"extensions/cohere/models.ts","sources":[]},{"output":"onboard.js","sha256":"4de4c01a4f4bfb97e5083811353692a4575d1b0f1bed56963fb09be43bcdc632","facadeSource":"extensions/cohere/onboard.ts","sources":["extensions/cohere/onboard.ts"]},{"output":"provider-catalog.js","sha256":"34654b0ec6b3b1d609daa111da1aacd349734b3bed4cb07041dcd5da5827303b","facadeSource":"extensions/cohere/provider-catalog.ts","sources":["extensions/cohere/provider-catalog.ts"]},{"output":"stream.js","sha256":"ed788d2b7650ce758062509552b47e0e0ecb5fd87f79bce2b8c15b9684b72c87","facadeSource":"extensions/cohere/stream.ts","sources":["extensions/cohere/stream.ts"]}],"unrenderedSources":[]}
package/dist/models.js DELETED
@@ -1 +0,0 @@
1
- export { t as COHERE_BASE_URL, n as buildCohereCatalogModels, r as isModernCohereModelId } from "./.setup/models-BtjAnVPh.mjs";
package/dist/onboard.js DELETED
@@ -1,20 +0,0 @@
1
- import { i as openclaw_plugin_default, n as buildCohereCatalogModels, t as COHERE_BASE_URL } from "./.setup/models-BtjAnVPh.mjs";
2
- import { readManifestProviderDefaultModelRef } from "openclaw/plugin-sdk/provider-catalog-shared";
3
- import { createProviderConnectionPresetAppliers } from "openclaw/plugin-sdk/provider-onboard";
4
- //#region extensions/cohere/onboard.ts
5
- const COHERE_DEFAULT_MODEL_REF = readManifestProviderDefaultModelRef(openclaw_plugin_default, "cohere");
6
- const { applyConfig: applyCohereConfig } = createProviderConnectionPresetAppliers({
7
- primaryModelRef: COHERE_DEFAULT_MODEL_REF,
8
- resolveParams: () => ({
9
- providerId: "cohere",
10
- api: "openai-completions",
11
- baseUrl: COHERE_BASE_URL,
12
- catalogModels: buildCohereCatalogModels,
13
- aliases: [{
14
- modelRef: COHERE_DEFAULT_MODEL_REF,
15
- alias: "Cohere Command A+"
16
- }]
17
- })
18
- });
19
- //#endregion
20
- export { applyCohereConfig };
@@ -1,24 +0,0 @@
1
- import { t as COHERE_BASE_URL } from "./.setup/models-BtjAnVPh.mjs";
2
- import { asOptionalObjectRecord, asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
3
- //#region extensions/cohere/provider-catalog.ts
4
- const COHERE_LIVE_MODEL_DISCOVERY = {
5
- endpointUrl: {
6
- url: "https://api.cohere.com/v1/models?endpoint=chat&page_size=1000",
7
- requireBaseUrl: COHERE_BASE_URL
8
- },
9
- readRows: (body) => {
10
- const models = asOptionalObjectRecord(body)?.models;
11
- if (!Array.isArray(models)) throw new Error("Cohere model catalog response must contain models[]");
12
- return models.flatMap((row) => {
13
- const record = asOptionalRecord(row);
14
- const modelId = normalizeOptionalString(record?.name);
15
- return modelId ? [{
16
- ...record,
17
- id: modelId,
18
- active: record?.is_deprecated !== true
19
- }] : [];
20
- });
21
- }
22
- };
23
- //#endregion
24
- export { COHERE_LIVE_MODEL_DISCOVERY };
package/dist/stream.js DELETED
@@ -1,13 +0,0 @@
1
- import { createPayloadPatchStreamWrapper } from "openclaw/plugin-sdk/provider-stream-shared";
2
- //#region extensions/cohere/stream.ts
3
- function wrapCohereProviderStream(ctx) {
4
- return createPayloadPatchStreamWrapper(ctx.streamFn, ({ payload }) => {
5
- if (Array.isArray(payload.messages)) payload.messages = payload.messages.map((message) => message && typeof message === "object" && message.role === "system" ? {
6
- ...message,
7
- role: "developer"
8
- } : message);
9
- delete payload.tool_choice;
10
- });
11
- }
12
- //#endregion
13
- export { wrapCohereProviderStream };