@openclaw/mistral-provider 2026.8.1-beta.3 → 2026.8.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/api.js +1 -1
- package/dist/embedding-provider.js +7 -10
- package/dist/index.js +2 -3
- package/dist/memory-embedding-adapter.js +18 -2
- package/dist/model-definitions.js +4 -12
- package/dist/{openclaw.plugin-CO8EsteR.js → provider-catalog-CTPBG3Dh.js} +10 -1
- package/dist/provider-catalog.js +1 -10
- package/dist/realtime-transcription-provider.js +7 -6
- package/package.json +4 -4
package/dist/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildMistralProvider } from "./provider-catalog.js";
|
|
1
|
+
import { t as buildMistralProvider } from "./provider-catalog-CTPBG3Dh.js";
|
|
2
2
|
import { MISTRAL_BASE_URL, MISTRAL_DEFAULT_MODEL_ID, MISTRAL_DEFAULT_MODEL_REF, buildMistralModelDefinition } from "./model-definitions.js";
|
|
3
3
|
import { applyMistralConfig, applyMistralProviderConfig } from "./onboard.js";
|
|
4
4
|
const MISTRAL_MODEL_TRANSPORT_PATCH = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { MISTRAL_BASE_URL } from "./model-definitions.js";
|
|
1
2
|
import { createRemoteEmbeddingProvider, normalizeEmbeddingModelWithPrefixes, resolveRemoteEmbeddingClient } from "openclaw/plugin-sdk/memory-core-host-engine-embeddings";
|
|
2
3
|
//#region extensions/mistral/embedding-provider.ts
|
|
3
4
|
const DEFAULT_MISTRAL_EMBEDDING_MODEL = "mistral-embed";
|
|
4
|
-
const DEFAULT_MISTRAL_BASE_URL = "https://api.mistral.ai/v1";
|
|
5
5
|
function normalizeMistralModel(model) {
|
|
6
6
|
return normalizeEmbeddingModelWithPrefixes({
|
|
7
7
|
model,
|
|
@@ -10,7 +10,12 @@ function normalizeMistralModel(model) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
async function createMistralEmbeddingProvider(options) {
|
|
13
|
-
const client = await
|
|
13
|
+
const client = await resolveRemoteEmbeddingClient({
|
|
14
|
+
provider: "mistral",
|
|
15
|
+
options,
|
|
16
|
+
defaultBaseUrl: MISTRAL_BASE_URL,
|
|
17
|
+
normalizeModel: normalizeMistralModel
|
|
18
|
+
});
|
|
14
19
|
return {
|
|
15
20
|
provider: createRemoteEmbeddingProvider({
|
|
16
21
|
id: "mistral",
|
|
@@ -20,13 +25,5 @@ async function createMistralEmbeddingProvider(options) {
|
|
|
20
25
|
client
|
|
21
26
|
};
|
|
22
27
|
}
|
|
23
|
-
async function resolveMistralEmbeddingClient(options) {
|
|
24
|
-
return await resolveRemoteEmbeddingClient({
|
|
25
|
-
provider: "mistral",
|
|
26
|
-
options,
|
|
27
|
-
defaultBaseUrl: DEFAULT_MISTRAL_BASE_URL,
|
|
28
|
-
normalizeModel: normalizeMistralModel
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
28
|
//#endregion
|
|
32
29
|
export { DEFAULT_MISTRAL_EMBEDDING_MODEL, createMistralEmbeddingProvider };
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as openclaw_plugin_default } from "./provider-catalog-CTPBG3Dh.js";
|
|
2
2
|
import { applyMistralConfig } from "./onboard.js";
|
|
3
3
|
import { applyMistralModelCompat } from "./api.js";
|
|
4
4
|
import { mistralMediaUnderstandingProvider } from "./media-understanding-provider.js";
|
|
5
5
|
import { mistralMemoryEmbeddingProviderAdapter } from "./memory-embedding-adapter.js";
|
|
6
6
|
import { buildMistralRealtimeTranscriptionProvider } from "./realtime-transcription-provider.js";
|
|
7
|
-
import { adaptMemoryEmbeddingProviderAdapter } from "openclaw/plugin-sdk/memory-core-host-engine-embeddings";
|
|
8
7
|
import { defineSingleProviderPluginEntry } from "openclaw/plugin-sdk/provider-entry";
|
|
9
8
|
//#region extensions/mistral/index.ts
|
|
10
9
|
const PROVIDER_ID = "mistral";
|
|
@@ -36,7 +35,7 @@ var mistral_default = defineSingleProviderPluginEntry({
|
|
|
36
35
|
buildReplayPolicy: () => buildMistralReplayPolicy()
|
|
37
36
|
},
|
|
38
37
|
register(api) {
|
|
39
|
-
api.registerEmbeddingProvider(
|
|
38
|
+
api.registerEmbeddingProvider(mistralMemoryEmbeddingProviderAdapter);
|
|
40
39
|
api.registerMediaUnderstandingProvider(mistralMediaUnderstandingProvider);
|
|
41
40
|
api.registerRealtimeTranscriptionProvider(buildMistralRealtimeTranscriptionProvider());
|
|
42
41
|
}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import { MISTRAL_BASE_URL } from "./model-definitions.js";
|
|
1
2
|
import { DEFAULT_MISTRAL_EMBEDDING_MODEL, createMistralEmbeddingProvider } from "./embedding-provider.js";
|
|
2
|
-
import { isMissingEmbeddingApiKeyError } from "openclaw/plugin-sdk/memory-core-host-engine-embeddings";
|
|
3
|
+
import { embeddingProviderOwnsDestination, isMissingEmbeddingApiKeyError, sanitizeEmbeddingCacheHeaders } from "openclaw/plugin-sdk/memory-core-host-engine-embeddings";
|
|
3
4
|
//#region extensions/mistral/memory-embedding-adapter.ts
|
|
5
|
+
const EXCLUDED_EMBEDDING_HEADERS = [
|
|
6
|
+
"authorization",
|
|
7
|
+
"content-type",
|
|
8
|
+
"x-api-key",
|
|
9
|
+
"api-key"
|
|
10
|
+
];
|
|
4
11
|
const mistralMemoryEmbeddingProviderAdapter = {
|
|
5
12
|
id: "mistral",
|
|
6
13
|
defaultModel: DEFAULT_MISTRAL_EMBEDDING_MODEL,
|
|
@@ -15,13 +22,22 @@ const mistralMemoryEmbeddingProviderAdapter = {
|
|
|
15
22
|
provider: "mistral",
|
|
16
23
|
fallback: "none"
|
|
17
24
|
});
|
|
25
|
+
const headers = sanitizeEmbeddingCacheHeaders(client.headers, EXCLUDED_EMBEDDING_HEADERS);
|
|
26
|
+
const usesDefaultIdentity = headers.length === 0 && embeddingProviderOwnsDestination({
|
|
27
|
+
baseUrl: client.baseUrl,
|
|
28
|
+
providerBaseUrl: MISTRAL_BASE_URL
|
|
29
|
+
});
|
|
18
30
|
return {
|
|
19
31
|
provider,
|
|
20
32
|
runtime: {
|
|
21
33
|
id: "mistral",
|
|
22
34
|
cacheKeyData: {
|
|
23
35
|
provider: "mistral",
|
|
24
|
-
model: client.model
|
|
36
|
+
model: client.model,
|
|
37
|
+
...usesDefaultIdentity ? {} : {
|
|
38
|
+
baseUrl: client.baseUrl,
|
|
39
|
+
headers
|
|
40
|
+
}
|
|
25
41
|
}
|
|
26
42
|
}
|
|
27
43
|
};
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const MISTRAL_MANIFEST_CATALOG = openclaw_plugin_default.modelCatalog.providers.mistral;
|
|
5
|
-
const MISTRAL_BASE_URL = MISTRAL_MANIFEST_CATALOG.baseUrl;
|
|
1
|
+
import { n as openclaw_plugin_default, t as buildMistralProvider } from "./provider-catalog-CTPBG3Dh.js";
|
|
2
|
+
import { readManifestProviderDefaultModelRef } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
3
|
+
const MISTRAL_BASE_URL = openclaw_plugin_default.modelCatalog.providers.mistral.baseUrl;
|
|
6
4
|
const MISTRAL_DEFAULT_MODEL_REF = readManifestProviderDefaultModelRef(openclaw_plugin_default, "mistral");
|
|
7
5
|
const MISTRAL_DEFAULT_MODEL_ID = MISTRAL_DEFAULT_MODEL_REF.slice(8);
|
|
8
6
|
function buildMistralModelDefinition() {
|
|
9
|
-
const model =
|
|
7
|
+
const model = buildMistralProvider().models.find((entry) => entry.id === MISTRAL_DEFAULT_MODEL_ID);
|
|
10
8
|
if (!model) throw new Error(`Missing Mistral provider model ${MISTRAL_DEFAULT_MODEL_ID}`);
|
|
11
9
|
return model;
|
|
12
10
|
}
|
|
13
|
-
function buildMistralCatalogModels() {
|
|
14
|
-
return buildManifestModelProviderConfig({
|
|
15
|
-
providerId: "mistral",
|
|
16
|
-
catalog: MISTRAL_MANIFEST_CATALOG
|
|
17
|
-
}).models;
|
|
18
|
-
}
|
|
19
11
|
//#endregion
|
|
20
12
|
export { MISTRAL_BASE_URL, MISTRAL_DEFAULT_MODEL_ID, MISTRAL_DEFAULT_MODEL_REF, buildMistralModelDefinition };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
1
2
|
//#region extensions/mistral/openclaw.plugin.json
|
|
2
3
|
var openclaw_plugin_default = {
|
|
3
4
|
id: "mistral",
|
|
@@ -153,4 +154,12 @@ var openclaw_plugin_default = {
|
|
|
153
154
|
}
|
|
154
155
|
};
|
|
155
156
|
//#endregion
|
|
156
|
-
|
|
157
|
+
//#region extensions/mistral/provider-catalog.ts
|
|
158
|
+
function buildMistralProvider() {
|
|
159
|
+
return buildManifestModelProviderConfig({
|
|
160
|
+
providerId: "mistral",
|
|
161
|
+
catalog: openclaw_plugin_default.modelCatalog.providers.mistral
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
//#endregion
|
|
165
|
+
export { openclaw_plugin_default as n, buildMistralProvider as t };
|
package/dist/provider-catalog.js
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
3
|
-
//#region extensions/mistral/provider-catalog.ts
|
|
4
|
-
function buildMistralProvider() {
|
|
5
|
-
return buildManifestModelProviderConfig({
|
|
6
|
-
providerId: "mistral",
|
|
7
|
-
catalog: openclaw_plugin_default.modelCatalog.providers.mistral
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
//#endregion
|
|
1
|
+
import { t as buildMistralProvider } from "./provider-catalog-CTPBG3Dh.js";
|
|
11
2
|
export { buildMistralProvider };
|
|
@@ -11,13 +11,14 @@ const MISTRAL_REALTIME_CONNECT_TIMEOUT_MS = 1e4;
|
|
|
11
11
|
const MISTRAL_REALTIME_CLOSE_TIMEOUT_MS = 5e3;
|
|
12
12
|
const MISTRAL_REALTIME_MAX_RECONNECT_ATTEMPTS = 5;
|
|
13
13
|
const MISTRAL_REALTIME_RECONNECT_DELAY_MS = 1e3;
|
|
14
|
-
const MISTRAL_REALTIME_MAX_QUEUED_BYTES =
|
|
14
|
+
const MISTRAL_REALTIME_MAX_QUEUED_BYTES = 2097152;
|
|
15
15
|
const MISTRAL_REALTIME_SPEECH_CONTENT = /[\p{L}\p{N}]/u;
|
|
16
|
-
const MISTRAL_REALTIME_MAX_PARTIAL_TRANSCRIPT_BYTES =
|
|
16
|
+
const MISTRAL_REALTIME_MAX_PARTIAL_TRANSCRIPT_BYTES = 262144;
|
|
17
17
|
const MISTRAL_REALTIME_PARTIAL_TRANSCRIPT_OVERFLOW_MESSAGE = "Mistral realtime transcription exceeded the 256 KiB in-progress transcript limit";
|
|
18
18
|
function readNestedMistralConfig(rawConfig) {
|
|
19
19
|
const raw = asOptionalRecord(rawConfig);
|
|
20
|
-
|
|
20
|
+
const providers = asOptionalRecord(raw?.providers);
|
|
21
|
+
return asOptionalRecord(providers?.mistral ?? raw?.mistral ?? raw) ?? {};
|
|
21
22
|
}
|
|
22
23
|
function normalizeMistralEncoding(value) {
|
|
23
24
|
const normalized = normalizeOptionalString(value)?.toLowerCase();
|
|
@@ -68,10 +69,11 @@ function normalizeProviderConfig(config) {
|
|
|
68
69
|
};
|
|
69
70
|
}
|
|
70
71
|
function normalizeMistralApiKey(value) {
|
|
71
|
-
|
|
72
|
+
const resolved = normalizeResolvedSecretInputString({
|
|
72
73
|
value,
|
|
73
74
|
path: "plugins.entries.voice-call.config.streaming.providers.mistral.apiKey"
|
|
74
|
-
})
|
|
75
|
+
});
|
|
76
|
+
return normalizeSecretInput(resolved) || void 0;
|
|
75
77
|
}
|
|
76
78
|
function readErrorDetail(event) {
|
|
77
79
|
const message = event.error?.message;
|
|
@@ -160,7 +162,6 @@ function createMistralRealtimeTranscriptionSession(config) {
|
|
|
160
162
|
return;
|
|
161
163
|
}
|
|
162
164
|
case "error": failTerminal(new Error(readErrorDetail(event)), transport);
|
|
163
|
-
default:
|
|
164
165
|
}
|
|
165
166
|
};
|
|
166
167
|
return createRealtimeTranscriptionWebSocketSession({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/mistral-provider",
|
|
3
|
-
"version": "2026.8.
|
|
3
|
+
"version": "2026.8.2",
|
|
4
4
|
"description": "OpenClaw Mistral provider plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"minHostVersion": ">=2026.7.2"
|
|
19
19
|
},
|
|
20
20
|
"compat": {
|
|
21
|
-
"pluginApi": ">=2026.8.
|
|
21
|
+
"pluginApi": ">=2026.8.2"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.8.
|
|
24
|
+
"openclawVersion": "2026.8.2",
|
|
25
25
|
"bundledDist": false
|
|
26
26
|
},
|
|
27
27
|
"release": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"README.md"
|
|
39
39
|
],
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"openclaw": ">=2026.8.
|
|
41
|
+
"openclaw": ">=2026.8.2"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"openclaw": {
|