MCPcopy Index your code
hub / github.com/simstudioai/sim / getAllModelProviders

Function getAllModelProviders

apps/sim/providers/utils.ts:251–261  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

249}
250
251export function getAllModelProviders(): Record<string, ProviderId> {
252 return Object.entries(providers).reduce(
253 (map, [providerId, config]) => {
254 config.models.forEach((model) => {
255 map[model.toLowerCase()] = providerId as ProviderId
256 })
257 return map
258 },
259 {} as Record<string, ProviderId>
260 )
261}
262
263export function getProviderFromModel(model: string): ProviderId {
264 const normalizedModel = model.toLowerCase()

Callers 2

utils.test.tsFile · 0.90
getProviderFromModelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected