(def: ProviderDefinition)
| 77 | } |
| 78 | |
| 79 | function providerDefinitionToInfo(def: ProviderDefinition): ProviderInfo { |
| 80 | const models = getBuiltinModelsByProvider(def.id) |
| 81 | return { |
| 82 | id: def.id, |
| 83 | name: def.name, |
| 84 | defaultBaseUrl: def.defaultBaseUrl, |
| 85 | models: models |
| 86 | .filter((m) => !m.capabilities.includes('embedding') && !m.capabilities.includes('ranking')) |
| 87 | .map((m) => ({ id: m.id, name: m.name, description: m.description })), |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | export const PROVIDERS: ProviderInfo[] = BUILTIN_PROVIDERS.map(providerDefinitionToInfo) |
| 92 |
nothing calls this directly
no test coverage detected