@openclaw/mistral-provider 2026.8.1-beta.3 → 2026.9.1-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.
@@ -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 resolveMistralEmbeddingClient(options);
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 };
@@ -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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/mistral-provider",
3
- "version": "2026.8.1-beta.3",
3
+ "version": "2026.9.1-beta.1",
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.1-beta.3"
21
+ "pluginApi": ">=2026.9.1-beta.1"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.8.1-beta.3",
24
+ "openclawVersion": "2026.9.1-beta.1",
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.1-beta.3"
41
+ "openclaw": ">=2026.9.1-beta.1"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
44
  "openclaw": {