(providers: readonly ConfigOptionProvider[], model: ModelSelection["model"])
| 191 | } |
| 192 | |
| 193 | function variantsForModel(providers: readonly ConfigOptionProvider[], model: ModelSelection["model"]) { |
| 194 | return Object.keys( |
| 195 | providers.find((provider) => provider.id === model.providerID)?.models[model.modelID]?.variants ?? {}, |
| 196 | ) |
| 197 | } |
| 198 | |
| 199 | function selectVariant(variant: string | undefined, variants: readonly string[]) { |
| 200 | if (variant && variants.includes(variant)) return variant |
no test coverage detected