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

Function getProviderFromStore

apps/sim/blocks/utils.ts:151–160  ·  view source on GitHub ↗
(model: string)

Source from the content-addressed store, hash-verified

149}
150
151function getProviderFromStore(model: string): string | null {
152 const { providers } = useProvidersStore.getState()
153 const normalized = model.toLowerCase()
154 for (const [key, state] of Object.entries(providers)) {
155 if (state.models.some((m: string) => m.toLowerCase() === normalized)) {
156 return key
157 }
158 }
159 return null
160}
161
162function buildModelVisibilityCondition(model: string, shouldShow: boolean) {
163 if (!model) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected