(apiConfiguration: ProviderSettings, provider: ProviderName)
| 191 | } |
| 192 | |
| 193 | function getModelIdForProvider(apiConfiguration: ProviderSettings, provider: ProviderName): string | undefined { |
| 194 | if (provider === "vscode-lm") { |
| 195 | return apiConfiguration.vsCodeLmModelSelector?.id |
| 196 | } |
| 197 | |
| 198 | if (isCustomProvider(provider) || isFauxProvider(provider)) { |
| 199 | return apiConfiguration.apiModelId |
| 200 | } |
| 201 | |
| 202 | return apiConfiguration[modelIdKeysByProvider[provider]] |
| 203 | } |
| 204 | |
| 205 | /** |
| 206 | * Validates an Amazon Bedrock ARN and optionally checks if the region in |
no test coverage detected