Update price calculation in openRouterModels function
This commit is contained in:
@@ -15,7 +15,7 @@ export async function openRouterModels() {
|
||||
const res = await (await aim).json()
|
||||
return res.data.map((model: any) => {
|
||||
let name = model.name
|
||||
let price = model.pricing.prompt
|
||||
let price = ((model.pricing.prompt * 3) + model.pricing.completion) / 4
|
||||
if(price > 0){
|
||||
name += ` - $${(price*1000).toFixed(5)}/1k`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user