@ai-sdk/deepseek 2.0.76 → 2.0.78

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.js CHANGED
@@ -28,96 +28,129 @@ module.exports = __toCommonJS(index_exports);
28
28
 
29
29
  // src/deepseek-provider.ts
30
30
  var import_provider4 = require("@ai-sdk/provider");
31
- var import_provider_utils4 = require("@ai-sdk/provider-utils");
31
+ var import_provider_utils6 = require("@ai-sdk/provider-utils");
32
32
 
33
33
  // src/chat/deepseek-chat-language-model.ts
34
34
  var import_provider3 = require("@ai-sdk/provider");
35
- var import_provider_utils3 = require("@ai-sdk/provider-utils");
35
+ var import_provider_utils5 = require("@ai-sdk/provider-utils");
36
36
 
37
37
  // src/chat/convert-to-deepseek-chat-messages.ts
38
38
  var import_provider = require("@ai-sdk/provider");
39
- var import_provider_utils = require("@ai-sdk/provider-utils");
39
+ var import_provider_utils3 = require("@ai-sdk/provider-utils");
40
40
 
41
41
  // src/chat/deepseek-chat-options.ts
42
+ var import_provider_utils = require("@ai-sdk/provider-utils");
42
43
  var import_v4 = require("zod/v4");
43
- var deepseekLanguageModelOptions = import_v4.z.object({
44
- /**
45
- * Whether to return log probabilities for generated tokens.
46
- */
47
- logprobs: import_v4.z.boolean().optional(),
48
- /**
49
- * Number of most likely tokens to return at each token position.
50
- *
51
- * Setting this option automatically enables `logprobs`.
52
- */
53
- topLogprobs: import_v4.z.number().int().min(0).max(20).optional(),
54
- /**
55
- * An opaque identifier for the end user. DeepSeek uses this identifier for
56
- * content-safety tracing and request isolation.
57
- *
58
- * Must contain only ASCII letters, numbers, underscores, and hyphens, and
59
- * must be at most 512 characters long.
60
- */
61
- userId: import_v4.z.string().regex(/^[a-zA-Z0-9_-]+$/, "userId must match /^[a-zA-Z0-9_-]+$/").max(512, "userId must be at most 512 characters long").optional(),
62
- /**
63
- * Type of thinking to use. Defaults to `enabled`.
64
- */
65
- thinking: import_v4.z.object({
66
- // `adaptive` is accepted at runtime for backwards compatibility and
67
- // mapped to `enabled`, but is intentionally excluded from the exported
68
- // provider options type.
69
- type: import_v4.z.enum(["adaptive", "enabled", "disabled"]).optional()
70
- }).optional(),
71
- /**
72
- * Controls the thinking strength for DeepSeek V4 reasoning models.
73
- */
74
- // `medium` and `xhigh` are accepted at runtime for backwards compatibility
75
- // and mapped to canonical DeepSeek values, but are intentionally excluded
76
- // from the exported provider options type.
77
- reasoningEffort: import_v4.z.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
78
- /**
79
- * Whether to use strict JSON schema validation for structured outputs.
80
- * Only applies when the serving endpoint supports JSON schema response
81
- * formats (e.g. Azure). Defaults to `true`.
82
- */
83
- strictJsonSchema: import_v4.z.boolean().optional()
84
- });
85
- var deepseekMessageProviderOptions = import_v4.z.object({
86
- /**
87
- * The name of the participant represented by the message.
88
- *
89
- * Supported on system, user, and assistant messages.
90
- */
91
- name: import_v4.z.string().optional()
92
- });
93
- var deepseekAssistantMessageProviderOptions = deepseekMessageProviderOptions.extend({
94
- /**
95
- * Whether the assistant message content is a prefix that DeepSeek should
96
- * continue. This beta feature is only supported on the final assistant
97
- * message when using a beta base URL.
98
- */
99
- prefix: import_v4.z.literal(true).optional()
100
- });
44
+ function createDeepseekChatOptionsSchema() {
45
+ return import_v4.z.object({
46
+ /**
47
+ * Whether to return log probabilities for generated tokens.
48
+ */
49
+ logprobs: import_v4.z.boolean().optional(),
50
+ /**
51
+ * Number of most likely tokens to return at each token position.
52
+ *
53
+ * Setting this option automatically enables `logprobs`.
54
+ */
55
+ topLogprobs: import_v4.z.number().int().min(0).max(20).optional(),
56
+ /**
57
+ * An opaque identifier for the end user. DeepSeek uses this identifier for
58
+ * content-safety tracing and request isolation.
59
+ *
60
+ * Must contain only ASCII letters, numbers, underscores, and hyphens, and
61
+ * must be at most 512 characters long.
62
+ */
63
+ userId: import_v4.z.string().regex(/^[a-zA-Z0-9_-]+$/, "userId must match /^[a-zA-Z0-9_-]+$/").max(512, "userId must be at most 512 characters long").optional(),
64
+ /**
65
+ * Type of thinking to use. Defaults to `enabled`.
66
+ */
67
+ thinking: import_v4.z.object({
68
+ // `adaptive` is accepted at runtime for backwards compatibility and
69
+ // mapped to `enabled`, but is intentionally excluded from the exported
70
+ // provider options type.
71
+ type: import_v4.z.enum(["adaptive", "enabled", "disabled"]).optional()
72
+ }).optional(),
73
+ /**
74
+ * Controls the thinking strength for DeepSeek V4 reasoning models.
75
+ */
76
+ // `medium` and `xhigh` are accepted at runtime for backwards compatibility
77
+ // and mapped to canonical DeepSeek values, but are intentionally excluded
78
+ // from the exported provider options type.
79
+ reasoningEffort: import_v4.z.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
80
+ /**
81
+ * Whether to use strict JSON schema validation for structured outputs.
82
+ * Only applies when the serving endpoint supports JSON schema response
83
+ * formats (e.g. Azure). Defaults to `true`.
84
+ */
85
+ strictJsonSchema: import_v4.z.boolean().optional()
86
+ });
87
+ }
88
+ var chatOptionsSchema;
89
+ function getDeepseekChatOptionsSchema() {
90
+ return chatOptionsSchema != null ? chatOptionsSchema : chatOptionsSchema = createDeepseekChatOptionsSchema();
91
+ }
92
+ var deepseekLanguageModelOptions = (0, import_provider_utils.lazySchema)(
93
+ () => (0, import_provider_utils.zodSchema)(getDeepseekChatOptionsSchema())
94
+ );
95
+ function createDeepseekMessageOptionsSchema() {
96
+ return import_v4.z.object({
97
+ /**
98
+ * The name of the participant represented by the message.
99
+ *
100
+ * Supported on system, user, and assistant messages.
101
+ */
102
+ name: import_v4.z.string().optional()
103
+ });
104
+ }
105
+ var messageOptionsSchema;
106
+ function getDeepseekMessageOptionsSchema() {
107
+ return messageOptionsSchema != null ? messageOptionsSchema : messageOptionsSchema = createDeepseekMessageOptionsSchema();
108
+ }
109
+ var deepseekMessageProviderOptions = (0, import_provider_utils.lazySchema)(
110
+ () => (0, import_provider_utils.zodSchema)(getDeepseekMessageOptionsSchema())
111
+ );
112
+ function createDeepseekAssistantMessageOptionsSchema() {
113
+ return getDeepseekMessageOptionsSchema().extend({
114
+ /**
115
+ * Whether the assistant message content is a prefix that DeepSeek should
116
+ * continue. This beta feature is only supported on the final assistant
117
+ * message when using a beta base URL.
118
+ */
119
+ prefix: import_v4.z.literal(true).optional()
120
+ });
121
+ }
122
+ var assistantMessageOptionsSchema;
123
+ function getDeepseekAssistantMessageOptionsSchema() {
124
+ return assistantMessageOptionsSchema != null ? assistantMessageOptionsSchema : assistantMessageOptionsSchema = createDeepseekAssistantMessageOptionsSchema();
125
+ }
126
+ var deepseekAssistantMessageProviderOptions = (0, import_provider_utils.lazySchema)(
127
+ () => (0, import_provider_utils.zodSchema)(getDeepseekAssistantMessageOptionsSchema())
128
+ );
101
129
 
102
130
  // src/chat/deepseek-file-part-options.ts
131
+ var import_provider_utils2 = require("@ai-sdk/provider-utils");
103
132
  var import_v42 = require("zod/v4");
104
- var deepseekFilePartProviderOptions = import_v42.z.object({
105
- /**
106
- * Controls how DeepSeek processes an image sent as an `image_url` part.
107
- *
108
- * @see https://api-docs.deepseek.com/api/create-chat-completion/
109
- */
110
- imageDetail: import_v42.z.enum(["low", "high", "original", "auto"]).optional(),
111
- /**
112
- * Sends inline image data as a DeepSeek `file` part using `file_data`
113
- * instead of an `image_url` data URL. When set, the file part's filename
114
- * is preserved.
115
- *
116
- * This option only applies to inline image data. It cannot be combined
117
- * with `imageDetail`.
118
- */
119
- fileData: import_v42.z.literal(true).optional()
120
- });
133
+ var deepseekFilePartProviderOptions = (0, import_provider_utils2.lazySchema)(
134
+ () => (0, import_provider_utils2.zodSchema)(
135
+ import_v42.z.object({
136
+ /**
137
+ * Controls how DeepSeek processes an image sent as an `image_url` part.
138
+ *
139
+ * @see https://api-docs.deepseek.com/api/create-chat-completion/
140
+ */
141
+ imageDetail: import_v42.z.enum(["low", "high", "original", "auto"]).optional(),
142
+ /**
143
+ * Sends inline image data as a DeepSeek `file` part using `file_data`
144
+ * instead of an `image_url` data URL. When set, the file part's filename
145
+ * is preserved.
146
+ *
147
+ * This option only applies to inline image data. It cannot be combined
148
+ * with `imageDetail`.
149
+ */
150
+ fileData: import_v42.z.literal(true).optional()
151
+ })
152
+ )
153
+ );
121
154
 
122
155
  // src/chat/is-deepseek-v4-model.ts
123
156
  function isDeepSeekV4Model(modelId) {
@@ -174,7 +207,7 @@ async function convertToDeepSeekChatMessages({
174
207
  let index = -1;
175
208
  for (const { role, content, providerOptions } of prompt) {
176
209
  index++;
177
- const deepseekMessageOptions = await (0, import_provider_utils.parseProviderOptions)({
210
+ const deepseekMessageOptions = await (0, import_provider_utils3.parseProviderOptions)({
178
211
  provider: providerOptionsName,
179
212
  providerOptions,
180
213
  schema: deepseekAssistantMessageProviderOptions
@@ -226,7 +259,7 @@ async function convertToDeepSeekChatMessages({
226
259
  if (part.type === "text") {
227
260
  userContent.push({ type: "text", text: part.text });
228
261
  } else if (part.type === "file" && (part.mediaType === "image" || part.mediaType.startsWith("image/"))) {
229
- const filePartOptions = await (0, import_provider_utils.parseProviderOptions)({
262
+ const filePartOptions = await (0, import_provider_utils3.parseProviderOptions)({
230
263
  provider: providerOptionsName,
231
264
  providerOptions: part.providerOptions,
232
265
  schema: deepseekFilePartProviderOptions
@@ -262,7 +295,7 @@ async function convertToDeepSeekChatMessages({
262
295
  }
263
296
  });
264
297
  } else {
265
- const dataUrl = `data:${resolvedMediaType === "image/jpg" ? "image/jpeg" : resolvedMediaType};base64,${(0, import_provider_utils.convertToBase64)(part.data)}`;
298
+ const dataUrl = `data:${resolvedMediaType === "image/jpg" ? "image/jpeg" : resolvedMediaType};base64,${(0, import_provider_utils3.convertToBase64)(part.data)}`;
266
299
  if ((filePartOptions == null ? void 0 : filePartOptions.fileData) === true) {
267
300
  if (filePartOptions.imageDetail != null) {
268
301
  throw new import_provider.InvalidPromptError({
@@ -452,77 +485,102 @@ function convertDeepSeekUsage(usage) {
452
485
  }
453
486
 
454
487
  // src/chat/deepseek-chat-api-types.ts
455
- var import_provider_utils2 = require("@ai-sdk/provider-utils");
488
+ var import_provider_utils4 = require("@ai-sdk/provider-utils");
456
489
  var import_v43 = require("zod/v4");
457
- var tokenUsageSchema = import_v43.z.looseObject({
458
- prompt_tokens: import_v43.z.number().nullish(),
459
- completion_tokens: import_v43.z.number().nullish(),
460
- prompt_cache_hit_tokens: import_v43.z.number().nullish(),
461
- prompt_cache_miss_tokens: import_v43.z.number().nullish(),
462
- total_tokens: import_v43.z.number().nullish(),
463
- prompt_tokens_details: import_v43.z.looseObject({
464
- cached_tokens: import_v43.z.number().nullish()
465
- }).nullish(),
466
- completion_tokens_details: import_v43.z.looseObject({
467
- reasoning_tokens: import_v43.z.number().nullish()
468
- }).nullish()
469
- }).nullish();
470
- var deepSeekErrorSchema = import_v43.z.object({
471
- error: import_v43.z.object({
472
- message: import_v43.z.string(),
473
- type: import_v43.z.string().nullish(),
474
- param: import_v43.z.any().nullish(),
475
- code: import_v43.z.union([import_v43.z.string(), import_v43.z.number()]).nullish()
476
- })
477
- });
478
- var deepseekChatLogprobSchema = import_v43.z.object({
479
- token: import_v43.z.string(),
480
- logprob: import_v43.z.number(),
481
- bytes: import_v43.z.array(import_v43.z.number()).nullable(),
482
- top_logprobs: import_v43.z.array(
483
- import_v43.z.object({
484
- token: import_v43.z.string(),
485
- logprob: import_v43.z.number(),
486
- bytes: import_v43.z.array(import_v43.z.number()).nullable()
490
+ function createTokenUsageSchema() {
491
+ return import_v43.z.looseObject({
492
+ prompt_tokens: import_v43.z.number().nullish(),
493
+ completion_tokens: import_v43.z.number().nullish(),
494
+ prompt_cache_hit_tokens: import_v43.z.number().nullish(),
495
+ prompt_cache_miss_tokens: import_v43.z.number().nullish(),
496
+ total_tokens: import_v43.z.number().nullish(),
497
+ prompt_tokens_details: import_v43.z.looseObject({
498
+ cached_tokens: import_v43.z.number().nullish()
499
+ }).nullish(),
500
+ completion_tokens_details: import_v43.z.looseObject({
501
+ reasoning_tokens: import_v43.z.number().nullish()
502
+ }).nullish()
503
+ }).nullish();
504
+ }
505
+ var tokenUsageSchema;
506
+ function getTokenUsageSchema() {
507
+ return tokenUsageSchema != null ? tokenUsageSchema : tokenUsageSchema = createTokenUsageSchema();
508
+ }
509
+ function createDeepSeekErrorSchema() {
510
+ return import_v43.z.object({
511
+ error: import_v43.z.object({
512
+ message: import_v43.z.string(),
513
+ type: import_v43.z.string().nullish(),
514
+ param: import_v43.z.any().nullish(),
515
+ code: import_v43.z.union([import_v43.z.string(), import_v43.z.number()]).nullish()
487
516
  })
488
- )
489
- });
490
- var deepseekChatLogprobsSchema = import_v43.z.object({
491
- content: import_v43.z.array(deepseekChatLogprobSchema).nullish(),
492
- reasoning_content: import_v43.z.array(deepseekChatLogprobSchema).nullish()
493
- }).nullish();
494
- var deepseekChatResponseSchema = import_v43.z.object({
495
- id: import_v43.z.string().nullish(),
496
- created: import_v43.z.number().nullish(),
497
- model: import_v43.z.string().nullish(),
498
- object: import_v43.z.literal("chat.completion").nullish(),
499
- system_fingerprint: import_v43.z.string().nullish(),
500
- choices: import_v43.z.array(
517
+ });
518
+ }
519
+ var errorSchema;
520
+ function getDeepSeekErrorSchema() {
521
+ return errorSchema != null ? errorSchema : errorSchema = createDeepSeekErrorSchema();
522
+ }
523
+ var deepSeekErrorSchema = (0, import_provider_utils4.lazySchema)(
524
+ () => (0, import_provider_utils4.zodSchema)(getDeepSeekErrorSchema())
525
+ );
526
+ function createDeepseekChatLogprobsSchema() {
527
+ const deepseekChatLogprobSchema = import_v43.z.object({
528
+ token: import_v43.z.string(),
529
+ logprob: import_v43.z.number(),
530
+ bytes: import_v43.z.array(import_v43.z.number()).nullable(),
531
+ top_logprobs: import_v43.z.array(
532
+ import_v43.z.object({
533
+ token: import_v43.z.string(),
534
+ logprob: import_v43.z.number(),
535
+ bytes: import_v43.z.array(import_v43.z.number()).nullable()
536
+ })
537
+ )
538
+ });
539
+ return import_v43.z.object({
540
+ content: import_v43.z.array(deepseekChatLogprobSchema).nullish(),
541
+ reasoning_content: import_v43.z.array(deepseekChatLogprobSchema).nullish()
542
+ }).nullish();
543
+ }
544
+ var logprobsSchema;
545
+ function getDeepseekChatLogprobsSchema() {
546
+ return logprobsSchema != null ? logprobsSchema : logprobsSchema = createDeepseekChatLogprobsSchema();
547
+ }
548
+ var deepseekChatResponseSchema = (0, import_provider_utils4.lazySchema)(
549
+ () => (0, import_provider_utils4.zodSchema)(
501
550
  import_v43.z.object({
502
- index: import_v43.z.number().nullish(),
503
- message: import_v43.z.object({
504
- role: import_v43.z.literal("assistant").nullish(),
505
- content: import_v43.z.string().nullish(),
506
- reasoning_content: import_v43.z.string().nullish(),
507
- tool_calls: import_v43.z.array(
508
- import_v43.z.object({
509
- id: import_v43.z.string().nullish(),
510
- type: import_v43.z.literal("function").nullish(),
511
- function: import_v43.z.object({
512
- name: import_v43.z.string(),
513
- arguments: import_v43.z.string()
514
- })
515
- })
516
- ).nullish()
517
- }),
518
- logprobs: deepseekChatLogprobsSchema,
519
- finish_reason: import_v43.z.string().nullish()
551
+ id: import_v43.z.string().nullish(),
552
+ created: import_v43.z.number().nullish(),
553
+ model: import_v43.z.string().nullish(),
554
+ object: import_v43.z.literal("chat.completion").nullish(),
555
+ system_fingerprint: import_v43.z.string().nullish(),
556
+ choices: import_v43.z.array(
557
+ import_v43.z.object({
558
+ index: import_v43.z.number().nullish(),
559
+ message: import_v43.z.object({
560
+ role: import_v43.z.literal("assistant").nullish(),
561
+ content: import_v43.z.string().nullish(),
562
+ reasoning_content: import_v43.z.string().nullish(),
563
+ tool_calls: import_v43.z.array(
564
+ import_v43.z.object({
565
+ id: import_v43.z.string().nullish(),
566
+ type: import_v43.z.literal("function").nullish(),
567
+ function: import_v43.z.object({
568
+ name: import_v43.z.string(),
569
+ arguments: import_v43.z.string()
570
+ })
571
+ })
572
+ ).nullish()
573
+ }),
574
+ logprobs: getDeepseekChatLogprobsSchema(),
575
+ finish_reason: import_v43.z.string().nullish()
576
+ })
577
+ ),
578
+ usage: getTokenUsageSchema()
520
579
  })
521
- ),
522
- usage: tokenUsageSchema
523
- });
524
- var deepseekChatChunkSchema = (0, import_provider_utils2.lazySchema)(
525
- () => (0, import_provider_utils2.zodSchema)(
580
+ )
581
+ );
582
+ var deepseekChatChunkSchema = (0, import_provider_utils4.lazySchema)(
583
+ () => (0, import_provider_utils4.zodSchema)(
526
584
  import_v43.z.union([
527
585
  import_v43.z.object({
528
586
  id: import_v43.z.string().nullish(),
@@ -549,13 +607,13 @@ var deepseekChatChunkSchema = (0, import_provider_utils2.lazySchema)(
549
607
  })
550
608
  ).nullish()
551
609
  }).nullish(),
552
- logprobs: deepseekChatLogprobsSchema,
610
+ logprobs: getDeepseekChatLogprobsSchema(),
553
611
  finish_reason: import_v43.z.string().nullish()
554
612
  })
555
613
  ),
556
- usage: tokenUsageSchema
614
+ usage: getTokenUsageSchema()
557
615
  }),
558
- deepSeekErrorSchema
616
+ getDeepSeekErrorSchema()
559
617
  ])
560
618
  )
561
619
  );
@@ -693,7 +751,7 @@ var DeepSeekChatLanguageModel = class {
693
751
  };
694
752
  this.modelId = modelId;
695
753
  this.config = config;
696
- this.failedResponseHandler = (0, import_provider_utils3.createJsonErrorResponseHandler)({
754
+ this.failedResponseHandler = (0, import_provider_utils5.createJsonErrorResponseHandler)({
697
755
  errorSchema: deepSeekErrorSchema,
698
756
  errorToMessage: (error) => error.error.message
699
757
  });
@@ -720,7 +778,7 @@ var DeepSeekChatLanguageModel = class {
720
778
  tools
721
779
  }) {
722
780
  var _a, _b, _c, _d;
723
- const deepseekOptions = (_a = await (0, import_provider_utils3.parseProviderOptions)({
781
+ const deepseekOptions = (_a = await (0, import_provider_utils5.parseProviderOptions)({
724
782
  provider: this.providerOptionsName,
725
783
  providerOptions,
726
784
  schema: deepseekLanguageModelOptions
@@ -835,15 +893,15 @@ var DeepSeekChatLanguageModel = class {
835
893
  responseHeaders,
836
894
  value: responseBody,
837
895
  rawValue: rawResponse
838
- } = await (0, import_provider_utils3.postJsonToApi)({
896
+ } = await (0, import_provider_utils5.postJsonToApi)({
839
897
  url: this.config.url({
840
898
  path: "/chat/completions",
841
899
  modelId: this.modelId
842
900
  }),
843
- headers: (0, import_provider_utils3.combineHeaders)(this.config.headers(), options.headers),
901
+ headers: (0, import_provider_utils5.combineHeaders)(this.config.headers(), options.headers),
844
902
  body: args,
845
903
  failedResponseHandler: this.failedResponseHandler,
846
- successfulResponseHandler: (0, import_provider_utils3.createJsonResponseHandler)(
904
+ successfulResponseHandler: (0, import_provider_utils5.createJsonResponseHandler)(
847
905
  deepseekChatResponseSchema
848
906
  ),
849
907
  abortSignal: options.abortSignal,
@@ -862,7 +920,7 @@ var DeepSeekChatLanguageModel = class {
862
920
  for (const toolCall of choice.message.tool_calls) {
863
921
  content.push({
864
922
  type: "tool-call",
865
- toolCallId: (_a = toolCall.id) != null ? _a : (0, import_provider_utils3.generateId)(),
923
+ toolCallId: (_a = toolCall.id) != null ? _a : (0, import_provider_utils5.generateId)(),
866
924
  toolName: toolCall.function.name,
867
925
  input: toolCall.function.arguments
868
926
  });
@@ -915,15 +973,15 @@ var DeepSeekChatLanguageModel = class {
915
973
  stream: true,
916
974
  stream_options: { include_usage: true }
917
975
  };
918
- const { responseHeaders, value: response } = await (0, import_provider_utils3.postJsonToApi)({
976
+ const { responseHeaders, value: response } = await (0, import_provider_utils5.postJsonToApi)({
919
977
  url: this.config.url({
920
978
  path: "/chat/completions",
921
979
  modelId: this.modelId
922
980
  }),
923
- headers: (0, import_provider_utils3.combineHeaders)(this.config.headers(), options.headers),
981
+ headers: (0, import_provider_utils5.combineHeaders)(this.config.headers(), options.headers),
924
982
  body,
925
983
  failedResponseHandler: this.failedResponseHandler,
926
- successfulResponseHandler: (0, import_provider_utils3.createEventSourceResponseHandler)(
984
+ successfulResponseHandler: (0, import_provider_utils5.createEventSourceResponseHandler)(
927
985
  deepseekChatChunkSchema
928
986
  ),
929
987
  abortSignal: options.abortSignal,
@@ -1124,7 +1182,7 @@ var DeepSeekChatLanguageModel = class {
1124
1182
  });
1125
1183
  controller.enqueue({
1126
1184
  type: "tool-call",
1127
- toolCallId: (_a = toolCall.id) != null ? _a : (0, import_provider_utils3.generateId)(),
1185
+ toolCallId: (_a = toolCall.id) != null ? _a : (0, import_provider_utils5.generateId)(),
1128
1186
  toolName: toolCall.function.name,
1129
1187
  input: toolCall.function.arguments
1130
1188
  });
@@ -1167,15 +1225,15 @@ var DeepSeekChatLanguageModel = class {
1167
1225
  };
1168
1226
 
1169
1227
  // src/version.ts
1170
- var VERSION = true ? "2.0.76" : "0.0.0-test";
1228
+ var VERSION = true ? "2.0.78" : "0.0.0-test";
1171
1229
 
1172
1230
  // src/deepseek-provider.ts
1173
1231
  function createDeepSeek(options = {}) {
1174
1232
  var _a;
1175
- const baseURL = (_a = (0, import_provider_utils4.withoutTrailingSlash)(options.baseURL)) != null ? _a : "https://api.deepseek.com";
1176
- const getHeaders = () => (0, import_provider_utils4.withUserAgentSuffix)(
1233
+ const baseURL = (_a = (0, import_provider_utils6.withoutTrailingSlash)(options.baseURL)) != null ? _a : "https://api.deepseek.com";
1234
+ const getHeaders = () => (0, import_provider_utils6.withUserAgentSuffix)(
1177
1235
  {
1178
- Authorization: `Bearer ${(0, import_provider_utils4.loadApiKey)({
1236
+ Authorization: `Bearer ${(0, import_provider_utils6.loadApiKey)({
1179
1237
  apiKey: options.apiKey,
1180
1238
  environmentVariableName: "DEEPSEEK_API_KEY",
1181
1239
  description: "DeepSeek API key"