MCPcopy Create free account
hub / github.com/Noumena-Network/code / getVertexRegionForModel

Function getVertexRegionForModel

src/utils/envUtils.ts:207–219  ·  view source on GitHub ↗
(
  model: string | undefined,
)

Source from the content-addressed store, hash-verified

205 * Different models may be available in different regions.
206 */
207export 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}

Callers 2

getAnthropicClientFunction · 0.85

Calls 1

getDefaultVertexRegionFunction · 0.85

Tested by

no test coverage detected