* Synthetic suffixes the dropdown uses to opt the route into reasoning * modes that aren't first-class on the wire (e.g. "Opus 4.7 with max * adaptive thinking"). The suffix is stripped before reaching the * adapter. Currently `:thinking-max` is the only one defined.
(model: string | undefined)
| 129 | * adapter. Currently `:thinking-max` is the only one defined. |
| 130 | */ |
| 131 | function stripModelSuffix(model: string | undefined): string | undefined { |
| 132 | if (!model) return model |
| 133 | const colonIdx = model.indexOf(':') |
| 134 | return colonIdx === -1 ? model : model.slice(0, colonIdx) |
| 135 | } |
| 136 | |
| 137 | function adapterFor(provider: Provider, model?: string): AnyTextAdapter { |
| 138 | const baseModel = stripModelSuffix(model) |
no outgoing calls
no test coverage detected