( model: string | undefined, )
| 205 | * Different models may be available in different regions. |
| 206 | */ |
| 207 | export function getVertexRegionForModel( |
| 208 | model: string | undefined, |
| 209 | ): string | undefined { |
| 210 | if (model) { |
| 211 | const match = VERTEX_REGION_OVERRIDES.find(([prefix]) => |
| 212 | model.startsWith(prefix), |
| 213 | ) |
| 214 | if (match) { |
| 215 | return process.env[match[1]] || getDefaultVertexRegion() |
| 216 | } |
| 217 | } |
| 218 | return getDefaultVertexRegion() |
| 219 | } |
no test coverage detected