mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-06 09:30:49 +00:00
fix: openrouter costs always being 0 (#2250)
This commit is contained in:
@@ -136,7 +136,7 @@ export class OpenRouterProvider implements IChatProvider {
|
||||
if ( (model.id as string).includes('openrouter/auto') ) {
|
||||
continue;
|
||||
}
|
||||
const microcentCosts = Object.fromEntries(Object.entries(model.pricing).map(([k, v]) => [k, Math.round((v as number < 0 ? 1 : 0) * 1_000_000 * 100)])) ;
|
||||
const microcentCosts = Object.fromEntries(Object.entries(model.pricing).map(([k, v]) => [k, Math.round((v as number < 0 ? 1 : v as number) * 1_000_000 * 100)])) ;
|
||||
coerced_models.push({
|
||||
id: `openrouter:${model.id}`,
|
||||
name: `${model.name} (OpenRouter)`,
|
||||
|
||||
Reference in New Issue
Block a user