@openclaw/cohere-provider 2026.7.2-beta.5 → 2026.8.1-beta.2
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.
- package/dist/index.js +3 -3
- package/dist/onboard.js +2 -5
- package/dist/stream.js +9 -10
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as openclaw_plugin_default, r as isModernCohereModelId } from "./models-C55DsAXK.js";
|
|
2
2
|
import { applyCohereConfig } from "./onboard.js";
|
|
3
3
|
import { COHERE_LIVE_MODEL_DISCOVERY } from "./provider-catalog.js";
|
|
4
|
-
import {
|
|
4
|
+
import { wrapCohereProviderStream } from "./stream.js";
|
|
5
5
|
import { defineSingleProviderPluginEntry } from "openclaw/plugin-sdk/provider-entry";
|
|
6
6
|
//#region extensions/cohere/index.ts
|
|
7
7
|
var cohere_default = defineSingleProviderPluginEntry({
|
|
@@ -14,8 +14,8 @@ var cohere_default = defineSingleProviderPluginEntry({
|
|
|
14
14
|
docsPath: "/providers/cohere",
|
|
15
15
|
manifestAuth: { applyConfig: applyCohereConfig },
|
|
16
16
|
catalog: { liveModelDiscovery: COHERE_LIVE_MODEL_DISCOVERY },
|
|
17
|
-
wrapStreamFn:
|
|
18
|
-
wrapSimpleCompletionStreamFn:
|
|
17
|
+
wrapStreamFn: wrapCohereProviderStream,
|
|
18
|
+
wrapSimpleCompletionStreamFn: wrapCohereProviderStream,
|
|
19
19
|
isModernModelRef: ({ modelId }) => isModernCohereModelId(modelId)
|
|
20
20
|
}
|
|
21
21
|
});
|
package/dist/onboard.js
CHANGED
|
@@ -3,9 +3,9 @@ import { readManifestProviderDefaultModelRef } from "openclaw/plugin-sdk/provide
|
|
|
3
3
|
import { createModelCatalogPresetAppliers } from "openclaw/plugin-sdk/provider-onboard";
|
|
4
4
|
//#region extensions/cohere/onboard.ts
|
|
5
5
|
const COHERE_DEFAULT_MODEL_REF = readManifestProviderDefaultModelRef(openclaw_plugin_default, "cohere");
|
|
6
|
-
const
|
|
6
|
+
const { applyConfig: applyCohereConfig } = createModelCatalogPresetAppliers({
|
|
7
7
|
primaryModelRef: COHERE_DEFAULT_MODEL_REF,
|
|
8
|
-
resolveParams: (
|
|
8
|
+
resolveParams: () => ({
|
|
9
9
|
providerId: "cohere",
|
|
10
10
|
api: "openai-completions",
|
|
11
11
|
baseUrl: COHERE_BASE_URL,
|
|
@@ -16,8 +16,5 @@ const coherePresetAppliers = createModelCatalogPresetAppliers({
|
|
|
16
16
|
}]
|
|
17
17
|
})
|
|
18
18
|
});
|
|
19
|
-
function applyCohereConfig(cfg) {
|
|
20
|
-
return coherePresetAppliers.applyConfig(cfg);
|
|
21
|
-
}
|
|
22
19
|
//#endregion
|
|
23
20
|
export { applyCohereConfig };
|
package/dist/stream.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { createPayloadPatchStreamWrapper } from "openclaw/plugin-sdk/provider-stream-shared";
|
|
2
2
|
//#region extensions/cohere/stream.ts
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return createPayloadPatchStreamWrapper(baseStreamFn, ({ payload }) => patchCoherePayload(payload));
|
|
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
|
+
});
|
|
12
11
|
}
|
|
13
12
|
//#endregion
|
|
14
|
-
export {
|
|
13
|
+
export { wrapCohereProviderStream };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/cohere-provider",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.8.1-beta.2",
|
|
4
4
|
"description": "OpenClaw Cohere provider plugin.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"minHostVersion": ">=2026.6.8"
|
|
19
19
|
},
|
|
20
20
|
"compat": {
|
|
21
|
-
"pluginApi": ">=2026.
|
|
21
|
+
"pluginApi": ">=2026.8.1-beta.2"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.
|
|
25
|
-
"bundledDist":
|
|
24
|
+
"openclawVersion": "2026.8.1-beta.2",
|
|
25
|
+
"bundledDist": false
|
|
26
26
|
},
|
|
27
27
|
"release": {
|
|
28
28
|
"publishToClawHub": true,
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"README.md"
|
|
39
39
|
],
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"openclaw": ">=2026.
|
|
41
|
+
"openclaw": ">=2026.8.1-beta.2"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"openclaw": {
|