(modelId: string)
| 120 | } |
| 121 | |
| 122 | function codexBaseModelId(modelId: string): string | null { |
| 123 | if (!modelId.includes("codex")) { |
| 124 | return null |
| 125 | } |
| 126 | |
| 127 | const withoutEffort = modelId.replace(/-codex(-max)?-(low|medium|high|xhigh)$/i, "-codex$1") |
| 128 | const stripped = withoutEffort.replace(/-codex(-max)?$/i, "") |
| 129 | if (!stripped || stripped === modelId) { |
| 130 | return null |
| 131 | } |
| 132 | |
| 133 | return stripped |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * Normalize model ID for matching (handle version number formats) |
no outgoing calls
no test coverage detected