MCPcopy Create free account
hub / github.com/simstudioai/sim / getCheapestProviderModel

Function getCheapestProviderModel

apps/sim/app/(landing)/models/utils.ts:815–818  ·  view source on GitHub ↗
(provider: CatalogProvider)

Source from the content-addressed store, hash-verified

813}
814
815export function getCheapestProviderModel(provider: CatalogProvider): CatalogModel | null {
816 if (provider.models.length === 0) return null
817 return provider.models.reduce((min, m) => (m.pricing.input < min.pricing.input ? m : min))
818}
819
820export function getLargestContextProviderModel(provider: CatalogProvider): CatalogModel | null {
821 if (provider.models.length === 0) return null

Callers 2

ImageFunction · 0.90
buildProviderFaqsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected