chore(ai-agents): trim supportedHostedAgentRegions list - #7929
Conversation
Remove canadaeast, centralus, eastus, germanywestcentral, italynorth, southcentralus, uaenorth, uksouth, and westeurope from the hosted-agent regions allow-list used by `azd ai agent init`.
ca9269d to
ea1e219
Compare
There was a problem hiding this comment.
Pull request overview
This PR trims the hardcoded supportedHostedAgentRegions allow-list used by the azure.ai.agents extension during azd ai agent init to constrain both the location prompt and the model-location filtering to the currently supported hosted-agent regions.
Changes:
- Removed 9 Azure regions from the
supportedHostedAgentRegionshardcoded list. - Narrowed the effective region set used by
supportedRegionsForInit()andsupportedModelLocations().
| var supportedHostedAgentRegions = []string{ | ||
| "australiaeast", | ||
| "brazilsouth", | ||
| "canadacentral", | ||
| "canadaeast", | ||
| "centralus", | ||
| "eastus", | ||
| "eastus2", |
There was a problem hiding this comment.
This change removes eastus (and other regions) from the allow-list, but init_locations_test.go still treats eastus as supported (e.g., AllSupported / SomeUnsupported). As-is, go test will fail; update those test cases to use a currently-supported region (e.g., eastus2) and adjust the expected lengths accordingly.
jongio
left a comment
There was a problem hiding this comment.
CI is failing on all three platforms - the tests in init_locations_test.go use eastus (which this PR removes) as test data. The AllSupported and SomeUnsupported cases need their inputs swapped to a region that remains in the list (e.g., eastus2). The mutation test on line 74 should be updated too.
Separate question: the code comment on line 8-9 references the hosted agents region docs, which currently lists only 4 regions (Australia East, Canada Central, North Central US, Sweden Central). After this PR, the list still has 18 regions. Is the code tracking a different/internal source, or are there more regions to trim? Might be worth updating the comment to point at the actual source if it's different from the public docs.
|
closed in favor of #7930 |
Trims the
supportedHostedAgentRegionsallow-list ininit_locations.go(used byazd ai agent initfor the location prompt and model-location filter). Removes: canadaeast, centralus, eastus, germanywestcentral, italynorth, southcentralus, uaenorth, uksouth, westeurope.