File tree Expand file tree Collapse file tree 3 files changed +69
-2
lines changed
backend/src/modules/puterai Expand file tree Collapse file tree 3 files changed +69
-2
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,66 @@ class GeminiService extends BaseService {
137137 } ,
138138 max_tokens : 8192 ,
139139 } ,
140+ {
141+ id : 'gemini-2.0-flash-lite' ,
142+ name : 'Gemini 2.0 Flash-Lite' ,
143+ context : 1_048_576 ,
144+ cost : {
145+ currency : 'usd-cents' ,
146+ tokens : 1_000_000 ,
147+ input : 8 ,
148+ output : 32 ,
149+ } ,
150+ max_tokens : 8192 ,
151+ } ,
152+ {
153+ id : 'gemini-2.5-flash' ,
154+ name : 'Gemini 2.5 Flash' ,
155+ context : 1_048_576 ,
156+ cost : {
157+ currency : 'usd-cents' ,
158+ tokens : 1_000_000 ,
159+ input : 12 ,
160+ output : 48 ,
161+ } ,
162+ max_tokens : 65536 ,
163+ } ,
164+ {
165+ id : 'gemini-2.5-flash-lite' ,
166+ name : 'Gemini 2.5 Flash-Lite' ,
167+ context : 1_048_576 ,
168+ cost : {
169+ currency : 'usd-cents' ,
170+ tokens : 1_000_000 ,
171+ input : 10 ,
172+ output : 40 ,
173+ } ,
174+ max_tokens : 65536 ,
175+ } ,
176+ {
177+ id : 'gemini-2.5-pro' ,
178+ name : 'Gemini 2.5 Pro' ,
179+ context : 1_048_576 ,
180+ cost : {
181+ currency : 'usd-cents' ,
182+ tokens : 1_000_000 ,
183+ input : 15 ,
184+ output : 60 ,
185+ } ,
186+ max_tokens : 65536 ,
187+ } ,
188+ {
189+ id : 'gemini-3-pro-preview' ,
190+ name : 'Gemini 3 Pro' ,
191+ context : 1_048_576 ,
192+ cost : {
193+ currency : 'usd-cents' ,
194+ tokens : 1_000_000 ,
195+ input : 25 ,
196+ output : 100 ,
197+ } ,
198+ max_tokens : 65536 ,
199+ } ,
140200 ] ;
141201 }
142202}
Original file line number Diff line number Diff line change @@ -141,7 +141,9 @@ module.exports = class GeminiSquareHole {
141141
142142 // assume text as default
143143 const text = part . text ;
144- textblock . addText ( text ) ;
144+ if ( text ) {
145+ textblock . addText ( text ) ;
146+ }
145147 }
146148
147149 last_usage = chunk . usageMetadata ;
Original file line number Diff line number Diff line change @@ -788,7 +788,12 @@ class AI{
788788 }
789789 else if (
790790 requestParams . model === 'gemini-1.5-flash' ||
791- requestParams . model === 'gemini-2.0-flash'
791+ requestParams . model === 'gemini-2.0-flash' ||
792+ requestParams . model === 'gemini-2.5-flash' ||
793+ requestParams . model === 'gemini-2.5-flash-lite' ||
794+ requestParams . model === 'gemini-2.0-flash-lite' ||
795+ requestParams . model === 'gemini-3-pro-preview' ||
796+ requestParams . model === 'gemini-2.5-pro'
792797 ) {
793798 driver = 'gemini' ;
794799 }
You can’t perform that action at this time.
0 commit comments