@@ -159,7 +159,19 @@ <h2>Preset prices (all per million tokens)</h2>
159159 'amazon-nova-micro' : { name : 'Amazon Nova Micro' , input : 0.035 , output : 0.14 } ,
160160 'amazon-nova-lite' : { name : 'Amazon Nova Lite' , input : 0.06 , output : 0.24 } ,
161161 'amazon-nova-pro' : { name : 'Amazon Nova Pro' , input : 0.8 , output : 3.2 } ,
162- 'deepseek-chat' : { name : 'DeepSeek Chat' , input : 0.14 , output : 0.28 } ,
162+ 'deepseek-chat' : {
163+ name : 'DeepSeek Chat' ,
164+ getPrice : ( ) => {
165+ const cutoffDate = new Date ( '2025-02-08T16:00:00Z' ) ;
166+ const currentDate = new Date ( ) ;
167+
168+ if ( currentDate < cutoffDate ) {
169+ return { input : 0.14 , output : 0.28 } ;
170+ } else {
171+ return { input : 0.27 , output : 1.10 } ;
172+ }
173+ }
174+ } ,
163175 'deepseek-reasoner' : { name : 'DeepSeek Reasoner' , input : 0.55 , output : 2.19 } ,
164176 } ;
165177
@@ -181,8 +193,16 @@ <h2>Preset prices (all per million tokens)</h2>
181193
182194 function setPreset ( model ) {
183195 const preset = presets [ model ] ;
184- document . getElementById ( 'inputCost' ) . value = preset . input ;
185- document . getElementById ( 'outputCost' ) . value = preset . output ;
196+ let prices ;
197+
198+ if ( preset . getPrice ) {
199+ prices = preset . getPrice ( ) ;
200+ } else {
201+ prices = { input : preset . input , output : preset . output } ;
202+ }
203+
204+ document . getElementById ( 'inputCost' ) . value = prices . input ;
205+ document . getElementById ( 'outputCost' ) . value = prices . output ;
186206 calculateCost ( ) ;
187207 }
188208
0 commit comments