@core-ai/mistral 0.12.0 → 0.13.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.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Mistral } from '@mistralai/mistralai';
2
- import { ChatModel, EmbeddingModel } from '@core-ai/core-ai';
2
+ import { ChatModel, EmbeddingModel, ModelCapabilities } from '@core-ai/core-ai';
3
3
  import { z } from 'zod';
4
4
 
5
5
  type MistralProviderOptions$1 = {
@@ -13,6 +13,9 @@ type MistralProvider = {
13
13
  };
14
14
  declare function createMistral(options?: MistralProviderOptions$1): MistralProvider;
15
15
 
16
+ type MistralModelCapabilities = ModelCapabilities;
17
+ declare function getMistralModelCapabilities(_modelId: string): MistralModelCapabilities;
18
+
16
19
  declare const mistralGenerateProviderOptionsSchema: z.ZodObject<{
17
20
  stopSequences: z.ZodOptional<z.ZodArray<z.ZodString>>;
18
21
  frequencyPenalty: z.ZodOptional<z.ZodNumber>;
@@ -57,4 +60,4 @@ declare const mistralProviderOptionsSchema: z.ZodObject<{
57
60
  }, z.core.$strict>;
58
61
  type MistralProviderOptions = MistralGenerateProviderOptions;
59
62
 
60
- export { type MistralEmbedProviderOptions, type MistralGenerateProviderOptions, type MistralProviderOptions as MistralModelProviderOptions, type MistralProvider, type MistralProviderOptions$1 as MistralProviderOptions, createMistral, mistralEmbedProviderOptionsSchema, mistralGenerateProviderOptionsSchema, mistralProviderOptionsSchema };
63
+ export { type MistralEmbedProviderOptions, type MistralGenerateProviderOptions, type MistralModelCapabilities, type MistralProviderOptions as MistralModelProviderOptions, type MistralProvider, type MistralProviderOptions$1 as MistralProviderOptions, createMistral, getMistralModelCapabilities, mistralEmbedProviderOptionsSchema, mistralGenerateProviderOptionsSchema, mistralProviderOptionsSchema };
package/dist/index.js CHANGED
@@ -539,6 +539,18 @@ function wrapMistralError(error) {
539
539
  );
540
540
  }
541
541
 
542
+ // src/model-capabilities.ts
543
+ var NO_REASONING_CAPABILITIES = {
544
+ reasoning: {
545
+ supported: false,
546
+ supportedEfforts: [],
547
+ restrictsSamplingParams: false
548
+ }
549
+ };
550
+ function getMistralModelCapabilities(_modelId) {
551
+ return NO_REASONING_CAPABILITIES;
552
+ }
553
+
542
554
  // src/chat-model.ts
543
555
  function createMistralChatModel(client, modelId) {
544
556
  const provider = "mistral";
@@ -572,6 +584,7 @@ function createMistralChatModel(client, modelId) {
572
584
  return {
573
585
  provider,
574
586
  modelId,
587
+ capabilities: getMistralModelCapabilities(modelId),
575
588
  generate: generateChat,
576
589
  stream: streamChat,
577
590
  async generateObject(options) {
@@ -806,6 +819,7 @@ function createMistral(options = {}) {
806
819
  }
807
820
  export {
808
821
  createMistral,
822
+ getMistralModelCapabilities,
809
823
  mistralEmbedProviderOptionsSchema,
810
824
  mistralGenerateProviderOptionsSchema,
811
825
  mistralProviderOptionsSchema
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@core-ai/mistral",
3
- "version": "0.12.0",
3
+ "version": "0.13.1",
4
4
  "description": "Mistral provider package for @core-ai/core-ai",
5
5
  "license": "MIT",
6
6
  "author": "Omnifact (https://omnifact.ai)",
@@ -43,7 +43,7 @@
43
43
  "test:watch": "vitest"
44
44
  },
45
45
  "dependencies": {
46
- "@core-ai/core-ai": "^0.12.0",
46
+ "@core-ai/core-ai": "^0.13.1",
47
47
  "@mistralai/mistralai": "^1.14.0"
48
48
  },
49
49
  "peerDependencies": {