@ai-sdk/deepseek 1.0.41 → 1.0.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 +14 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +48 -0
- package/dist/internal/index.d.ts +48 -0
- package/dist/internal/index.js +745 -0
- package/dist/internal/index.js.map +1 -0
- package/dist/internal/index.mjs +730 -0
- package/dist/internal/index.mjs.map +1 -0
- package/internal.d.ts +1 -0
- package/package.json +10 -3
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { LanguageModelV2 } from '@ai-sdk/provider';
|
|
2
|
+
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
|
+
import { z } from 'zod/v4';
|
|
4
|
+
|
|
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
|
+
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
|
+
}, z.core.$strip>;
|
|
22
|
+
type DeepSeekChatOptions = z.infer<typeof deepseekChatOptions>;
|
|
23
|
+
|
|
24
|
+
type DeepSeekChatConfig = {
|
|
25
|
+
provider: string;
|
|
26
|
+
headers: () => Record<string, string | undefined>;
|
|
27
|
+
url: (options: {
|
|
28
|
+
modelId: string;
|
|
29
|
+
path: string;
|
|
30
|
+
}) => string;
|
|
31
|
+
fetch?: FetchFunction;
|
|
32
|
+
supportsThinking?: boolean;
|
|
33
|
+
};
|
|
34
|
+
declare class DeepSeekChatLanguageModel implements LanguageModelV2 {
|
|
35
|
+
readonly specificationVersion = "v2";
|
|
36
|
+
readonly modelId: DeepSeekChatModelId;
|
|
37
|
+
readonly supportedUrls: {};
|
|
38
|
+
private readonly config;
|
|
39
|
+
private readonly failedResponseHandler;
|
|
40
|
+
constructor(modelId: DeepSeekChatModelId, config: DeepSeekChatConfig);
|
|
41
|
+
get provider(): string;
|
|
42
|
+
private get providerOptionsName();
|
|
43
|
+
private getArgs;
|
|
44
|
+
doGenerate(options: Parameters<LanguageModelV2['doGenerate']>[0]): Promise<Awaited<ReturnType<LanguageModelV2['doGenerate']>>>;
|
|
45
|
+
doStream(options: Parameters<LanguageModelV2['doStream']>[0]): Promise<Awaited<ReturnType<LanguageModelV2['doStream']>>>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { type DeepSeekChatConfig, DeepSeekChatLanguageModel, type DeepSeekChatModelId, type DeepSeekChatOptions, deepseekChatOptions };
|