MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / getPrefixForRegion

Method getPrefixForRegion

src/api/providers/bedrock.ts:1342–1352  ·  view source on GitHub ↗

* * AMAZON REGIONS *

(region: string)

Source from the content-addressed store, hash-verified

1340 *************************************************************************************/
1341
1342 private static getPrefixForRegion(region: string): string | undefined {
1343 // Use AWS recommended inference profile prefixes
1344 // Array is pre-sorted by pattern length (descending) to ensure more specific patterns match first
1345 for (const [regionPattern, inferenceProfile] of AWS_INFERENCE_PROFILE_MAPPING) {
1346 if (region.startsWith(regionPattern)) {
1347 return inferenceProfile
1348 }
1349 }
1350
1351 return undefined
1352 }
1353
1354 private static isSystemInferenceProfile(prefix: string): boolean {
1355 // Check if the prefix is defined in AWS_INFERENCE_PROFILE_MAPPING

Callers 2

getModelMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected