(modelId: string)
| 149 | } |
| 150 | |
| 151 | function copilotModelCandidates(modelId: string): string[] { |
| 152 | const base = extractModelId(modelId).toLowerCase() |
| 153 | const candidates = new Set([base]) |
| 154 | const queue = [base] |
| 155 | const transforms = [stripThinkingSuffix, stripReasoningEffort] |
| 156 | |
| 157 | while (queue.length > 0) { |
| 158 | const current = queue.pop() |
| 159 | if (!current) continue |
| 160 | for (const transform of transforms) { |
| 161 | const next = transform(current) |
| 162 | if (!candidates.has(next)) { |
| 163 | candidates.add(next) |
| 164 | queue.push(next) |
| 165 | } |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | return Array.from(candidates) |
| 170 | } |
| 171 | |
| 172 | /** |
| 173 | * Get pricing information for a specific model (sync - cached data only) |
no test coverage detected