@warlock.js/ai-mistral 5.31.0 → 5.32.0
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/CHANGELOG.md +6 -0
- package/esm/config.type.d.mts +2 -4
- package/esm/config.type.d.mts.map +1 -1
- package/esm/known-models.d.mts +11 -9
- package/esm/known-models.d.mts.map +1 -1
- package/esm/sdk.d.mts +1 -3
- package/esm/sdk.d.mts.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to `@warlock.js/ai-mistral` are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
|
|
6
6
|
|
|
7
|
+
## 5.32.0 - 2026-10-18
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Pin the package development compiler to TypeScript 7.0.2 and use explicit Node types and source roots with supported module resolution.
|
|
12
|
+
|
|
7
13
|
## 5.31.0 - 2026-10-18
|
|
8
14
|
|
|
9
15
|
### Added
|
package/esm/config.type.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { OpenAISDKConfig } from "@warlock.js/ai-openai";
|
|
2
2
|
import { ModelConfig } from "@warlock.js/ai";
|
|
3
|
-
|
|
4
3
|
//#region ../../packages/ai-mistral/src/config.type.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Configuration for the Mistral SDK adapter.
|
|
@@ -34,7 +33,7 @@ import { ModelConfig } from "@warlock.js/ai";
|
|
|
34
33
|
* pricing: { "mistral-large-latest": { input: 2, output: 6 } },
|
|
35
34
|
* });
|
|
36
35
|
*/
|
|
37
|
-
type MistralSDKConfig = OpenAISDKConfig;
|
|
36
|
+
export type MistralSDKConfig = OpenAISDKConfig;
|
|
38
37
|
/**
|
|
39
38
|
* Per-model configuration for `MistralSDK.model()`. Extends the neutral
|
|
40
39
|
* {@link ModelConfig} with the same capability overrides the wrapped
|
|
@@ -52,7 +51,7 @@ type MistralSDKConfig = OpenAISDKConfig;
|
|
|
52
51
|
* mistral.model({ name: "magistral-medium-latest" }); // reasoning auto-true
|
|
53
52
|
* mistral.model({ name: "some-fine-tune", vision: true }); // explicit override
|
|
54
53
|
*/
|
|
55
|
-
type MistralModelConfig = ModelConfig & {
|
|
54
|
+
export type MistralModelConfig = ModelConfig & {
|
|
56
55
|
/**
|
|
57
56
|
* Override the auto-inferred vision capability. When omitted, the
|
|
58
57
|
* adapter checks the model id against this provider's multimodal
|
|
@@ -107,5 +106,4 @@ type MistralModelConfig = ModelConfig & {
|
|
|
107
106
|
audio?: boolean;
|
|
108
107
|
};
|
|
109
108
|
//#endregion
|
|
110
|
-
export { MistralModelConfig, MistralSDKConfig };
|
|
111
109
|
//# sourceMappingURL=config.type.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.type.d.mts","names":[],"sources":["../../../../../../../packages/ai-mistral/src/config.type.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.type.d.mts","names":[],"sources":["../../../../../../../packages/ai-mistral/src/config.type.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAmCY,mBAAmB;;;;;;;;;;;;;;;;;;YAmBnB,qBAAqB;;;;;;;;EAQ/B;;;;;;;;;EASA;;;;;;EAMA;;;;;;;;;;EAUA;;;;;;;EAOA;;;;;;EAMA;;;;;;EAMA"}
|
package/esm/known-models.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ModelPricing } from "@warlock.js/ai";
|
|
2
|
-
|
|
3
2
|
//#region ../../packages/ai-mistral/src/known-models.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Infer whether a Mistral model id accepts image input (vision) based on
|
|
@@ -13,7 +12,7 @@ import { ModelPricing } from "@warlock.js/ai";
|
|
|
13
12
|
* inferVisionCapability("magistral-medium-latest");// → false
|
|
14
13
|
* inferVisionCapability("mistral-embed"); // → false
|
|
15
14
|
*/
|
|
16
|
-
declare function inferVisionCapability(modelName: string): boolean;
|
|
15
|
+
export declare function inferVisionCapability(modelName: string): boolean;
|
|
17
16
|
/**
|
|
18
17
|
* Infer whether a Mistral model id is a reasoning model (the `magistral`
|
|
19
18
|
* family plus the hybrid `mistral-small` generation) based on the known
|
|
@@ -26,7 +25,7 @@ declare function inferVisionCapability(modelName: string): boolean;
|
|
|
26
25
|
* inferReasoningCapability("mistral-large-latest"); // → false
|
|
27
26
|
* inferReasoningCapability("pixtral-12b"); // → false
|
|
28
27
|
*/
|
|
29
|
-
declare function inferReasoningCapability(modelName: string): boolean;
|
|
28
|
+
export declare function inferReasoningCapability(modelName: string): boolean;
|
|
30
29
|
/**
|
|
31
30
|
* Stable `-latest` alias ids for the headline Mistral chat / embeddings
|
|
32
31
|
* models, grouped by role. Convenience constants only — `mistral.model()`
|
|
@@ -36,10 +35,14 @@ declare function inferReasoningCapability(modelName: string): boolean;
|
|
|
36
35
|
* newer alias is recognized the moment its name matches a fragment in
|
|
37
36
|
* {@link inferVisionCapability} / {@link inferReasoningCapability}.
|
|
38
37
|
*/
|
|
39
|
-
declare const MISTRAL_MODELS: {
|
|
40
|
-
/** General-purpose multimodal flagship / mid / small chat aliases. */
|
|
41
|
-
readonly
|
|
42
|
-
|
|
38
|
+
export declare const MISTRAL_MODELS: {
|
|
39
|
+
/** General-purpose multimodal flagship / mid / small chat aliases. */
|
|
40
|
+
readonly chat: readonly ["mistral-large-latest", "mistral-medium-latest", "mistral-small-latest"];
|
|
41
|
+
/** Dedicated multimodal (vision) aliases — the `pixtral` family. */
|
|
42
|
+
readonly vision: readonly ["pixtral-large-latest", "pixtral-12b"];
|
|
43
|
+
/** Dedicated reasoning aliases — the `magistral` family. */
|
|
44
|
+
readonly reasoning: readonly ["magistral-medium-latest", "magistral-small-latest"];
|
|
45
|
+
/** Embeddings model reachable via the OpenAI-compatible `/v1/embeddings`. */
|
|
43
46
|
readonly embedding: readonly ["mistral-embed"];
|
|
44
47
|
};
|
|
45
48
|
/**
|
|
@@ -55,7 +58,6 @@ declare const MISTRAL_MODELS: {
|
|
|
55
58
|
* `model()` time always lets a caller-supplied rate win: per-model
|
|
56
59
|
* `pricing` > SDK `pricing` > these defaults > `undefined`.
|
|
57
60
|
*/
|
|
58
|
-
declare const MISTRAL_DEFAULT_PRICING: Readonly<Record<string, ModelPricing>>;
|
|
61
|
+
export declare const MISTRAL_DEFAULT_PRICING: Readonly<Record<string, ModelPricing>>;
|
|
59
62
|
//#endregion
|
|
60
|
-
export { MISTRAL_DEFAULT_PRICING, MISTRAL_MODELS, inferReasoningCapability, inferVisionCapability };
|
|
61
63
|
//# sourceMappingURL=known-models.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"known-models.d.mts","names":[],"sources":["../../../../../../../packages/ai-mistral/src/known-models.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"known-models.d.mts","names":[],"sources":["../../../../../../../packages/ai-mistral/src/known-models.ts"],"mappings":";;;;;;;;;;;;;;wBAgEgB,sBAAsB;;;;;;;;;;;;;wBAkBtB,yBAAyB;;;;;;;;;;qBAe5B;;WAEX;;WAEA;;WAEA;;WAEA;;;;;;;;;;;;;;;qBAgBW,yBAAyB,SAAS,eAAe"}
|
package/esm/sdk.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { MistralModelConfig, MistralSDKConfig } from "./config.type.mjs";
|
|
2
2
|
import { EmbedderConfig, EmbedderContract, ModelContract, SDKAdapterContract } from "@warlock.js/ai";
|
|
3
|
-
|
|
4
3
|
//#region ../../packages/ai-mistral/src/sdk.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Mistral-backed implementation of `SDKAdapterContract`.
|
|
@@ -48,7 +47,7 @@ import { EmbedderConfig, EmbedderContract, ModelContract, SDKAdapterContract } f
|
|
|
48
47
|
* const ai = { agent, tool, systemPrompt, mistral: new MistralSDK({ apiKey }) };
|
|
49
48
|
* const reasoner = ai.agent({ model: ai.mistral.model({ name: "magistral-medium-latest" }) });
|
|
50
49
|
*/
|
|
51
|
-
declare class MistralSDK implements SDKAdapterContract {
|
|
50
|
+
export declare class MistralSDK implements SDKAdapterContract {
|
|
52
51
|
/**
|
|
53
52
|
* The wrapped OpenAI-compatible adapter doing all the real work. Built
|
|
54
53
|
* once in the constructor with Mistral's `baseURL`, `provider` label,
|
|
@@ -95,5 +94,4 @@ declare class MistralSDK implements SDKAdapterContract {
|
|
|
95
94
|
embedder(config: EmbedderConfig): EmbedderContract;
|
|
96
95
|
}
|
|
97
96
|
//#endregion
|
|
98
|
-
export { MistralSDK };
|
|
99
97
|
//# sourceMappingURL=sdk.d.mts.map
|
package/esm/sdk.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.mts","names":[],"sources":["../../../../../../../packages/ai-mistral/src/sdk.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"sdk.d.mts","names":[],"sources":["../../../../../../../packages/ai-mistral/src/sdk.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAmEa,sBAAsB;;;;;;mBAMhB;EAEjB,YAAmB,QAAQ;;;;;;;;;;;;;;;;;;;EAoCpB,MAAM,QAAQ,qBAAqB;;;;;;;EAgB7B,MAAM,cAAc,iBAAiB;;;;;;;;;;;EAc3C,SAAS,QAAQ,iBAAiB"}
|
package/package.json
CHANGED
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
"directory": "packages/ai-mistral"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@warlock.js/ai-openai": "5.
|
|
20
|
-
"@warlock.js/logger": "5.
|
|
19
|
+
"@warlock.js/ai-openai": "5.32.0",
|
|
20
|
+
"@warlock.js/logger": "5.32.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@warlock.js/ai": "5.
|
|
23
|
+
"@warlock.js/ai": "5.32.0"
|
|
24
24
|
},
|
|
25
|
-
"version": "5.
|
|
25
|
+
"version": "5.32.0",
|
|
26
26
|
"main": "./cjs/index.cjs",
|
|
27
27
|
"module": "./esm/index.mjs",
|
|
28
28
|
"types": "./esm/index.d.mts",
|