(providerId: ProviderId | string)
| 142 | } |
| 143 | |
| 144 | export 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 | |
| 165 | export function supportsFileAttachments(providerId: ProviderId | string): boolean { |
| 166 | const provider = getAttachmentProvider(providerId) |
no outgoing calls
no test coverage detected