@openclaw/mistral-provider 2026.9.4 → 2026.9.6
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/assets/activity.svg +30 -0
- package/assets/icon.png +0 -0
- package/dist/{provider-catalog-B8qxE_lA.js → .setup/provider-catalog-DV4UQ-rA.mjs} +1 -5
- package/dist/api.js +9 -23
- package/dist/index.js +3 -5
- package/dist/model-definitions.js +1 -1
- package/dist/provider-catalog.js +1 -1
- package/dist/provider-policy-api.js +31 -0
- package/dist/realtime-transcription-provider-factory.js +1 -1
- package/openclaw.plugin.json +1 -3
- package/package.json +7 -5
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
2
|
+
<!--
|
|
3
|
+
Adapted from OpenClaw ui/public/provider-icons/ProviderIcon-mistral.svg.
|
|
4
|
+
Source: https://github.com/steipete/CodexBar/blob/215efbd39ad58acb4b0cd637c407d63e6183bc8d/Sources/CodexBar/Resources/ProviderIcon-mistral.svg
|
|
5
|
+
|
|
6
|
+
MIT License
|
|
7
|
+
Copyright (c) 2026 Peter Steinberger
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
SOFTWARE.
|
|
26
|
+
|
|
27
|
+
Names and marks remain the property of their respective owners.
|
|
28
|
+
-->
|
|
29
|
+
<path clip-rule="evenodd" fill="currentColor" fill-rule="evenodd" stroke="none" d="M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z" />
|
|
30
|
+
</svg>
|
package/assets/icon.png
ADDED
|
Binary file
|
|
@@ -2,11 +2,7 @@ import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-c
|
|
|
2
2
|
//#region extensions/mistral/openclaw.plugin.json
|
|
3
3
|
var openclaw_plugin_default = {
|
|
4
4
|
id: "mistral",
|
|
5
|
-
categories: [
|
|
6
|
-
"models",
|
|
7
|
-
"memory",
|
|
8
|
-
"voice"
|
|
9
|
-
],
|
|
5
|
+
categories: ["models"],
|
|
10
6
|
capabilityCatalogEntry: "./capability-catalog.ts",
|
|
11
7
|
activation: { "onStartup": false },
|
|
12
8
|
enabledByDefault: true,
|
package/dist/api.js
CHANGED
|
@@ -1,41 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MISTRAL_MEDIUM_3_5_ID, MISTRAL_SMALL_4_ID, MISTRAL_SMALL_LATEST_ID, resolveMistralReasoningEffortMap } from "./provider-policy-api.js";
|
|
2
|
+
import { t as buildMistralProvider } from "./.setup/provider-catalog-DV4UQ-rA.mjs";
|
|
2
3
|
import { MISTRAL_BASE_URL, MISTRAL_DEFAULT_MODEL_ID, MISTRAL_DEFAULT_MODEL_REF, buildMistralModelDefinition } from "./model-definitions.js";
|
|
3
4
|
import { applyMistralConfig, applyMistralProviderConfig } from "./onboard.js";
|
|
5
|
+
import { asOptionalObjectRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
+
//#region extensions/mistral/api.ts
|
|
4
7
|
const MISTRAL_MODEL_TRANSPORT_PATCH = {
|
|
5
8
|
supportsStore: false,
|
|
6
9
|
supportsPromptCacheKey: true,
|
|
7
10
|
supportsLongCacheRetention: false,
|
|
8
11
|
maxTokensField: "max_tokens"
|
|
9
12
|
};
|
|
10
|
-
const MISTRAL_SMALL_LATEST_REASONING_EFFORT_MAP = {
|
|
11
|
-
off: "none",
|
|
12
|
-
minimal: "none",
|
|
13
|
-
low: "high",
|
|
14
|
-
medium: "high",
|
|
15
|
-
high: "high",
|
|
16
|
-
xhigh: "high",
|
|
17
|
-
adaptive: "high",
|
|
18
|
-
max: "high"
|
|
19
|
-
};
|
|
20
|
-
const MISTRAL_SMALL_LATEST_ID = "mistral-small-latest";
|
|
21
|
-
const MISTRAL_SMALL_4_ID = "mistral-small-2603";
|
|
22
|
-
const MISTRAL_MEDIUM_3_5_ID = "mistral-medium-3-5";
|
|
23
13
|
function resolveMistralCompatPatch(model) {
|
|
24
|
-
const
|
|
14
|
+
const reasoningEffortMap = resolveMistralReasoningEffortMap(model.id);
|
|
25
15
|
return {
|
|
26
16
|
...MISTRAL_MODEL_TRANSPORT_PATCH,
|
|
27
|
-
supportsReasoningEffort:
|
|
28
|
-
reasoningEffortMap
|
|
17
|
+
supportsReasoningEffort: reasoningEffortMap !== void 0,
|
|
18
|
+
reasoningEffortMap
|
|
29
19
|
};
|
|
30
20
|
}
|
|
31
|
-
function compatMatchesResolved(compat, modelId) {
|
|
32
|
-
const expected = resolveMistralCompatPatch({ id: modelId });
|
|
33
|
-
return compat?.supportsStore === expected.supportsStore && compat?.supportsPromptCacheKey === expected.supportsPromptCacheKey && compat?.supportsLongCacheRetention === expected.supportsLongCacheRetention && compat?.supportsReasoningEffort === expected.supportsReasoningEffort && compat?.maxTokensField === expected.maxTokensField && compat?.reasoningEffortMap === expected.reasoningEffortMap;
|
|
34
|
-
}
|
|
35
21
|
function applyMistralModelCompat(model) {
|
|
36
|
-
const compat = model.compat
|
|
37
|
-
if (compatMatchesResolved(compat, model.id)) return model;
|
|
22
|
+
const compat = asOptionalObjectRecord(model.compat);
|
|
38
23
|
const patch = resolveMistralCompatPatch(model);
|
|
24
|
+
if (Object.entries(patch).every(([key, value]) => compat?.[key] === value)) return model;
|
|
39
25
|
return {
|
|
40
26
|
...model,
|
|
41
27
|
compat: {
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveThinkingProfile } from "./provider-policy-api.js";
|
|
2
|
+
import { n as openclaw_plugin_default } from "./.setup/provider-catalog-DV4UQ-rA.mjs";
|
|
2
3
|
import { applyMistralConnectionConfig } from "./onboard.js";
|
|
3
4
|
import { applyMistralModelCompat } from "./api.js";
|
|
4
5
|
import { mistralMediaUnderstandingProvider } from "./media-understanding-provider.js";
|
|
@@ -29,10 +30,7 @@ var mistral_default = defineSingleProviderPluginEntry({
|
|
|
29
30
|
},
|
|
30
31
|
matchesContextOverflowError: ({ errorMessage }) => /\bmistral\b.*(?:input.*too long|token limit.*exceeded)/i.test(errorMessage),
|
|
31
32
|
normalizeResolvedModel: ({ model }) => applyMistralModelCompat(model),
|
|
32
|
-
resolveThinkingProfile
|
|
33
|
-
levels: [{ id: "off" }, { id: "high" }],
|
|
34
|
-
defaultLevel: "off"
|
|
35
|
-
} : void 0,
|
|
33
|
+
resolveThinkingProfile,
|
|
36
34
|
buildReplayPolicy: () => buildMistralReplayPolicy()
|
|
37
35
|
},
|
|
38
36
|
register(api) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as openclaw_plugin_default, t as buildMistralProvider } from "
|
|
1
|
+
import { n as openclaw_plugin_default, t as buildMistralProvider } from "./.setup/provider-catalog-DV4UQ-rA.mjs";
|
|
2
2
|
import { readManifestProviderDefaultModelRef } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
3
3
|
const MISTRAL_BASE_URL = openclaw_plugin_default.modelCatalog.providers.mistral.baseUrl;
|
|
4
4
|
const MISTRAL_DEFAULT_MODEL_REF = readManifestProviderDefaultModelRef(openclaw_plugin_default, "mistral");
|
package/dist/provider-catalog.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as buildMistralProvider } from "
|
|
1
|
+
import { t as buildMistralProvider } from "./.setup/provider-catalog-DV4UQ-rA.mjs";
|
|
2
2
|
export { buildMistralProvider };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region extensions/mistral/provider-policy-api.ts
|
|
2
|
+
const MISTRAL_SMALL_LATEST_ID = "mistral-small-latest";
|
|
3
|
+
const MISTRAL_SMALL_4_ID = "mistral-small-2603";
|
|
4
|
+
const MISTRAL_MEDIUM_3_5_ID = "mistral-medium-3-5";
|
|
5
|
+
const MISTRAL_REASONING_MODEL_IDS = /* @__PURE__ */ new Set([
|
|
6
|
+
MISTRAL_SMALL_LATEST_ID,
|
|
7
|
+
MISTRAL_SMALL_4_ID,
|
|
8
|
+
MISTRAL_MEDIUM_3_5_ID
|
|
9
|
+
]);
|
|
10
|
+
const MISTRAL_THINKING_LEVELS = [
|
|
11
|
+
["off", "none"],
|
|
12
|
+
["minimal", "none"],
|
|
13
|
+
["low", "high"],
|
|
14
|
+
["medium", "high"],
|
|
15
|
+
["high", "high"],
|
|
16
|
+
["xhigh", "high"],
|
|
17
|
+
["adaptive", "high"],
|
|
18
|
+
["max", "high"]
|
|
19
|
+
];
|
|
20
|
+
const MISTRAL_REASONING_EFFORT_MAP = Object.fromEntries(MISTRAL_THINKING_LEVELS);
|
|
21
|
+
function resolveMistralReasoningEffortMap(modelId) {
|
|
22
|
+
return modelId !== void 0 && MISTRAL_REASONING_MODEL_IDS.has(modelId) ? MISTRAL_REASONING_EFFORT_MAP : void 0;
|
|
23
|
+
}
|
|
24
|
+
function resolveThinkingProfile({ modelId }) {
|
|
25
|
+
return resolveMistralReasoningEffortMap(modelId) ? {
|
|
26
|
+
levels: MISTRAL_THINKING_LEVELS.map(([id]) => ({ id })),
|
|
27
|
+
defaultLevel: "off"
|
|
28
|
+
} : void 0;
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { MISTRAL_MEDIUM_3_5_ID, MISTRAL_SMALL_4_ID, MISTRAL_SMALL_LATEST_ID, resolveMistralReasoningEffortMap, resolveThinkingProfile };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { normalizeResolvedSecretInputString, normalizeSecretInput } from "openclaw/plugin-sdk/secret-input";
|
|
2
1
|
import { asOptionalRecord, normalizeOptionalString, parseFiniteNumber } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
+
import { normalizeResolvedSecretInputString, normalizeSecretInput } from "openclaw/plugin-sdk/secret-input";
|
|
3
3
|
//#region extensions/mistral/realtime-transcription-provider-factory.ts
|
|
4
4
|
const MISTRAL_REALTIME_DEFAULT_BASE_URL = "wss://api.mistral.ai";
|
|
5
5
|
const MISTRAL_REALTIME_DEFAULT_MODEL = "voxtral-mini-transcribe-realtime-2602";
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/mistral-provider",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.6",
|
|
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.9.
|
|
21
|
+
"pluginApi": ">=2026.9.6"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.9.
|
|
24
|
+
"openclawVersion": "2026.9.6",
|
|
25
25
|
"bundledDist": false
|
|
26
26
|
},
|
|
27
27
|
"release": {
|
|
@@ -35,10 +35,12 @@
|
|
|
35
35
|
"files": [
|
|
36
36
|
"dist/**",
|
|
37
37
|
"openclaw.plugin.json",
|
|
38
|
-
"README.md"
|
|
38
|
+
"README.md",
|
|
39
|
+
"assets/icon.png",
|
|
40
|
+
"assets/activity.svg"
|
|
39
41
|
],
|
|
40
42
|
"peerDependencies": {
|
|
41
|
-
"openclaw": ">=2026.9.
|
|
43
|
+
"openclaw": ">=2026.9.6"
|
|
42
44
|
},
|
|
43
45
|
"peerDependenciesMeta": {
|
|
44
46
|
"openclaw": {
|