( model: string | undefined, )
| 131 | } |
| 132 | |
| 133 | export function resolveNCodeManagedModel( |
| 134 | model: string | undefined, |
| 135 | ): NCodeManagedModelProfile | undefined { |
| 136 | if (!model) return undefined |
| 137 | const normalized = model.trim().toLowerCase() |
| 138 | const exactMatch = NCODE_MANAGED_MODEL_PROFILES.find(profile => { |
| 139 | if (normalized === profile.model.toLowerCase()) return true |
| 140 | if ((profile.aliases as readonly string[]).includes(normalized)) return true |
| 141 | return false |
| 142 | }) |
| 143 | if (exactMatch) return exactMatch |
| 144 | |
| 145 | return NCODE_MANAGED_MODEL_PROFILES.find(profile => { |
| 146 | return normalized.includes(profile.model.toLowerCase()) |
| 147 | }) |
| 148 | } |
| 149 | |
| 150 | export function getNCodeManagedModelOptions(): Array<{ |
| 151 | value: string |
no outgoing calls
no test coverage detected