@mistralai/mistralai 1.7.1 → 1.7.3

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.
Files changed (114) hide show
  1. package/docs/sdks/conversations/README.md +1 -1
  2. package/docs/sdks/models/README.md +1 -1
  3. package/examples/src/async_ocr_process_from_file.ts +2 -4
  4. package/funcs/modelsRetrieve.d.ts +1 -1
  5. package/funcs/modelsRetrieve.js +1 -1
  6. package/jsr.json +1 -1
  7. package/lib/config.d.ts +2 -2
  8. package/lib/config.js +2 -2
  9. package/models/components/agentscompletionrequest.d.ts +6 -0
  10. package/models/components/agentscompletionrequest.d.ts.map +1 -1
  11. package/models/components/agentscompletionrequest.js +5 -0
  12. package/models/components/agentscompletionrequest.js.map +1 -1
  13. package/models/components/agentscompletionstreamrequest.d.ts +6 -0
  14. package/models/components/agentscompletionstreamrequest.d.ts.map +1 -1
  15. package/models/components/agentscompletionstreamrequest.js +5 -0
  16. package/models/components/agentscompletionstreamrequest.js.map +1 -1
  17. package/models/components/basemodelcard.d.ts +2 -23
  18. package/models/components/basemodelcard.d.ts.map +1 -1
  19. package/models/components/basemodelcard.js +5 -19
  20. package/models/components/basemodelcard.js.map +1 -1
  21. package/models/components/chatcompletionrequest.d.ts +6 -0
  22. package/models/components/chatcompletionrequest.d.ts.map +1 -1
  23. package/models/components/chatcompletionrequest.js +5 -0
  24. package/models/components/chatcompletionrequest.js.map +1 -1
  25. package/models/components/chatcompletionstreamrequest.d.ts +6 -0
  26. package/models/components/chatcompletionstreamrequest.d.ts.map +1 -1
  27. package/models/components/chatcompletionstreamrequest.js +5 -0
  28. package/models/components/chatcompletionstreamrequest.js.map +1 -1
  29. package/models/components/contentchunk.d.ts +5 -0
  30. package/models/components/contentchunk.d.ts.map +1 -1
  31. package/models/components/contentchunk.js +3 -0
  32. package/models/components/contentchunk.js.map +1 -1
  33. package/models/components/conversationrestartrequest.d.ts +2 -2
  34. package/models/components/conversationrestartrequest.d.ts.map +1 -1
  35. package/models/components/conversationrestartrequest.js +4 -4
  36. package/models/components/conversationrestartrequest.js.map +1 -1
  37. package/models/components/conversationrestartstreamrequest.d.ts +2 -2
  38. package/models/components/conversationrestartstreamrequest.d.ts.map +1 -1
  39. package/models/components/conversationrestartstreamrequest.js +4 -4
  40. package/models/components/conversationrestartstreamrequest.js.map +1 -1
  41. package/models/components/filechunk.d.ts +31 -0
  42. package/models/components/filechunk.d.ts.map +1 -0
  43. package/models/components/filechunk.js +70 -0
  44. package/models/components/filechunk.js.map +1 -0
  45. package/models/components/ftmodelcard.d.ts +2 -23
  46. package/models/components/ftmodelcard.d.ts.map +1 -1
  47. package/models/components/ftmodelcard.js +5 -19
  48. package/models/components/ftmodelcard.js.map +1 -1
  49. package/models/components/index.d.ts +2 -0
  50. package/models/components/index.d.ts.map +1 -1
  51. package/models/components/index.js +2 -0
  52. package/models/components/index.js.map +1 -1
  53. package/models/components/inputentries.d.ts +6 -2
  54. package/models/components/inputentries.d.ts.map +1 -1
  55. package/models/components/inputentries.js +12 -0
  56. package/models/components/inputentries.js.map +1 -1
  57. package/models/components/messageinputentry.d.ts +8 -8
  58. package/models/components/messageinputentry.d.ts.map +1 -1
  59. package/models/components/messageinputentry.js +13 -13
  60. package/models/components/messageinputentry.js.map +1 -1
  61. package/models/components/mistralpromptmode.d.ts +21 -0
  62. package/models/components/mistralpromptmode.d.ts.map +1 -0
  63. package/models/components/mistralpromptmode.js +57 -0
  64. package/models/components/mistralpromptmode.js.map +1 -0
  65. package/models/components/modelcapabilities.d.ts +2 -0
  66. package/models/components/modelcapabilities.d.ts.map +1 -1
  67. package/models/components/modelcapabilities.js +2 -0
  68. package/models/components/modelcapabilities.js.map +1 -1
  69. package/models/components/ocrrequest.d.ts +5 -4
  70. package/models/components/ocrrequest.d.ts.map +1 -1
  71. package/models/components/ocrrequest.js +13 -2
  72. package/models/components/ocrrequest.js.map +1 -1
  73. package/models/operations/agentsapiv1conversationsget.d.ts +3 -0
  74. package/models/operations/agentsapiv1conversationsget.d.ts.map +1 -1
  75. package/models/operations/agentsapiv1conversationsget.js.map +1 -1
  76. package/models/operations/agentsapiv1conversationshistory.d.ts +3 -0
  77. package/models/operations/agentsapiv1conversationshistory.d.ts.map +1 -1
  78. package/models/operations/agentsapiv1conversationshistory.js.map +1 -1
  79. package/models/operations/agentsapiv1conversationsmessages.d.ts +3 -0
  80. package/models/operations/agentsapiv1conversationsmessages.d.ts.map +1 -1
  81. package/models/operations/agentsapiv1conversationsmessages.js.map +1 -1
  82. package/models/operations/agentsapiv1conversationsrestart.d.ts +3 -0
  83. package/models/operations/agentsapiv1conversationsrestart.d.ts.map +1 -1
  84. package/models/operations/agentsapiv1conversationsrestart.js.map +1 -1
  85. package/models/operations/agentsapiv1conversationsrestartstream.d.ts +3 -0
  86. package/models/operations/agentsapiv1conversationsrestartstream.d.ts.map +1 -1
  87. package/models/operations/agentsapiv1conversationsrestartstream.js.map +1 -1
  88. package/package.json +1 -1
  89. package/sdk/models.d.ts +1 -1
  90. package/sdk/models.js +1 -1
  91. package/src/funcs/modelsRetrieve.ts +1 -1
  92. package/src/lib/config.ts +2 -2
  93. package/src/models/components/agentscompletionrequest.ts +14 -0
  94. package/src/models/components/agentscompletionstreamrequest.ts +14 -0
  95. package/src/models/components/basemodelcard.ts +7 -27
  96. package/src/models/components/chatcompletionrequest.ts +14 -0
  97. package/src/models/components/chatcompletionstreamrequest.ts +14 -0
  98. package/src/models/components/contentchunk.ts +14 -0
  99. package/src/models/components/conversationrestartrequest.ts +6 -6
  100. package/src/models/components/conversationrestartstreamrequest.ts +6 -6
  101. package/src/models/components/filechunk.ts +75 -0
  102. package/src/models/components/ftmodelcard.ts +7 -28
  103. package/src/models/components/index.ts +2 -0
  104. package/src/models/components/inputentries.ts +44 -2
  105. package/src/models/components/messageinputentry.ts +15 -16
  106. package/src/models/components/mistralpromptmode.ts +47 -0
  107. package/src/models/components/modelcapabilities.ts +4 -0
  108. package/src/models/components/ocrrequest.ts +25 -5
  109. package/src/models/operations/agentsapiv1conversationsget.ts +3 -0
  110. package/src/models/operations/agentsapiv1conversationshistory.ts +3 -0
  111. package/src/models/operations/agentsapiv1conversationsmessages.ts +3 -0
  112. package/src/models/operations/agentsapiv1conversationsrestart.ts +3 -0
  113. package/src/models/operations/agentsapiv1conversationsrestartstream.ts +3 -0
  114. package/src/sdk/models.ts +1 -1
@@ -12,6 +12,12 @@ import {
12
12
  DocumentURLChunk$Outbound,
13
13
  DocumentURLChunk$outboundSchema,
14
14
  } from "./documenturlchunk.js";
15
+ import {
16
+ FileChunk,
17
+ FileChunk$inboundSchema,
18
+ FileChunk$Outbound,
19
+ FileChunk$outboundSchema,
20
+ } from "./filechunk.js";
15
21
  import {
16
22
  ImageURLChunk,
17
23
  ImageURLChunk$inboundSchema,
@@ -35,6 +41,7 @@ export type ContentChunk =
35
41
  | (ImageURLChunk & { type: "image_url" })
36
42
  | (TextChunk & { type: "text" })
37
43
  | (ReferenceChunk & { type: "reference" })
44
+ | (FileChunk & { type: "file" })
38
45
  | (DocumentURLChunk & { type: "document_url" });
39
46
 
40
47
  /** @internal */
@@ -56,6 +63,9 @@ export const ContentChunk$inboundSchema: z.ZodType<
56
63
  type: v.type,
57
64
  })),
58
65
  ),
66
+ FileChunk$inboundSchema.and(
67
+ z.object({ type: z.literal("file") }).transform((v) => ({ type: v.type })),
68
+ ),
59
69
  DocumentURLChunk$inboundSchema.and(
60
70
  z.object({ type: z.literal("document_url") }).transform((v) => ({
61
71
  type: v.type,
@@ -68,6 +78,7 @@ export type ContentChunk$Outbound =
68
78
  | (ImageURLChunk$Outbound & { type: "image_url" })
69
79
  | (TextChunk$Outbound & { type: "text" })
70
80
  | (ReferenceChunk$Outbound & { type: "reference" })
81
+ | (FileChunk$Outbound & { type: "file" })
71
82
  | (DocumentURLChunk$Outbound & { type: "document_url" });
72
83
 
73
84
  /** @internal */
@@ -89,6 +100,9 @@ export const ContentChunk$outboundSchema: z.ZodType<
89
100
  type: v.type,
90
101
  })),
91
102
  ),
103
+ FileChunk$outboundSchema.and(
104
+ z.object({ type: z.literal("file") }).transform((v) => ({ type: v.type })),
105
+ ),
92
106
  DocumentURLChunk$outboundSchema.and(
93
107
  z.object({ type: z.literal("document_url") }).transform((v) => ({
94
108
  type: v.type,
@@ -40,11 +40,11 @@ export type ConversationRestartRequest = {
40
40
  */
41
41
  store?: boolean | undefined;
42
42
  handoffExecution?: ConversationRestartRequestHandoffExecution | undefined;
43
- fromEntryId: string;
44
43
  /**
45
44
  * White-listed arguments from the completion API
46
45
  */
47
46
  completionArgs?: CompletionArgs | undefined;
47
+ fromEntryId: string;
48
48
  };
49
49
 
50
50
  /** @internal */
@@ -81,13 +81,13 @@ export const ConversationRestartRequest$inboundSchema: z.ZodType<
81
81
  store: z.boolean().default(true),
82
82
  handoff_execution: ConversationRestartRequestHandoffExecution$inboundSchema
83
83
  .default("server"),
84
- from_entry_id: z.string(),
85
84
  completion_args: CompletionArgs$inboundSchema.optional(),
85
+ from_entry_id: z.string(),
86
86
  }).transform((v) => {
87
87
  return remap$(v, {
88
88
  "handoff_execution": "handoffExecution",
89
- "from_entry_id": "fromEntryId",
90
89
  "completion_args": "completionArgs",
90
+ "from_entry_id": "fromEntryId",
91
91
  });
92
92
  });
93
93
 
@@ -97,8 +97,8 @@ export type ConversationRestartRequest$Outbound = {
97
97
  stream: boolean;
98
98
  store: boolean;
99
99
  handoff_execution: string;
100
- from_entry_id: string;
101
100
  completion_args?: CompletionArgs$Outbound | undefined;
101
+ from_entry_id: string;
102
102
  };
103
103
 
104
104
  /** @internal */
@@ -112,13 +112,13 @@ export const ConversationRestartRequest$outboundSchema: z.ZodType<
112
112
  store: z.boolean().default(true),
113
113
  handoffExecution: ConversationRestartRequestHandoffExecution$outboundSchema
114
114
  .default("server"),
115
- fromEntryId: z.string(),
116
115
  completionArgs: CompletionArgs$outboundSchema.optional(),
116
+ fromEntryId: z.string(),
117
117
  }).transform((v) => {
118
118
  return remap$(v, {
119
119
  handoffExecution: "handoff_execution",
120
- fromEntryId: "from_entry_id",
121
120
  completionArgs: "completion_args",
121
+ fromEntryId: "from_entry_id",
122
122
  });
123
123
  });
124
124
 
@@ -42,11 +42,11 @@ export type ConversationRestartStreamRequest = {
42
42
  handoffExecution?:
43
43
  | ConversationRestartStreamRequestHandoffExecution
44
44
  | undefined;
45
- fromEntryId: string;
46
45
  /**
47
46
  * White-listed arguments from the completion API
48
47
  */
49
48
  completionArgs?: CompletionArgs | undefined;
49
+ fromEntryId: string;
50
50
  };
51
51
 
52
52
  /** @internal */
@@ -85,13 +85,13 @@ export const ConversationRestartStreamRequest$inboundSchema: z.ZodType<
85
85
  ConversationRestartStreamRequestHandoffExecution$inboundSchema.default(
86
86
  "server",
87
87
  ),
88
- from_entry_id: z.string(),
89
88
  completion_args: CompletionArgs$inboundSchema.optional(),
89
+ from_entry_id: z.string(),
90
90
  }).transform((v) => {
91
91
  return remap$(v, {
92
92
  "handoff_execution": "handoffExecution",
93
- "from_entry_id": "fromEntryId",
94
93
  "completion_args": "completionArgs",
94
+ "from_entry_id": "fromEntryId",
95
95
  });
96
96
  });
97
97
 
@@ -101,8 +101,8 @@ export type ConversationRestartStreamRequest$Outbound = {
101
101
  stream: boolean;
102
102
  store: boolean;
103
103
  handoff_execution: string;
104
- from_entry_id: string;
105
104
  completion_args?: CompletionArgs$Outbound | undefined;
105
+ from_entry_id: string;
106
106
  };
107
107
 
108
108
  /** @internal */
@@ -118,13 +118,13 @@ export const ConversationRestartStreamRequest$outboundSchema: z.ZodType<
118
118
  ConversationRestartStreamRequestHandoffExecution$outboundSchema.default(
119
119
  "server",
120
120
  ),
121
- fromEntryId: z.string(),
122
121
  completionArgs: CompletionArgs$outboundSchema.optional(),
122
+ fromEntryId: z.string(),
123
123
  }).transform((v) => {
124
124
  return remap$(v, {
125
125
  handoffExecution: "handoff_execution",
126
- fromEntryId: "from_entry_id",
127
126
  completionArgs: "completion_args",
127
+ fromEntryId: "from_entry_id",
128
128
  });
129
129
  });
130
130
 
@@ -0,0 +1,75 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type FileChunk = {
12
+ type?: "file" | undefined;
13
+ fileId: string;
14
+ };
15
+
16
+ /** @internal */
17
+ export const FileChunk$inboundSchema: z.ZodType<
18
+ FileChunk,
19
+ z.ZodTypeDef,
20
+ unknown
21
+ > = z.object({
22
+ type: z.literal("file").default("file"),
23
+ file_id: z.string(),
24
+ }).transform((v) => {
25
+ return remap$(v, {
26
+ "file_id": "fileId",
27
+ });
28
+ });
29
+
30
+ /** @internal */
31
+ export type FileChunk$Outbound = {
32
+ type: "file";
33
+ file_id: string;
34
+ };
35
+
36
+ /** @internal */
37
+ export const FileChunk$outboundSchema: z.ZodType<
38
+ FileChunk$Outbound,
39
+ z.ZodTypeDef,
40
+ FileChunk
41
+ > = z.object({
42
+ type: z.literal("file").default("file" as const),
43
+ fileId: z.string(),
44
+ }).transform((v) => {
45
+ return remap$(v, {
46
+ fileId: "file_id",
47
+ });
48
+ });
49
+
50
+ /**
51
+ * @internal
52
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
53
+ */
54
+ export namespace FileChunk$ {
55
+ /** @deprecated use `FileChunk$inboundSchema` instead. */
56
+ export const inboundSchema = FileChunk$inboundSchema;
57
+ /** @deprecated use `FileChunk$outboundSchema` instead. */
58
+ export const outboundSchema = FileChunk$outboundSchema;
59
+ /** @deprecated use `FileChunk$Outbound` instead. */
60
+ export type Outbound = FileChunk$Outbound;
61
+ }
62
+
63
+ export function fileChunkToJSON(fileChunk: FileChunk): string {
64
+ return JSON.stringify(FileChunk$outboundSchema.parse(fileChunk));
65
+ }
66
+
67
+ export function fileChunkFromJSON(
68
+ jsonString: string,
69
+ ): SafeParseResult<FileChunk, SDKValidationError> {
70
+ return safeParse(
71
+ jsonString,
72
+ (x) => FileChunk$inboundSchema.parse(JSON.parse(x)),
73
+ `Failed to parse 'FileChunk' from JSON`,
74
+ );
75
+ }
@@ -5,7 +5,6 @@
5
5
  import * as z from "zod";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
- import { ClosedEnum } from "../../types/enums.js";
9
8
  import { Result as SafeParseResult } from "../../types/fp.js";
10
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
10
  import {
@@ -15,11 +14,6 @@ import {
15
14
  ModelCapabilities$outboundSchema,
16
15
  } from "./modelcapabilities.js";
17
16
 
18
- export const FTModelCardType = {
19
- FineTuned: "fine-tuned",
20
- } as const;
21
- export type FTModelCardType = ClosedEnum<typeof FTModelCardType>;
22
-
23
17
  /**
24
18
  * Extra fields for fine-tuned models.
25
19
  */
@@ -34,6 +28,7 @@ export type FTModelCard = {
34
28
  maxContextLength?: number | undefined;
35
29
  aliases?: Array<string> | undefined;
36
30
  deprecation?: Date | null | undefined;
31
+ deprecationReplacementModel?: string | null | undefined;
37
32
  defaultModelTemperature?: number | null | undefined;
38
33
  type?: "fine-tuned" | undefined;
39
34
  job: string;
@@ -41,27 +36,6 @@ export type FTModelCard = {
41
36
  archived?: boolean | undefined;
42
37
  };
43
38
 
44
- /** @internal */
45
- export const FTModelCardType$inboundSchema: z.ZodNativeEnum<
46
- typeof FTModelCardType
47
- > = z.nativeEnum(FTModelCardType);
48
-
49
- /** @internal */
50
- export const FTModelCardType$outboundSchema: z.ZodNativeEnum<
51
- typeof FTModelCardType
52
- > = FTModelCardType$inboundSchema;
53
-
54
- /**
55
- * @internal
56
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
57
- */
58
- export namespace FTModelCardType$ {
59
- /** @deprecated use `FTModelCardType$inboundSchema` instead. */
60
- export const inboundSchema = FTModelCardType$inboundSchema;
61
- /** @deprecated use `FTModelCardType$outboundSchema` instead. */
62
- export const outboundSchema = FTModelCardType$outboundSchema;
63
- }
64
-
65
39
  /** @internal */
66
40
  export const FTModelCard$inboundSchema: z.ZodType<
67
41
  FTModelCard,
@@ -80,6 +54,7 @@ export const FTModelCard$inboundSchema: z.ZodType<
80
54
  deprecation: z.nullable(
81
55
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
82
56
  ).optional(),
57
+ deprecation_replacement_model: z.nullable(z.string()).optional(),
83
58
  default_model_temperature: z.nullable(z.number()).optional(),
84
59
  type: z.literal("fine-tuned").default("fine-tuned"),
85
60
  job: z.string(),
@@ -89,6 +64,7 @@ export const FTModelCard$inboundSchema: z.ZodType<
89
64
  return remap$(v, {
90
65
  "owned_by": "ownedBy",
91
66
  "max_context_length": "maxContextLength",
67
+ "deprecation_replacement_model": "deprecationReplacementModel",
92
68
  "default_model_temperature": "defaultModelTemperature",
93
69
  });
94
70
  });
@@ -105,6 +81,7 @@ export type FTModelCard$Outbound = {
105
81
  max_context_length: number;
106
82
  aliases?: Array<string> | undefined;
107
83
  deprecation?: string | null | undefined;
84
+ deprecation_replacement_model?: string | null | undefined;
108
85
  default_model_temperature?: number | null | undefined;
109
86
  type: "fine-tuned";
110
87
  job: string;
@@ -128,8 +105,9 @@ export const FTModelCard$outboundSchema: z.ZodType<
128
105
  maxContextLength: z.number().int().default(32768),
129
106
  aliases: z.array(z.string()).optional(),
130
107
  deprecation: z.nullable(z.date().transform(v => v.toISOString())).optional(),
108
+ deprecationReplacementModel: z.nullable(z.string()).optional(),
131
109
  defaultModelTemperature: z.nullable(z.number()).optional(),
132
- type: z.literal("fine-tuned").default("fine-tuned"),
110
+ type: z.literal("fine-tuned").default("fine-tuned" as const),
133
111
  job: z.string(),
134
112
  root: z.string(),
135
113
  archived: z.boolean().default(false),
@@ -137,6 +115,7 @@ export const FTModelCard$outboundSchema: z.ZodType<
137
115
  return remap$(v, {
138
116
  ownedBy: "owned_by",
139
117
  maxContextLength: "max_context_length",
118
+ deprecationReplacementModel: "deprecation_replacement_model",
140
119
  defaultModelTemperature: "default_model_temperature",
141
120
  });
142
121
  });
@@ -72,6 +72,7 @@ export * from "./embeddingrequest.js";
72
72
  export * from "./embeddingresponse.js";
73
73
  export * from "./embeddingresponsedata.js";
74
74
  export * from "./eventout.js";
75
+ export * from "./filechunk.js";
75
76
  export * from "./filepurpose.js";
76
77
  export * from "./fileschema.js";
77
78
  export * from "./filesignedurl.js";
@@ -111,6 +112,7 @@ export * from "./messageoutputcontentchunks.js";
111
112
  export * from "./messageoutputentry.js";
112
113
  export * from "./messageoutputevent.js";
113
114
  export * from "./metricout.js";
115
+ export * from "./mistralpromptmode.js";
114
116
  export * from "./modelcapabilities.js";
115
117
  export * from "./modelconversation.js";
116
118
  export * from "./modellist.js";
@@ -6,6 +6,18 @@ import * as z from "zod";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
7
  import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ AgentHandoffEntry,
11
+ AgentHandoffEntry$inboundSchema,
12
+ AgentHandoffEntry$Outbound,
13
+ AgentHandoffEntry$outboundSchema,
14
+ } from "./agenthandoffentry.js";
15
+ import {
16
+ FunctionCallEntry,
17
+ FunctionCallEntry$inboundSchema,
18
+ FunctionCallEntry$Outbound,
19
+ FunctionCallEntry$outboundSchema,
20
+ } from "./functioncallentry.js";
9
21
  import {
10
22
  FunctionResultEntry,
11
23
  FunctionResultEntry$inboundSchema,
@@ -18,8 +30,26 @@ import {
18
30
  MessageInputEntry$Outbound,
19
31
  MessageInputEntry$outboundSchema,
20
32
  } from "./messageinputentry.js";
33
+ import {
34
+ MessageOutputEntry,
35
+ MessageOutputEntry$inboundSchema,
36
+ MessageOutputEntry$Outbound,
37
+ MessageOutputEntry$outboundSchema,
38
+ } from "./messageoutputentry.js";
39
+ import {
40
+ ToolExecutionEntry,
41
+ ToolExecutionEntry$inboundSchema,
42
+ ToolExecutionEntry$Outbound,
43
+ ToolExecutionEntry$outboundSchema,
44
+ } from "./toolexecutionentry.js";
21
45
 
22
- export type InputEntries = MessageInputEntry | FunctionResultEntry;
46
+ export type InputEntries =
47
+ | MessageInputEntry
48
+ | FunctionResultEntry
49
+ | ToolExecutionEntry
50
+ | FunctionCallEntry
51
+ | MessageOutputEntry
52
+ | AgentHandoffEntry;
23
53
 
24
54
  /** @internal */
25
55
  export const InputEntries$inboundSchema: z.ZodType<
@@ -29,12 +59,20 @@ export const InputEntries$inboundSchema: z.ZodType<
29
59
  > = z.union([
30
60
  MessageInputEntry$inboundSchema,
31
61
  FunctionResultEntry$inboundSchema,
62
+ ToolExecutionEntry$inboundSchema,
63
+ FunctionCallEntry$inboundSchema,
64
+ MessageOutputEntry$inboundSchema,
65
+ AgentHandoffEntry$inboundSchema,
32
66
  ]);
33
67
 
34
68
  /** @internal */
35
69
  export type InputEntries$Outbound =
36
70
  | MessageInputEntry$Outbound
37
- | FunctionResultEntry$Outbound;
71
+ | FunctionResultEntry$Outbound
72
+ | ToolExecutionEntry$Outbound
73
+ | FunctionCallEntry$Outbound
74
+ | MessageOutputEntry$Outbound
75
+ | AgentHandoffEntry$Outbound;
38
76
 
39
77
  /** @internal */
40
78
  export const InputEntries$outboundSchema: z.ZodType<
@@ -44,6 +82,10 @@ export const InputEntries$outboundSchema: z.ZodType<
44
82
  > = z.union([
45
83
  MessageInputEntry$outboundSchema,
46
84
  FunctionResultEntry$outboundSchema,
85
+ ToolExecutionEntry$outboundSchema,
86
+ FunctionCallEntry$outboundSchema,
87
+ MessageOutputEntry$outboundSchema,
88
+ AgentHandoffEntry$outboundSchema,
47
89
  ]);
48
90
 
49
91
  /**
@@ -20,10 +20,10 @@ export const ObjectT = {
20
20
  } as const;
21
21
  export type ObjectT = ClosedEnum<typeof ObjectT>;
22
22
 
23
- export const MessageInputEntryType = {
23
+ export const Type = {
24
24
  MessageInput: "message.input",
25
25
  } as const;
26
- export type MessageInputEntryType = ClosedEnum<typeof MessageInputEntryType>;
26
+ export type Type = ClosedEnum<typeof Type>;
27
27
 
28
28
  export const MessageInputEntryRole = {
29
29
  Assistant: "assistant",
@@ -40,7 +40,7 @@ export type MessageInputEntryContent =
40
40
  */
41
41
  export type MessageInputEntry = {
42
42
  object?: ObjectT | undefined;
43
- type?: MessageInputEntryType | undefined;
43
+ type?: Type | undefined;
44
44
  createdAt?: Date | undefined;
45
45
  completedAt?: Date | null | undefined;
46
46
  id?: string | undefined;
@@ -68,24 +68,23 @@ export namespace ObjectT$ {
68
68
  }
69
69
 
70
70
  /** @internal */
71
- export const MessageInputEntryType$inboundSchema: z.ZodNativeEnum<
72
- typeof MessageInputEntryType
73
- > = z.nativeEnum(MessageInputEntryType);
71
+ export const Type$inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(
72
+ Type,
73
+ );
74
74
 
75
75
  /** @internal */
76
- export const MessageInputEntryType$outboundSchema: z.ZodNativeEnum<
77
- typeof MessageInputEntryType
78
- > = MessageInputEntryType$inboundSchema;
76
+ export const Type$outboundSchema: z.ZodNativeEnum<typeof Type> =
77
+ Type$inboundSchema;
79
78
 
80
79
  /**
81
80
  * @internal
82
81
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
83
82
  */
84
- export namespace MessageInputEntryType$ {
85
- /** @deprecated use `MessageInputEntryType$inboundSchema` instead. */
86
- export const inboundSchema = MessageInputEntryType$inboundSchema;
87
- /** @deprecated use `MessageInputEntryType$outboundSchema` instead. */
88
- export const outboundSchema = MessageInputEntryType$outboundSchema;
83
+ export namespace Type$ {
84
+ /** @deprecated use `Type$inboundSchema` instead. */
85
+ export const inboundSchema = Type$inboundSchema;
86
+ /** @deprecated use `Type$outboundSchema` instead. */
87
+ export const outboundSchema = Type$outboundSchema;
89
88
  }
90
89
 
91
90
  /** @internal */
@@ -166,7 +165,7 @@ export const MessageInputEntry$inboundSchema: z.ZodType<
166
165
  unknown
167
166
  > = z.object({
168
167
  object: ObjectT$inboundSchema.default("entry"),
169
- type: MessageInputEntryType$inboundSchema.default("message.input"),
168
+ type: Type$inboundSchema.default("message.input"),
170
169
  created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
171
170
  .optional(),
172
171
  completed_at: z.nullable(
@@ -203,7 +202,7 @@ export const MessageInputEntry$outboundSchema: z.ZodType<
203
202
  MessageInputEntry
204
203
  > = z.object({
205
204
  object: ObjectT$outboundSchema.default("entry"),
206
- type: MessageInputEntryType$outboundSchema.default("message.input"),
205
+ type: Type$outboundSchema.default("message.input"),
207
206
  createdAt: z.date().transform(v => v.toISOString()).optional(),
208
207
  completedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
209
208
  id: z.string().optional(),
@@ -0,0 +1,47 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import {
7
+ catchUnrecognizedEnum,
8
+ OpenEnum,
9
+ Unrecognized,
10
+ } from "../../types/enums.js";
11
+
12
+ export const MistralPromptMode = {
13
+ Reasoning: "reasoning",
14
+ } as const;
15
+ export type MistralPromptMode = OpenEnum<typeof MistralPromptMode>;
16
+
17
+ /** @internal */
18
+ export const MistralPromptMode$inboundSchema: z.ZodType<
19
+ MistralPromptMode,
20
+ z.ZodTypeDef,
21
+ unknown
22
+ > = z
23
+ .union([
24
+ z.nativeEnum(MistralPromptMode),
25
+ z.string().transform(catchUnrecognizedEnum),
26
+ ]);
27
+
28
+ /** @internal */
29
+ export const MistralPromptMode$outboundSchema: z.ZodType<
30
+ MistralPromptMode,
31
+ z.ZodTypeDef,
32
+ MistralPromptMode
33
+ > = z.union([
34
+ z.nativeEnum(MistralPromptMode),
35
+ z.string().and(z.custom<Unrecognized<string>>()),
36
+ ]);
37
+
38
+ /**
39
+ * @internal
40
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
41
+ */
42
+ export namespace MistralPromptMode$ {
43
+ /** @deprecated use `MistralPromptMode$inboundSchema` instead. */
44
+ export const inboundSchema = MistralPromptMode$inboundSchema;
45
+ /** @deprecated use `MistralPromptMode$outboundSchema` instead. */
46
+ export const outboundSchema = MistralPromptMode$outboundSchema;
47
+ }
@@ -14,6 +14,7 @@ export type ModelCapabilities = {
14
14
  functionCalling?: boolean | undefined;
15
15
  fineTuning?: boolean | undefined;
16
16
  vision?: boolean | undefined;
17
+ classification?: boolean | undefined;
17
18
  };
18
19
 
19
20
  /** @internal */
@@ -27,6 +28,7 @@ export const ModelCapabilities$inboundSchema: z.ZodType<
27
28
  function_calling: z.boolean().default(true),
28
29
  fine_tuning: z.boolean().default(false),
29
30
  vision: z.boolean().default(false),
31
+ classification: z.boolean().default(false),
30
32
  }).transform((v) => {
31
33
  return remap$(v, {
32
34
  "completion_chat": "completionChat",
@@ -43,6 +45,7 @@ export type ModelCapabilities$Outbound = {
43
45
  function_calling: boolean;
44
46
  fine_tuning: boolean;
45
47
  vision: boolean;
48
+ classification: boolean;
46
49
  };
47
50
 
48
51
  /** @internal */
@@ -56,6 +59,7 @@ export const ModelCapabilities$outboundSchema: z.ZodType<
56
59
  functionCalling: z.boolean().default(true),
57
60
  fineTuning: z.boolean().default(false),
58
61
  vision: z.boolean().default(false),
62
+ classification: z.boolean().default(false),
59
63
  }).transform((v) => {
60
64
  return remap$(v, {
61
65
  completionChat: "completion_chat",
@@ -13,6 +13,12 @@ import {
13
13
  DocumentURLChunk$Outbound,
14
14
  DocumentURLChunk$outboundSchema,
15
15
  } from "./documenturlchunk.js";
16
+ import {
17
+ FileChunk,
18
+ FileChunk$inboundSchema,
19
+ FileChunk$Outbound,
20
+ FileChunk$outboundSchema,
21
+ } from "./filechunk.js";
16
22
  import {
17
23
  ImageURLChunk,
18
24
  ImageURLChunk$inboundSchema,
@@ -29,7 +35,7 @@ import {
29
35
  /**
30
36
  * Document to run OCR on
31
37
  */
32
- export type Document = ImageURLChunk | DocumentURLChunk;
38
+ export type Document = FileChunk | ImageURLChunk | DocumentURLChunk;
33
39
 
34
40
  export type OCRRequest = {
35
41
  model: string | null;
@@ -37,7 +43,7 @@ export type OCRRequest = {
37
43
  /**
38
44
  * Document to run OCR on
39
45
  */
40
- document: ImageURLChunk | DocumentURLChunk;
46
+ document: FileChunk | ImageURLChunk | DocumentURLChunk;
41
47
  /**
42
48
  * Specific pages user wants to process in various formats: single number, range, or list of both. Starts from 0
43
49
  */
@@ -69,10 +75,15 @@ export const Document$inboundSchema: z.ZodType<
69
75
  Document,
70
76
  z.ZodTypeDef,
71
77
  unknown
72
- > = z.union([ImageURLChunk$inboundSchema, DocumentURLChunk$inboundSchema]);
78
+ > = z.union([
79
+ FileChunk$inboundSchema,
80
+ ImageURLChunk$inboundSchema,
81
+ DocumentURLChunk$inboundSchema,
82
+ ]);
73
83
 
74
84
  /** @internal */
75
85
  export type Document$Outbound =
86
+ | FileChunk$Outbound
76
87
  | ImageURLChunk$Outbound
77
88
  | DocumentURLChunk$Outbound;
78
89
 
@@ -81,7 +92,11 @@ export const Document$outboundSchema: z.ZodType<
81
92
  Document$Outbound,
82
93
  z.ZodTypeDef,
83
94
  Document
84
- > = z.union([ImageURLChunk$outboundSchema, DocumentURLChunk$outboundSchema]);
95
+ > = z.union([
96
+ FileChunk$outboundSchema,
97
+ ImageURLChunk$outboundSchema,
98
+ DocumentURLChunk$outboundSchema,
99
+ ]);
85
100
 
86
101
  /**
87
102
  * @internal
@@ -119,6 +134,7 @@ export const OCRRequest$inboundSchema: z.ZodType<
119
134
  model: z.nullable(z.string()),
120
135
  id: z.string().optional(),
121
136
  document: z.union([
137
+ FileChunk$inboundSchema,
122
138
  ImageURLChunk$inboundSchema,
123
139
  DocumentURLChunk$inboundSchema,
124
140
  ]),
@@ -143,7 +159,10 @@ export const OCRRequest$inboundSchema: z.ZodType<
143
159
  export type OCRRequest$Outbound = {
144
160
  model: string | null;
145
161
  id?: string | undefined;
146
- document: ImageURLChunk$Outbound | DocumentURLChunk$Outbound;
162
+ document:
163
+ | FileChunk$Outbound
164
+ | ImageURLChunk$Outbound
165
+ | DocumentURLChunk$Outbound;
147
166
  pages?: Array<number> | null | undefined;
148
167
  include_image_base64?: boolean | null | undefined;
149
168
  image_limit?: number | null | undefined;
@@ -161,6 +180,7 @@ export const OCRRequest$outboundSchema: z.ZodType<
161
180
  model: z.nullable(z.string()),
162
181
  id: z.string().optional(),
163
182
  document: z.union([
183
+ FileChunk$outboundSchema,
164
184
  ImageURLChunk$outboundSchema,
165
185
  DocumentURLChunk$outboundSchema,
166
186
  ]),
@@ -10,6 +10,9 @@ import * as components from "../components/index.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
12
  export type AgentsApiV1ConversationsGetRequest = {
13
+ /**
14
+ * ID of the conversation from which we are fetching metadata.
15
+ */
13
16
  conversationId: string;
14
17
  };
15
18
 
@@ -9,6 +9,9 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type AgentsApiV1ConversationsHistoryRequest = {
12
+ /**
13
+ * ID of the conversation from which we are fetching entries.
14
+ */
12
15
  conversationId: string;
13
16
  };
14
17