@ai-sdk/deepseek 2.0.0-beta.42 → 2.0.0-beta.43

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,11 @@
1
1
  # @ai-sdk/deepseek
2
2
 
3
+ ## 2.0.0-beta.43
4
+
5
+ ### Patch Changes
6
+
7
+ - 4d04f43: feat(deepseek): rewrite DeepSeek provider
8
+
3
9
  ## 2.0.0-beta.42
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,26 +1,35 @@
1
1
  import { ProviderV3, LanguageModelV3 } from '@ai-sdk/provider';
2
2
  import { FetchFunction } from '@ai-sdk/provider-utils';
3
- export { OpenAICompatibleErrorData as DeepSeekErrorData } from '@ai-sdk/openai-compatible';
3
+ import { z } from 'zod/v4';
4
4
 
5
5
  type DeepSeekChatModelId = 'deepseek-chat' | 'deepseek-reasoner' | (string & {});
6
+ declare const deepseekChatOptions: z.ZodObject<{
7
+ thinking: z.ZodOptional<z.ZodObject<{
8
+ type: z.ZodOptional<z.ZodEnum<{
9
+ enabled: "enabled";
10
+ disabled: "disabled";
11
+ }>>;
12
+ }, z.core.$strip>>;
13
+ }, z.core.$strip>;
14
+ type DeepSeekChatOptions = z.infer<typeof deepseekChatOptions>;
6
15
 
7
16
  interface DeepSeekProviderSettings {
8
17
  /**
9
- DeepSeek API key.
10
- */
18
+ * DeepSeek API key.
19
+ */
11
20
  apiKey?: string;
12
21
  /**
13
- Base URL for the API calls.
14
- */
22
+ * Base URL for the API calls.
23
+ */
15
24
  baseURL?: string;
16
25
  /**
17
- Custom headers to include in the requests.
18
- */
26
+ * Custom headers to include in the requests.
27
+ */
19
28
  headers?: Record<string, string>;
20
29
  /**
21
- Custom fetch implementation. You can use it as a middleware to intercept requests,
22
- or to provide a custom fetch implementation for e.g. testing.
23
- */
30
+ * Custom fetch implementation. You can use it as a middleware to intercept requests,
31
+ * or to provide a custom fetch implementation for e.g. testing.
32
+ */
24
33
  fetch?: FetchFunction;
25
34
  }
26
35
  interface DeepSeekProvider extends ProviderV3 {
@@ -42,4 +51,14 @@ declare const deepseek: DeepSeekProvider;
42
51
 
43
52
  declare const VERSION: string;
44
53
 
45
- export { type DeepSeekProvider, type DeepSeekProviderSettings, VERSION, createDeepSeek, deepseek };
54
+ declare const deepSeekErrorSchema: z.ZodObject<{
55
+ error: z.ZodObject<{
56
+ message: z.ZodString;
57
+ type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
58
+ param: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
59
+ code: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
60
+ }, z.core.$strip>;
61
+ }, z.core.$strip>;
62
+ type DeepSeekErrorData = z.infer<typeof deepSeekErrorSchema>;
63
+
64
+ export { type DeepSeekChatOptions, type DeepSeekErrorData, type DeepSeekProvider, type DeepSeekProviderSettings, VERSION, createDeepSeek, deepseek };
package/dist/index.d.ts CHANGED
@@ -1,26 +1,35 @@
1
1
  import { ProviderV3, LanguageModelV3 } from '@ai-sdk/provider';
2
2
  import { FetchFunction } from '@ai-sdk/provider-utils';
3
- export { OpenAICompatibleErrorData as DeepSeekErrorData } from '@ai-sdk/openai-compatible';
3
+ import { z } from 'zod/v4';
4
4
 
5
5
  type DeepSeekChatModelId = 'deepseek-chat' | 'deepseek-reasoner' | (string & {});
6
+ declare const deepseekChatOptions: z.ZodObject<{
7
+ thinking: z.ZodOptional<z.ZodObject<{
8
+ type: z.ZodOptional<z.ZodEnum<{
9
+ enabled: "enabled";
10
+ disabled: "disabled";
11
+ }>>;
12
+ }, z.core.$strip>>;
13
+ }, z.core.$strip>;
14
+ type DeepSeekChatOptions = z.infer<typeof deepseekChatOptions>;
6
15
 
7
16
  interface DeepSeekProviderSettings {
8
17
  /**
9
- DeepSeek API key.
10
- */
18
+ * DeepSeek API key.
19
+ */
11
20
  apiKey?: string;
12
21
  /**
13
- Base URL for the API calls.
14
- */
22
+ * Base URL for the API calls.
23
+ */
15
24
  baseURL?: string;
16
25
  /**
17
- Custom headers to include in the requests.
18
- */
26
+ * Custom headers to include in the requests.
27
+ */
19
28
  headers?: Record<string, string>;
20
29
  /**
21
- Custom fetch implementation. You can use it as a middleware to intercept requests,
22
- or to provide a custom fetch implementation for e.g. testing.
23
- */
30
+ * Custom fetch implementation. You can use it as a middleware to intercept requests,
31
+ * or to provide a custom fetch implementation for e.g. testing.
32
+ */
24
33
  fetch?: FetchFunction;
25
34
  }
26
35
  interface DeepSeekProvider extends ProviderV3 {
@@ -42,4 +51,14 @@ declare const deepseek: DeepSeekProvider;
42
51
 
43
52
  declare const VERSION: string;
44
53
 
45
- export { type DeepSeekProvider, type DeepSeekProviderSettings, VERSION, createDeepSeek, deepseek };
54
+ declare const deepSeekErrorSchema: z.ZodObject<{
55
+ error: z.ZodObject<{
56
+ message: z.ZodString;
57
+ type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
58
+ param: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
59
+ code: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
60
+ }, z.core.$strip>;
61
+ }, z.core.$strip>;
62
+ type DeepSeekErrorData = z.infer<typeof deepSeekErrorSchema>;
63
+
64
+ export { type DeepSeekChatOptions, type DeepSeekErrorData, type DeepSeekProvider, type DeepSeekProviderSettings, VERSION, createDeepSeek, deepseek };