@ai-sdk/deepseek 1.0.52 → 1.0.55

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 CHANGED
@@ -1,5 +1,38 @@
1
1
  # @ai-sdk/deepseek
2
2
 
3
+ ## 1.0.55
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [26165ee]
8
+ - @ai-sdk/provider-utils@3.0.36
9
+
10
+ ## 1.0.54
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [77d33c0]
15
+ - @ai-sdk/provider-utils@3.0.35
16
+
17
+ ## 1.0.53
18
+
19
+ ### Patch Changes
20
+
21
+ - 8e31b43: Warn and omit deprecated or ineffective DeepSeek sampling options while
22
+ preserving penalty sampling for Azure-hosted DeepSeek models.
23
+ - 64f3fe0: feat(provider/deepseek): add the `userId` chat option and serialize it as `user_id`
24
+ - 8e77e23: feat(provider/deepseek): add DeepSeek V4 Flash and Pro model IDs
25
+ - db8d076: Add provider-specific names for DeepSeek system, user, and assistant messages.
26
+ - d85aaea: Preserve documented DeepSeek chat response metadata for generate and stream.
27
+ - ddea7d7: Add DeepSeek chat completion log probability request and response support.
28
+ - d9126d6: Add support for DeepSeek beta assistant prefix completion through message provider options.
29
+ - 865c3d3: Expose DeepSeek response system fingerprints in provider metadata for generated and streamed text.
30
+ - 86cd8e0: Align DeepSeek thinking and reasoning effort options with the documented API values while mapping legacy options with compatibility warnings.
31
+ - fe2c05f: Add DeepSeek image detail and inline file-data content part support.
32
+ - Updated dependencies [2fff9f1]
33
+ - Updated dependencies [f364ea0]
34
+ - @ai-sdk/provider-utils@3.0.34
35
+
3
36
  ## 1.0.52
4
37
 
5
38
  ### Patch Changes
package/README.md CHANGED
@@ -27,7 +27,7 @@ import { deepseek } from '@ai-sdk/deepseek';
27
27
  import { generateText } from 'ai';
28
28
 
29
29
  const { text } = await generateText({
30
- model: deepseek('deepseek-chat'),
30
+ model: deepseek('deepseek-v4-flash'),
31
31
  prompt: 'Write a JavaScript function that sorts a list:',
32
32
  });
33
33
  ```
package/dist/index.d.mts CHANGED
@@ -2,25 +2,52 @@ import { ProviderV2, LanguageModelV2 } from '@ai-sdk/provider';
2
2
  import { FetchFunction } from '@ai-sdk/provider-utils';
3
3
  import { z } from 'zod/v4';
4
4
 
5
- type DeepSeekChatModelId = 'deepseek-chat' | 'deepseek-reasoner' | 'deepseek-v4-flash-vision-exp' | (string & {});
6
- declare const deepseekChatOptions: z.ZodObject<{
7
- thinking: z.ZodOptional<z.ZodObject<{
8
- type: z.ZodOptional<z.ZodEnum<{
9
- adaptive: "adaptive";
10
- enabled: "enabled";
11
- disabled: "disabled";
12
- }>>;
13
- }, z.core.$strip>>;
14
- reasoningEffort: z.ZodOptional<z.ZodEnum<{
15
- low: "low";
16
- medium: "medium";
17
- high: "high";
18
- xhigh: "xhigh";
19
- max: "max";
20
- }>>;
21
- strictJsonSchema: z.ZodOptional<z.ZodBoolean>;
5
+ type DeepSeekChatModelId = 'deepseek-v4-flash' | 'deepseek-v4-pro' | 'deepseek-v4-flash-vision-exp' | (string & {});
6
+ type DeepSeekChatOptions = {
7
+ /**
8
+ * Whether to return log probabilities for generated tokens.
9
+ */
10
+ logprobs?: boolean;
11
+ /**
12
+ * Number of most likely tokens to return at each token position.
13
+ *
14
+ * Setting this option automatically enables `logprobs`.
15
+ */
16
+ topLogprobs?: number;
17
+ /**
18
+ * An opaque identifier for the end user. DeepSeek uses this identifier for
19
+ * content-safety tracing and request isolation.
20
+ *
21
+ * Must contain only ASCII letters, numbers, underscores, and hyphens, and
22
+ * must be at most 512 characters long.
23
+ */
24
+ userId?: string;
25
+ /**
26
+ * Controls whether thinking mode is enabled. Defaults to `enabled`.
27
+ */
28
+ thinking?: {
29
+ type?: 'enabled' | 'disabled';
30
+ };
31
+ /**
32
+ * Controls the thinking strength for DeepSeek V4 reasoning models.
33
+ */
34
+ reasoningEffort?: 'low' | 'high' | 'max';
35
+ /**
36
+ * Whether to use strict JSON schema validation for structured outputs.
37
+ * Only applies when the serving endpoint supports JSON schema response
38
+ * formats (e.g. Azure). Defaults to `true`.
39
+ */
40
+ strictJsonSchema?: boolean;
41
+ };
42
+ declare const deepseekMessageProviderOptions: z.ZodObject<{
43
+ name: z.ZodOptional<z.ZodString>;
44
+ }, z.core.$strip>;
45
+ type DeepSeekMessageProviderOptions = z.infer<typeof deepseekMessageProviderOptions>;
46
+ declare const deepseekAssistantMessageProviderOptions: z.ZodObject<{
47
+ name: z.ZodOptional<z.ZodString>;
48
+ prefix: z.ZodOptional<z.ZodLiteral<true>>;
22
49
  }, z.core.$strip>;
23
- type DeepSeekChatOptions = z.infer<typeof deepseekChatOptions>;
50
+ type DeepSeekAssistantMessageProviderOptions = z.infer<typeof deepseekAssistantMessageProviderOptions>;
24
51
 
25
52
  interface DeepSeekProviderSettings {
26
53
  /**
@@ -70,4 +97,15 @@ declare const deepSeekErrorSchema: z.ZodObject<{
70
97
  }, z.core.$strip>;
71
98
  type DeepSeekErrorData = z.infer<typeof deepSeekErrorSchema>;
72
99
 
73
- export { type DeepSeekChatOptions, type DeepSeekErrorData, type DeepSeekProvider, type DeepSeekProviderSettings, VERSION, createDeepSeek, deepseek };
100
+ declare const deepseekFilePartProviderOptions: z.ZodObject<{
101
+ imageDetail: z.ZodOptional<z.ZodEnum<{
102
+ low: "low";
103
+ high: "high";
104
+ original: "original";
105
+ auto: "auto";
106
+ }>>;
107
+ fileData: z.ZodOptional<z.ZodLiteral<true>>;
108
+ }, z.core.$strip>;
109
+ type DeepSeekFilePartProviderOptions = z.infer<typeof deepseekFilePartProviderOptions>;
110
+
111
+ export { type DeepSeekAssistantMessageProviderOptions, type DeepSeekChatOptions, type DeepSeekErrorData, type DeepSeekFilePartProviderOptions, type DeepSeekMessageProviderOptions, type DeepSeekProvider, type DeepSeekProviderSettings, VERSION, createDeepSeek, deepseek };
package/dist/index.d.ts CHANGED
@@ -2,25 +2,52 @@ import { ProviderV2, LanguageModelV2 } from '@ai-sdk/provider';
2
2
  import { FetchFunction } from '@ai-sdk/provider-utils';
3
3
  import { z } from 'zod/v4';
4
4
 
5
- type DeepSeekChatModelId = 'deepseek-chat' | 'deepseek-reasoner' | 'deepseek-v4-flash-vision-exp' | (string & {});
6
- declare const deepseekChatOptions: z.ZodObject<{
7
- thinking: z.ZodOptional<z.ZodObject<{
8
- type: z.ZodOptional<z.ZodEnum<{
9
- adaptive: "adaptive";
10
- enabled: "enabled";
11
- disabled: "disabled";
12
- }>>;
13
- }, z.core.$strip>>;
14
- reasoningEffort: z.ZodOptional<z.ZodEnum<{
15
- low: "low";
16
- medium: "medium";
17
- high: "high";
18
- xhigh: "xhigh";
19
- max: "max";
20
- }>>;
21
- strictJsonSchema: z.ZodOptional<z.ZodBoolean>;
5
+ type DeepSeekChatModelId = 'deepseek-v4-flash' | 'deepseek-v4-pro' | 'deepseek-v4-flash-vision-exp' | (string & {});
6
+ type DeepSeekChatOptions = {
7
+ /**
8
+ * Whether to return log probabilities for generated tokens.
9
+ */
10
+ logprobs?: boolean;
11
+ /**
12
+ * Number of most likely tokens to return at each token position.
13
+ *
14
+ * Setting this option automatically enables `logprobs`.
15
+ */
16
+ topLogprobs?: number;
17
+ /**
18
+ * An opaque identifier for the end user. DeepSeek uses this identifier for
19
+ * content-safety tracing and request isolation.
20
+ *
21
+ * Must contain only ASCII letters, numbers, underscores, and hyphens, and
22
+ * must be at most 512 characters long.
23
+ */
24
+ userId?: string;
25
+ /**
26
+ * Controls whether thinking mode is enabled. Defaults to `enabled`.
27
+ */
28
+ thinking?: {
29
+ type?: 'enabled' | 'disabled';
30
+ };
31
+ /**
32
+ * Controls the thinking strength for DeepSeek V4 reasoning models.
33
+ */
34
+ reasoningEffort?: 'low' | 'high' | 'max';
35
+ /**
36
+ * Whether to use strict JSON schema validation for structured outputs.
37
+ * Only applies when the serving endpoint supports JSON schema response
38
+ * formats (e.g. Azure). Defaults to `true`.
39
+ */
40
+ strictJsonSchema?: boolean;
41
+ };
42
+ declare const deepseekMessageProviderOptions: z.ZodObject<{
43
+ name: z.ZodOptional<z.ZodString>;
44
+ }, z.core.$strip>;
45
+ type DeepSeekMessageProviderOptions = z.infer<typeof deepseekMessageProviderOptions>;
46
+ declare const deepseekAssistantMessageProviderOptions: z.ZodObject<{
47
+ name: z.ZodOptional<z.ZodString>;
48
+ prefix: z.ZodOptional<z.ZodLiteral<true>>;
22
49
  }, z.core.$strip>;
23
- type DeepSeekChatOptions = z.infer<typeof deepseekChatOptions>;
50
+ type DeepSeekAssistantMessageProviderOptions = z.infer<typeof deepseekAssistantMessageProviderOptions>;
24
51
 
25
52
  interface DeepSeekProviderSettings {
26
53
  /**
@@ -70,4 +97,15 @@ declare const deepSeekErrorSchema: z.ZodObject<{
70
97
  }, z.core.$strip>;
71
98
  type DeepSeekErrorData = z.infer<typeof deepSeekErrorSchema>;
72
99
 
73
- export { type DeepSeekChatOptions, type DeepSeekErrorData, type DeepSeekProvider, type DeepSeekProviderSettings, VERSION, createDeepSeek, deepseek };
100
+ declare const deepseekFilePartProviderOptions: z.ZodObject<{
101
+ imageDetail: z.ZodOptional<z.ZodEnum<{
102
+ low: "low";
103
+ high: "high";
104
+ original: "original";
105
+ auto: "auto";
106
+ }>>;
107
+ fileData: z.ZodOptional<z.ZodLiteral<true>>;
108
+ }, z.core.$strip>;
109
+ type DeepSeekFilePartProviderOptions = z.infer<typeof deepseekFilePartProviderOptions>;
110
+
111
+ export { type DeepSeekAssistantMessageProviderOptions, type DeepSeekChatOptions, type DeepSeekErrorData, type DeepSeekFilePartProviderOptions, type DeepSeekMessageProviderOptions, type DeepSeekProvider, type DeepSeekProviderSettings, VERSION, createDeepSeek, deepseek };