(rawModel: unknown, fallbackModel: string)
| 23 | |
| 24 | /** Normalize a preferred model string for routing while preserving explicit gateway choices. */ |
| 25 | export function normalizeModelPreference(rawModel: unknown, fallbackModel: string): string { |
| 26 | const trimmed = |
| 27 | typeof rawModel === "string" && rawModel.trim().length > 0 ? rawModel.trim() : null; |
| 28 | return normalizeSelectedModel(trimmed ?? fallbackModel); |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Construct SendMessageOptions from normalized inputs. |
no test coverage detected