(
resolvedModel: string,
originalSpec: string,
)
| 56 | // with the parent's prefix. This prevents silent data-residency violations when |
| 57 | // an agent config intentionally pins to a different region than the parent. |
| 58 | const applyParentRegionPrefix = ( |
| 59 | resolvedModel: string, |
| 60 | originalSpec: string, |
| 61 | ): string => { |
| 62 | if (parentRegionPrefix && getAPIProvider() === 'bedrock') { |
| 63 | if (getBedrockRegionPrefix(originalSpec)) return resolvedModel |
| 64 | return applyBedrockRegionPrefix(resolvedModel, parentRegionPrefix) |
| 65 | } |
| 66 | return resolvedModel |
| 67 | } |
| 68 | |
| 69 | // Prioritize tool-specified model if provided |
| 70 | if (toolSpecifiedModel) { |
no test coverage detected