(
requested: string,
available: readonly { modelId: string }[]
)
| 85 | * Exact wire ids only — no legacy alias, base-only, or nearest-variant fallback. |
| 86 | */ |
| 87 | export function resolveCursorAcpWireId( |
| 88 | requested: string, |
| 89 | available: readonly { modelId: string }[] |
| 90 | ): string | null { |
| 91 | const trimmed = requested.trim(); |
| 92 | if (!trimmed) { |
| 93 | return null; |
| 94 | } |
| 95 | |
| 96 | const exact = available.find((entry) => entry.modelId === trimmed); |
| 97 | if (exact) { |
| 98 | return exact.modelId; |
| 99 | } |
| 100 | |
| 101 | return matchCliSkuToAcpWireId(trimmed, available); |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * Apply a model from the live ACP configOptions list (Zed-style). |
no test coverage detected