@ai-sdk/deepseek 3.0.80 → 3.0.83
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 +26 -0
- package/dist/index.d.ts +49 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +978 -5
- package/dist/index.js.map +1 -1
- package/docs/30-deepseek.mdx +91 -0
- package/package.json +3 -3
- package/src/deepseek-provider.ts +24 -0
- package/src/index.ts +1 -0
- package/src/responses/convert-deepseek-responses-usage.ts +44 -0
- package/src/responses/convert-to-deepseek-responses-input.ts +279 -0
- package/src/responses/deepseek-responses-api.ts +214 -0
- package/src/responses/deepseek-responses-language-model-options.ts +54 -0
- package/src/responses/deepseek-responses-language-model.ts +756 -0
- package/src/responses/deepseek-responses-prepare-tools.ts +87 -0
- package/src/responses/map-deepseek-responses-finish-reason.ts +26 -0
- package/src/tool/index.ts +7 -0
- package/src/tool/web-search.ts +47 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @ai-sdk/deepseek
|
|
2
2
|
|
|
3
|
+
## 3.0.83
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f9d43bd: feat(provider/deepseek): add Responses API model and web search tool
|
|
8
|
+
- Updated dependencies [88b9575]
|
|
9
|
+
- @ai-sdk/provider-utils@5.0.78
|
|
10
|
+
|
|
11
|
+
## 3.0.82
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [9f37b45]
|
|
16
|
+
- @ai-sdk/provider-utils@5.0.77
|
|
17
|
+
|
|
18
|
+
## 3.0.81
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [6400cf8]
|
|
23
|
+
- Updated dependencies [f608c05]
|
|
24
|
+
- Updated dependencies [cab9c1f]
|
|
25
|
+
- Updated dependencies [c70adf6]
|
|
26
|
+
- @ai-sdk/provider-utils@5.0.76
|
|
27
|
+
- @ai-sdk/provider@4.0.37
|
|
28
|
+
|
|
3
29
|
## 3.0.80
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,45 @@ declare const deepseekAssistantMessageProviderOptions: import("@ai-sdk/provider-
|
|
|
49
49
|
}>;
|
|
50
50
|
type DeepSeekAssistantMessageProviderOptions = InferSchema<typeof deepseekAssistantMessageProviderOptions>;
|
|
51
51
|
//#endregion
|
|
52
|
+
//#region src/responses/deepseek-responses-language-model-options.d.ts
|
|
53
|
+
type DeepSeekResponsesModelId = 'deepseek-flash' | 'deepseek-v4-pro' | (string & {});
|
|
54
|
+
type DeepSeekLanguageModelResponsesOptions = {
|
|
55
|
+
/**
|
|
56
|
+
* Controls whether thinking mode is enabled. Thinking is enabled by default.
|
|
57
|
+
*/
|
|
58
|
+
thinking?: {
|
|
59
|
+
type?: 'enabled' | 'disabled';
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Controls the thinking strength when thinking is enabled.
|
|
63
|
+
*/
|
|
64
|
+
reasoningEffort?: 'low' | 'high' | 'max';
|
|
65
|
+
/**
|
|
66
|
+
* Number of most likely tokens to return at each token position (0 to 20).
|
|
67
|
+
* Log probabilities are returned in `providerMetadata.deepseek.logprobs`.
|
|
68
|
+
*/
|
|
69
|
+
topLogprobs?: number;
|
|
70
|
+
/**
|
|
71
|
+
* An opaque identifier for the end user. DeepSeek uses this identifier for
|
|
72
|
+
* content-safety tracing and request isolation.
|
|
73
|
+
*
|
|
74
|
+
* Must contain only ASCII letters, numbers, underscores, and hyphens, and
|
|
75
|
+
* must be at most 512 characters long.
|
|
76
|
+
*/
|
|
77
|
+
userId?: string;
|
|
78
|
+
};
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/tool/index.d.ts
|
|
81
|
+
declare const deepseekTools: {
|
|
82
|
+
webSearch: (args?: Parameters<import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {
|
|
83
|
+
status?: string;
|
|
84
|
+
action?: Record<string, unknown>;
|
|
85
|
+
}, {}, {}>>[0]) => import("@ai-sdk/provider-utils").ProviderExecutedTool<{}, {
|
|
86
|
+
status?: string;
|
|
87
|
+
action?: Record<string, unknown>;
|
|
88
|
+
}, {}>;
|
|
89
|
+
};
|
|
90
|
+
//#endregion
|
|
52
91
|
//#region src/deepseek-provider.d.ts
|
|
53
92
|
interface DeepSeekProviderSettings {
|
|
54
93
|
/**
|
|
@@ -83,6 +122,15 @@ interface DeepSeekProvider extends ProviderV4 {
|
|
|
83
122
|
* Creates a DeepSeek chat model for text generation.
|
|
84
123
|
*/
|
|
85
124
|
chat(modelId: DeepSeekChatModelId): LanguageModelV4;
|
|
125
|
+
/**
|
|
126
|
+
* Creates a DeepSeek model that uses the Responses API. Supports
|
|
127
|
+
* server-side tools such as `deepseek.tools.webSearch()`.
|
|
128
|
+
*/
|
|
129
|
+
responses(modelId: DeepSeekResponsesModelId): LanguageModelV4;
|
|
130
|
+
/**
|
|
131
|
+
* DeepSeek server-side tools for use with the Responses API.
|
|
132
|
+
*/
|
|
133
|
+
tools: typeof deepseekTools;
|
|
86
134
|
/**
|
|
87
135
|
* Creates a DeepSeek files interface for uploading images.
|
|
88
136
|
*/
|
|
@@ -122,5 +170,5 @@ declare const deepSeekFilesOptionsSchema: import("@ai-sdk/provider-utils").LazyS
|
|
|
122
170
|
}>;
|
|
123
171
|
type DeepSeekFilesOptions = InferSchema<typeof deepSeekFilesOptionsSchema>;
|
|
124
172
|
//#endregion
|
|
125
|
-
export { type DeepSeekAssistantMessageProviderOptions, type DeepSeekLanguageModelChatOptions as DeepSeekChatOptions, type DeepSeekLanguageModelChatOptions, type DeepSeekLanguageModelChatOptions as DeepSeekLanguageModelOptions, type DeepSeekErrorData, type DeepSeekFilePartProviderOptions, type DeepSeekFilesOptions, type DeepSeekMessageProviderOptions, type DeepSeekProvider, type DeepSeekProviderSettings, deepSeek as deepseek };
|
|
173
|
+
export { type DeepSeekAssistantMessageProviderOptions, type DeepSeekLanguageModelChatOptions as DeepSeekChatOptions, type DeepSeekLanguageModelChatOptions, type DeepSeekLanguageModelChatOptions as DeepSeekLanguageModelOptions, type DeepSeekErrorData, type DeepSeekFilePartProviderOptions, type DeepSeekFilesOptions, type DeepSeekLanguageModelResponsesOptions, type DeepSeekMessageProviderOptions, type DeepSeekProvider, type DeepSeekProviderSettings, deepSeek as deepseek };
|
|
126
174
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/chat/deepseek-chat-language-model-options.ts","../src/deepseek-provider.ts","../src/version.ts","../src/chat/deepseek-chat-api-types.ts","../src/chat/deepseek-file-part-options.ts","../src/files/deepseek-files-options.ts"],"mappings":";;;;KAQY;KA+EA;;;;EAIV;;;;;;EAOA;;;;;;;;EASA;;;;EAKA;IACE;;;;;EAMF;;;;;;EAOA;;cAsBW,iEAA8B;EAAA;;KAI/B,iCAAiC,mBACpC;cAuBI,0EAAuC;;;;KAIxC,0CAA0C,mBAC7C;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/chat/deepseek-chat-language-model-options.ts","../src/responses/deepseek-responses-language-model-options.ts","../src/tool/index.ts","../src/deepseek-provider.ts","../src/version.ts","../src/chat/deepseek-chat-api-types.ts","../src/chat/deepseek-file-part-options.ts","../src/files/deepseek-files-options.ts"],"mappings":";;;;KAQY;KA+EA;;;;EAIV;;;;;;EAOA;;;;;;;;EASA;;;;EAKA;IACE;;;;;EAMF;;;;;;EAOA;;cAsBW,iEAA8B;EAAA;;KAI/B,iCAAiC,mBACpC;cAuBI,0EAAuC;;;;KAIxC,0CAA0C,mBAC7C;;;KCjLG;KAsBA;;;;EAIV;IACE;;;;;EAMF;;;;;EAMA;;;;;;;;EASA;;;;cChDW;;;;;;;;;;;UCkBI;;;;;EAKf,SAAS;;;;EAKT;;;;EAKA,UAAU;;;;;EAMV,QAAQ;;UAGO,yBAAyB;;;;GAIvC,SAAS,sBAAsB;;;;EAKhC,cAAc,SAAS,sBAAsB;;;;EAK7C,KAAK,SAAS,sBAAsB;;;;;EAMpC,UAAU,SAAS,2BAA2B;;;;EAK9C,cAAc;;;;EAKd,SAAS;;;;EAKT,mBAAmB;;wBAGL,eACd,UAAS,2BACR;qBAoEU,UAAQ;;;qBCxJR;;;cCiJA,sDAAmB;;;;;;;;KAIpB,oBAAoB,mBAAmB;;;cChJtC,kEAA+B;;;;KAuBhC,kCAAkC,mBACrC;;;cCxBI,6DAA0B;EAAA;;KAY3B,uBAAuB,mBAC1B"}
|