@ai-sdk/deepseek 3.0.56 → 3.0.57

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.
@@ -1,111 +1,111 @@
1
- import * as _ai_sdk_provider from '@ai-sdk/provider';
2
- import { LanguageModelV4, LanguageModelV4CallOptions, LanguageModelV4GenerateResult, LanguageModelV4StreamResult } from '@ai-sdk/provider';
3
- import { FetchFunction, WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE } from '@ai-sdk/provider-utils';
4
- import { z } from 'zod/v4';
5
-
6
- type DeepSeekChatModelId = 'deepseek-flash' | 'deepseek-v4-flash' | 'deepseek-v4-pro' | 'deepseek-v4-flash-vision-exp' | (string & {});
7
- declare const deepseekLanguageModelChatOptions: z.ZodObject<{
8
- logprobs: z.ZodOptional<z.ZodBoolean>;
9
- topLogprobs: z.ZodOptional<z.ZodNumber>;
10
- userId: z.ZodOptional<z.ZodString>;
11
- thinking: z.ZodOptional<z.ZodObject<{
12
- type: z.ZodOptional<z.ZodEnum<{
13
- adaptive: "adaptive";
14
- enabled: "enabled";
15
- disabled: "disabled";
16
- }>>;
17
- }, z.core.$strip>>;
18
- reasoningEffort: z.ZodOptional<z.ZodEnum<{
19
- low: "low";
20
- high: "high";
21
- medium: "medium";
22
- xhigh: "xhigh";
23
- max: "max";
1
+ import { LanguageModelV4, LanguageModelV4CallOptions, LanguageModelV4GenerateResult, LanguageModelV4StreamResult } from "@ai-sdk/provider";
2
+ import { FetchFunction, WORKFLOW_DESERIALIZE, WORKFLOW_SERIALIZE } from "@ai-sdk/provider-utils";
3
+ import { z } from "zod/v4";
4
+ //#region src/chat/deepseek-chat-language-model-options.d.ts
5
+ export type DeepSeekChatModelId = 'deepseek-flash' | 'deepseek-v4-flash' | 'deepseek-v4-pro' | 'deepseek-v4-flash-vision-exp' | (string & {});
6
+ export declare const deepseekLanguageModelChatOptions: z.ZodObject<{
7
+ logprobs: z.ZodOptional<z.ZodBoolean>;
8
+ topLogprobs: z.ZodOptional<z.ZodNumber>;
9
+ userId: z.ZodOptional<z.ZodString>;
10
+ thinking: z.ZodOptional<z.ZodObject<{
11
+ type: z.ZodOptional<z.ZodEnum<{
12
+ adaptive: "adaptive";
13
+ enabled: "enabled";
14
+ disabled: "disabled";
24
15
  }>>;
25
- strictJsonSchema: z.ZodOptional<z.ZodBoolean>;
16
+ }, z.core.$strip>>;
17
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
18
+ low: "low";
19
+ medium: "medium";
20
+ high: "high";
21
+ xhigh: "xhigh";
22
+ max: "max";
23
+ }>>;
24
+ strictJsonSchema: z.ZodOptional<z.ZodBoolean>;
26
25
  }, z.core.$strip>;
27
- type DeepSeekLanguageModelChatOptions = {
28
- /**
29
- * Whether to return log probabilities for generated tokens.
30
- */
31
- logprobs?: boolean;
32
- /**
33
- * Number of most likely tokens to return at each token position.
34
- *
35
- * Setting this option automatically enables `logprobs`.
36
- */
37
- topLogprobs?: number;
38
- /**
39
- * An opaque identifier for the end user. DeepSeek uses this identifier for
40
- * content-safety tracing and request isolation.
41
- *
42
- * Must contain only ASCII letters, numbers, underscores, and hyphens, and
43
- * must be at most 512 characters long.
44
- */
45
- userId?: string;
46
- /**
47
- * Controls whether thinking mode is enabled. Defaults to `enabled`.
48
- */
49
- thinking?: {
50
- type?: 'enabled' | 'disabled';
51
- };
52
- /**
53
- * Controls the thinking strength for DeepSeek V4 reasoning models.
54
- */
55
- reasoningEffort?: 'low' | 'high' | 'max';
56
- /**
57
- * Whether to use strict JSON schema validation for structured outputs.
58
- * Only applies when the serving endpoint supports JSON schema response
59
- * formats (e.g. Azure). Defaults to `true`.
60
- */
61
- strictJsonSchema?: boolean;
26
+ export type DeepSeekLanguageModelChatOptions = {
27
+ /**
28
+ * Whether to return log probabilities for generated tokens.
29
+ */
30
+ logprobs?: boolean;
31
+ /**
32
+ * Number of most likely tokens to return at each token position.
33
+ *
34
+ * Setting this option automatically enables `logprobs`.
35
+ */
36
+ topLogprobs?: number;
37
+ /**
38
+ * An opaque identifier for the end user. DeepSeek uses this identifier for
39
+ * content-safety tracing and request isolation.
40
+ *
41
+ * Must contain only ASCII letters, numbers, underscores, and hyphens, and
42
+ * must be at most 512 characters long.
43
+ */
44
+ userId?: string;
45
+ /**
46
+ * Controls whether thinking mode is enabled. Defaults to `enabled`.
47
+ */
48
+ thinking?: {
49
+ type?: 'enabled' | 'disabled';
50
+ };
51
+ /**
52
+ * Controls the thinking strength for DeepSeek V4 reasoning models.
53
+ */
54
+ reasoningEffort?: 'low' | 'high' | 'max';
55
+ /**
56
+ * Whether to use strict JSON schema validation for structured outputs.
57
+ * Only applies when the serving endpoint supports JSON schema response
58
+ * formats (e.g. Azure). Defaults to `true`.
59
+ */
60
+ strictJsonSchema?: boolean;
62
61
  };
63
- declare const deepseekMessageProviderOptions: z.ZodObject<{
64
- name: z.ZodOptional<z.ZodString>;
62
+ export declare const deepseekMessageProviderOptions: z.ZodObject<{
63
+ name: z.ZodOptional<z.ZodString>;
65
64
  }, z.core.$strip>;
66
- type DeepSeekMessageProviderOptions = z.infer<typeof deepseekMessageProviderOptions>;
67
- declare const deepseekAssistantMessageProviderOptions: z.ZodObject<{
68
- name: z.ZodOptional<z.ZodString>;
69
- prefix: z.ZodOptional<z.ZodLiteral<true>>;
65
+ export type DeepSeekMessageProviderOptions = z.infer<typeof deepseekMessageProviderOptions>;
66
+ export declare const deepseekAssistantMessageProviderOptions: z.ZodObject<{
67
+ name: z.ZodOptional<z.ZodString>;
68
+ prefix: z.ZodOptional<z.ZodLiteral<true>>;
70
69
  }, z.core.$strip>;
71
- type DeepSeekAssistantMessageProviderOptions = z.infer<typeof deepseekAssistantMessageProviderOptions>;
72
-
73
- type DeepSeekChatConfig = {
74
- provider: string;
75
- headers?: () => Record<string, string | undefined>;
76
- url: (options: {
77
- modelId: string;
78
- path: string;
79
- }) => string;
80
- fetch?: FetchFunction;
81
- supportsAssistantPrefixCompletion?: boolean;
82
- supportsStrictToolCalls?: boolean;
83
- supportsPenaltySampling?: boolean;
84
- supportsThinking?: boolean;
85
- supportsStructuredOutputs?: boolean;
70
+ export type DeepSeekAssistantMessageProviderOptions = z.infer<typeof deepseekAssistantMessageProviderOptions>;
71
+ //#endregion
72
+ //#region src/chat/deepseek-chat-language-model.d.ts
73
+ export type DeepSeekChatConfig = {
74
+ provider: string;
75
+ headers?: () => Record<string, string | undefined>;
76
+ url: (options: {
77
+ modelId: string;
78
+ path: string;
79
+ }) => string;
80
+ fetch?: FetchFunction;
81
+ supportsAssistantPrefixCompletion?: boolean;
82
+ supportsStrictToolCalls?: boolean;
83
+ supportsPenaltySampling?: boolean;
84
+ supportsThinking?: boolean;
85
+ supportsStructuredOutputs?: boolean;
86
86
  };
87
- declare class DeepSeekChatLanguageModel implements LanguageModelV4 {
88
- readonly specificationVersion = "v4";
89
- readonly modelId: DeepSeekChatModelId;
90
- readonly supportedUrls: {
91
- 'image/*': RegExp[];
92
- };
93
- private readonly config;
94
- private readonly failedResponseHandler;
95
- static [WORKFLOW_SERIALIZE](model: DeepSeekChatLanguageModel): {
96
- modelId: string;
97
- config: _ai_sdk_provider.JSONObject;
98
- };
99
- static [WORKFLOW_DESERIALIZE](options: {
100
- modelId: DeepSeekChatModelId;
101
- config: DeepSeekChatConfig;
102
- }): DeepSeekChatLanguageModel;
103
- constructor(modelId: DeepSeekChatModelId, config: DeepSeekChatConfig);
104
- get provider(): string;
105
- private get providerOptionsName();
106
- private getArgs;
107
- doGenerate(options: LanguageModelV4CallOptions): Promise<LanguageModelV4GenerateResult>;
108
- doStream(options: LanguageModelV4CallOptions): Promise<LanguageModelV4StreamResult>;
87
+ export declare class DeepSeekChatLanguageModel implements LanguageModelV4 {
88
+ readonly specificationVersion = "v4";
89
+ readonly modelId: DeepSeekChatModelId;
90
+ readonly supportedUrls: {
91
+ 'image/*': RegExp[];
92
+ };
93
+ private readonly config;
94
+ private readonly failedResponseHandler;
95
+ static [WORKFLOW_SERIALIZE](model: DeepSeekChatLanguageModel): {
96
+ modelId: string;
97
+ config: import("@ai-sdk/provider").JSONObject;
98
+ };
99
+ static [WORKFLOW_DESERIALIZE](options: {
100
+ modelId: DeepSeekChatModelId;
101
+ config: DeepSeekChatConfig;
102
+ }): DeepSeekChatLanguageModel;
103
+ constructor(modelId: DeepSeekChatModelId, config: DeepSeekChatConfig);
104
+ get provider(): string;
105
+ private get providerOptionsName();
106
+ private getArgs;
107
+ doGenerate(options: LanguageModelV4CallOptions): Promise<LanguageModelV4GenerateResult>;
108
+ doStream(options: LanguageModelV4CallOptions): Promise<LanguageModelV4StreamResult>;
109
109
  }
110
-
111
- export { type DeepSeekAssistantMessageProviderOptions, type DeepSeekChatConfig, DeepSeekChatLanguageModel, type DeepSeekChatModelId, type DeepSeekLanguageModelChatOptions, type DeepSeekMessageProviderOptions, deepseekAssistantMessageProviderOptions, deepseekLanguageModelChatOptions, deepseekMessageProviderOptions };
110
+ //#endregion
111
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/chat/deepseek-chat-language-model-options.ts","../../src/chat/deepseek-chat-language-model.ts"],"mappings":";;;;YAGY;qBASC,kCAAgC,EAAA;;;;;;;;;;;;;;;;;;;GAoD3C,EAAA,KAAA;YAEU;;;;EAIV;;;;;;EAOA;;;;;;;;EASA;;;;EAKA;IACE;;;;;EAMF;;;;;;EAOA;;qBAGW,gCAA8B,EAAA;;GAOzC,EAAA,KAAA;YAEU,iCAAiC,EAAE,aACtC;qBAGI,yCAAuC,EAAA;;;GAQhD,EAAA,KAAA;YAEQ,0CAA0C,EAAE,aAC/C;;;YClFG;EACV;EACA,gBAAgB;EAChB,MAAM;IAAW;IAAiB;;EAClC,QAAQ;EACR;EACA;EACA;EACA;EACA;;qBA2HW,qCAAqC;WACvC;WAEA,SAAS;WAET;;;mBAIQ;mBACA;UAET,oBAAoB,OAAO;;;;UAO3B,sBAAsB;IAC5B,SAAS;IACT,QAAQ;MACT;EAIW,YAAA,SAAS,qBAAqB,QAAQ;MAW9C;cAIQ;UAIE;EAyLR,WACJ,SAAS,6BACR,QAAQ;EAkGL,SACJ,SAAS,6BACR,QAAQ"}