MCPcopy Create free account
hub / github.com/TanStack/ai / finalPrice

Function finalPrice

scripts/convert-openrouter-models.ts:37–42  ·  view source on GitHub ↗
(price: number)

Source from the content-addressed store, hash-verified

35 return finalPrice(isNaN(price) ? 0 : price)
36}
37function finalPrice(price: number): number {
38 // Ensure price is non-negative and rounded to avoid floating-point errors
39 const result = price * 1_000_000
40 // Round to a reasonable number of decimal places
41 return Math.round(result * 1e10) / 1e10
42}
43const perModelProviderOptions: Record<string, string> = {}
44const perModelInputModalities: Record<string, string> = {}
45

Callers 1

convertPricingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected