@ai-sdk/deepseek 1.0.29 → 1.0.31
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 +14 -0
- package/dist/index.d.mts +30 -11
- package/dist/index.d.ts +30 -11
- package/dist/index.js +691 -70
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +699 -65
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @ai-sdk/deepseek
|
|
2
2
|
|
|
3
|
+
## 1.0.31
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b1b0b17: feat(deepseek): rewrite DeepSeek provider
|
|
8
|
+
|
|
9
|
+
## 1.0.30
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [d1dbe5d]
|
|
14
|
+
- @ai-sdk/provider-utils@3.0.18
|
|
15
|
+
- @ai-sdk/openai-compatible@1.0.28
|
|
16
|
+
|
|
3
17
|
## 1.0.29
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
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
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
|
-
|
|
10
|
-
|
|
18
|
+
* DeepSeek API key.
|
|
19
|
+
*/
|
|
11
20
|
apiKey?: string;
|
|
12
21
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
22
|
+
* Base URL for the API calls.
|
|
23
|
+
*/
|
|
15
24
|
baseURL?: string;
|
|
16
25
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
* Custom headers to include in the requests.
|
|
27
|
+
*/
|
|
19
28
|
headers?: Record<string, string>;
|
|
20
29
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
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 ProviderV2 {
|
|
@@ -42,4 +51,14 @@ declare const deepseek: DeepSeekProvider;
|
|
|
42
51
|
|
|
43
52
|
declare const VERSION: string;
|
|
44
53
|
|
|
45
|
-
|
|
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 { 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
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
|
-
|
|
10
|
-
|
|
18
|
+
* DeepSeek API key.
|
|
19
|
+
*/
|
|
11
20
|
apiKey?: string;
|
|
12
21
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
22
|
+
* Base URL for the API calls.
|
|
23
|
+
*/
|
|
15
24
|
baseURL?: string;
|
|
16
25
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
* Custom headers to include in the requests.
|
|
27
|
+
*/
|
|
19
28
|
headers?: Record<string, string>;
|
|
20
29
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
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 ProviderV2 {
|
|
@@ -42,4 +51,14 @@ declare const deepseek: DeepSeekProvider;
|
|
|
42
51
|
|
|
43
52
|
declare const VERSION: string;
|
|
44
53
|
|
|
45
|
-
|
|
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 };
|