Cast-free runtime guard: is this model in the Chat-capable subset?
(model: string)
| 45 | |
| 46 | /** Cast-free runtime guard: is this model in the Chat-capable subset? */ |
| 47 | function isChatModel(model: string): model is BedrockChatModels { |
| 48 | return BEDROCK_CHAT_MODELS.some((m) => m === model) |
| 49 | } |
| 50 | |
| 51 | /** Strip the `api` discriminator from a config without an unused-var lint error. */ |
| 52 | function stripApi<T extends { api?: unknown }>(config: T): Omit<T, 'api'> { |