@@ -52,6 +52,43 @@ const MODELS_DEV_FIXTURE = {
5252 } ,
5353 } ,
5454 } ,
55+ deepseek : {
56+ models : {
57+ "deepseek-v4-pro" : {
58+ id : "deepseek-v4-pro" ,
59+ name : "DeepSeek V4 Pro" ,
60+ limit : { context : 128000 , output : 32000 } ,
61+ attachment : true ,
62+ reasoning : true ,
63+ temperature : true ,
64+ tool_call : true ,
65+ modalities : {
66+ input : [ "text" ] ,
67+ output : [ "text" ] ,
68+ } ,
69+ cost : { input : 1.5 , output : 6 , cache_read : 0.15 , cache_write : 1.5 } ,
70+ } ,
71+ "deepseek-v4-flash" : {
72+ id : "deepseek-v4-flash" ,
73+ name : "DeepSeek V4 Flash" ,
74+ limit : { context : 128000 , output : 32000 } ,
75+ attachment : true ,
76+ reasoning : true ,
77+ temperature : true ,
78+ tool_call : true ,
79+ modalities : {
80+ input : [ "text" ] ,
81+ output : [ "text" ] ,
82+ } ,
83+ cost : {
84+ input : 0.15 ,
85+ output : 0.6 ,
86+ cache_read : 0.015 ,
87+ cache_write : 0.15 ,
88+ } ,
89+ } ,
90+ } ,
91+ } ,
5592} ;
5693
5794const HUB_FIXTURE = {
@@ -66,6 +103,12 @@ const HUB_FIXTURE = {
66103 "claude-sonnet-4-20250514" : { display_name : "Claude Sonnet 4" } ,
67104 } ,
68105 } ,
106+ deepseek : {
107+ models : {
108+ "deepseek-v4-pro" : { display_name : "DeepSeek V4 Pro" } ,
109+ "deepseek-v4-flash" : { display_name : "DeepSeek V4 Flash" } ,
110+ } ,
111+ } ,
69112 } ,
70113} ;
71114
@@ -77,7 +120,7 @@ describe("buildConfigModels", () => {
77120 ) ;
78121
79122 expect ( warnings ) . toEqual ( [ ] ) ;
80- expect ( Object . keys ( models ) ) . toHaveLength ( 2 ) ;
123+ expect ( Object . keys ( models ) ) . toHaveLength ( 4 ) ;
81124
82125 const gpt = models [ "gpt-5.4-nano" ] ;
83126 expect ( gpt ) . toEqual ( {
@@ -125,6 +168,56 @@ describe("buildConfigModels", () => {
125168 "interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14" ,
126169 } ,
127170 } ) ;
171+
172+ const dsPro = models [ "deepseek-v4-pro" ] ;
173+ expect ( dsPro ) . toEqual ( {
174+ id : "deepseek-v4-pro" ,
175+ name : "DeepSeek V4 Pro" ,
176+ provider : {
177+ api : "https://hub.coreinfra.ai/claude/api/v1" ,
178+ npm : "@ai-sdk/anthropic" ,
179+ } ,
180+ attachment : true ,
181+ reasoning : true ,
182+ temperature : true ,
183+ tool_call : true ,
184+ modalities : {
185+ input : [ "text" ] ,
186+ output : [ "text" ] ,
187+ } ,
188+ cost : { input : 1.5 , output : 6 , cache_read : 0.15 , cache_write : 1.5 } ,
189+ limit : { context : 128000 , output : 32000 } ,
190+ interleaved : { field : "reasoning_content" } ,
191+ headers : {
192+ "anthropic-beta" :
193+ "interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14" ,
194+ } ,
195+ } ) ;
196+
197+ const dsFlash = models [ "deepseek-v4-flash" ] ;
198+ expect ( dsFlash ) . toEqual ( {
199+ id : "deepseek-v4-flash" ,
200+ name : "DeepSeek V4 Flash" ,
201+ provider : {
202+ api : "https://hub.coreinfra.ai/claude/api/v1" ,
203+ npm : "@ai-sdk/anthropic" ,
204+ } ,
205+ attachment : true ,
206+ reasoning : true ,
207+ temperature : true ,
208+ tool_call : true ,
209+ modalities : {
210+ input : [ "text" ] ,
211+ output : [ "text" ] ,
212+ } ,
213+ cost : { input : 0.15 , output : 0.6 , cache_read : 0.015 , cache_write : 0.15 } ,
214+ limit : { context : 128000 , output : 32000 } ,
215+ interleaved : { field : "reasoning_content" } ,
216+ headers : {
217+ "anthropic-beta" :
218+ "interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14" ,
219+ } ,
220+ } ) ;
128221 } ) ;
129222
130223 it ( "uses defaults and emits warning when model not in models.dev" , ( ) => {
@@ -197,7 +290,7 @@ describe("buildConfigModels", () => {
197290 expect ( models [ "shared-id" ] . limit . context ) . toBe ( 100000 ) ;
198291 } ) ;
199292
200- it ( "does not resolve from non-openai/anthropic providers in models.dev" , ( ) => {
293+ it ( "does not resolve from non-allowed providers in models.dev" , ( ) => {
201294 const modelsDevData = {
202295 "provider-a" : {
203296 models : {
0 commit comments