( model: string | undefined, )
| 169 | * Different models may be available in different regions. |
| 170 | */ |
| 171 | export function getVertexRegionForModel( |
| 172 | model: string | undefined, |
| 173 | ): string | undefined { |
| 174 | if (model) { |
| 175 | const match = VERTEX_REGION_OVERRIDES.find(([prefix]) => |
| 176 | model.startsWith(prefix), |
| 177 | ) |
| 178 | if (match) { |
| 179 | return process.env[match[1]] || getDefaultVertexRegion() |
| 180 | } |
| 181 | } |
| 182 | return getDefaultVertexRegion() |
| 183 | } |
no test coverage detected