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

Function getModelBySlug

apps/sim/app/(landing)/models/utils.ts:612–619  ·  view source on GitHub ↗
(providerSlug: string, modelSlug: string)

Source from the content-addressed store, hash-verified

610}
611
612export function getModelBySlug(providerSlug: string, modelSlug: string): CatalogModel | null {
613 const provider = getProviderBySlug(providerSlug)
614 if (!provider) {
615 return null
616 }
617
618 return provider.models.find((model) => model.slug === modelSlug) ?? null
619}
620
621export function getRelatedModels(targetModel: CatalogModel, limit = 6): CatalogModel[] {
622 const provider = MODEL_PROVIDERS_WITH_CATALOGS.find(

Callers 4

utils.test.tsFile · 0.90
generateMetadataFunction · 0.90
ModelPageFunction · 0.90
ImageFunction · 0.90

Calls 1

getProviderBySlugFunction · 0.85

Tested by

no test coverage detected