@@ -52,6 +52,38 @@ 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 : { input : 0.15 , output : 0.6 , cache_read : 0.015 , cache_write : 0.15 } ,
84+ } ,
85+ } ,
86+ } ,
5587} ;
5688
5789const HUB_FIXTURE = {
@@ -66,6 +98,12 @@ const HUB_FIXTURE = {
6698 "claude-sonnet-4-20250514" : { display_name : "Claude Sonnet 4" } ,
6799 } ,
68100 } ,
101+ deepseek : {
102+ models : {
103+ "deepseek-v4-pro" : { display_name : "DeepSeek V4 Pro" } ,
104+ "deepseek-v4-flash" : { display_name : "DeepSeek V4 Flash" } ,
105+ } ,
106+ } ,
69107 } ,
70108} ;
71109
@@ -77,7 +115,7 @@ describe("buildConfigModels", () => {
77115 ) ;
78116
79117 expect ( warnings ) . toEqual ( [ ] ) ;
80- expect ( Object . keys ( models ) ) . toHaveLength ( 2 ) ;
118+ expect ( Object . keys ( models ) ) . toHaveLength ( 4 ) ;
81119
82120 const gpt = models [ "gpt-5.4-nano" ] ;
83121 expect ( gpt ) . toEqual ( {
@@ -125,6 +163,56 @@ describe("buildConfigModels", () => {
125163 "interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14" ,
126164 } ,
127165 } ) ;
166+
167+ const dsPro = models [ "deepseek-v4-pro" ] ;
168+ expect ( dsPro ) . toEqual ( {
169+ id : "deepseek-v4-pro" ,
170+ name : "DeepSeek V4 Pro" ,
171+ provider : {
172+ api : "https://hub.coreinfra.ai/claude/api/v1" ,
173+ npm : "@ai-sdk/anthropic" ,
174+ } ,
175+ attachment : true ,
176+ reasoning : true ,
177+ temperature : true ,
178+ tool_call : true ,
179+ modalities : {
180+ input : [ "text" ] ,
181+ output : [ "text" ] ,
182+ } ,
183+ cost : { input : 1.5 , output : 6 , cache_read : 0.15 , cache_write : 1.5 } ,
184+ limit : { context : 128000 , output : 32000 } ,
185+ interleaved : { field : "reasoning_content" } ,
186+ headers : {
187+ "anthropic-beta" :
188+ "interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14" ,
189+ } ,
190+ } ) ;
191+
192+ const dsFlash = models [ "deepseek-v4-flash" ] ;
193+ expect ( dsFlash ) . toEqual ( {
194+ id : "deepseek-v4-flash" ,
195+ name : "DeepSeek V4 Flash" ,
196+ provider : {
197+ api : "https://hub.coreinfra.ai/claude/api/v1" ,
198+ npm : "@ai-sdk/anthropic" ,
199+ } ,
200+ attachment : true ,
201+ reasoning : true ,
202+ temperature : true ,
203+ tool_call : true ,
204+ modalities : {
205+ input : [ "text" ] ,
206+ output : [ "text" ] ,
207+ } ,
208+ cost : { input : 0.15 , output : 0.6 , cache_read : 0.015 , cache_write : 0.15 } ,
209+ limit : { context : 128000 , output : 32000 } ,
210+ interleaved : { field : "reasoning_content" } ,
211+ headers : {
212+ "anthropic-beta" :
213+ "interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14" ,
214+ } ,
215+ } ) ;
128216 } ) ;
129217
130218 it ( "uses defaults and emits warning when model not in models.dev" , ( ) => {
@@ -197,7 +285,7 @@ describe("buildConfigModels", () => {
197285 expect ( models [ "shared-id" ] . limit . context ) . toBe ( 100000 ) ;
198286 } ) ;
199287
200- it ( "does not resolve from non-openai/anthropic providers in models.dev" , ( ) => {
288+ it ( "does not resolve from non-allowed providers in models.dev" , ( ) => {
201289 const modelsDevData = {
202290 "provider-a" : {
203291 models : {
0 commit comments