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

Function getAttachmentProvider

apps/sim/providers/attachments.ts:144–163  ·  view source on GitHub ↗
(providerId: ProviderId | string)

Source from the content-addressed store, hash-verified

142}
143
144export function getAttachmentProvider(providerId: ProviderId | string): AttachmentProvider | null {
145 if (providerId === 'openai' || providerId === 'azure-openai') return 'openai'
146 if (providerId === 'anthropic' || providerId === 'azure-anthropic') return 'anthropic'
147 if (providerId === 'google' || providerId === 'vertex') return 'google'
148 if (providerId === 'bedrock') return 'bedrock'
149 if (providerId === 'openrouter') return 'openrouter'
150 if (providerId === 'mistral') return 'mistral'
151 if (providerId === 'groq') return 'groq'
152 if (providerId === 'fireworks') return 'fireworks'
153 if (providerId === 'together') return 'together'
154 if (providerId === 'baseten') return 'baseten'
155 if (providerId === 'ollama' || providerId === 'ollama-cloud') return 'ollama'
156 if (providerId === 'vllm') return 'vllm'
157 if (providerId === 'litellm') return 'litellm'
158 if (providerId === 'xai') return 'xai'
159 if (providerId === 'deepseek') return 'deepseek'
160 if (providerId === 'cerebras') return 'cerebras'
161 if (providerId === 'sakana') return 'sakana'
162 return null
163}
164
165export function supportsFileAttachments(providerId: ProviderId | string): boolean {
166 const provider = getAttachmentProvider(providerId)

Callers 3

supportsFileAttachmentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected