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

Function buildProviderMetadata

apps/sim/providers/utils.ts:118–129  ·  view source on GitHub ↗

* Build provider metadata from PROVIDER_DEFINITIONS. * This is client-safe as it doesn't import any provider implementations.

(providerId: ProviderId)

Source from the content-addressed store, hash-verified

116 * This is client-safe as it doesn't import any provider implementations.
117 */
118function buildProviderMetadata(providerId: ProviderId): ProviderMetadata {
119 const def = PROVIDER_DEFINITIONS[providerId]
120 return {
121 id: providerId,
122 name: def?.name || providerId,
123 description: def?.description || '',
124 version: '1.0.0',
125 models: getProviderModelsFromDefinitions(providerId),
126 defaultModel: getProviderDefaultModelFromDefinitions(providerId),
127 modelPatterns: def?.modelPatterns,
128 }
129}
130
131export const providers: Record<ProviderId, ProviderMetadata> = {
132 ollama: buildProviderMetadata('ollama'),

Callers 1

utils.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected