Skip to content

chore(ai-agents): trim supportedHostedAgentRegions list - #7929

Closed
antriksh30 wants to merge 1 commit into
Azure:mainfrom
antriksh30:antriksh30/trim-hosted-agent-regions
Closed

chore(ai-agents): trim supportedHostedAgentRegions list#7929
antriksh30 wants to merge 1 commit into
Azure:mainfrom
antriksh30:antriksh30/trim-hosted-agent-regions

Conversation

@antriksh30

@antriksh30 antriksh30 commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Trims the supportedHostedAgentRegions allow-list in init_locations.go (used by azd ai agent init for the location prompt and model-location filter). Removes: canadaeast, centralus, eastus, germanywestcentral, italynorth, southcentralus, uaenorth, uksouth, westeurope.

Remove canadaeast, centralus, eastus, germanywestcentral, italynorth, southcentralus, uaenorth, uksouth, and westeurope from the hosted-agent regions allow-list used by `azd ai agent init`.
@antriksh30
antriksh30 force-pushed the antriksh30/trim-hosted-agent-regions branch from ca9269d to ea1e219 Compare April 27, 2026 14:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 supportedHostedAgentRegions hardcoded list.
  • Narrowed the effective region set used by supportedRegionsForInit() and supportedModelLocations().

Comment on lines 10 to 14
var supportedHostedAgentRegions = []string{
"australiaeast",
"brazilsouth",
"canadacentral",
"canadaeast",
"centralus",
"eastus",
"eastus2",

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.

@jongio jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@trangevi trangevi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be closed in favor of #7930

@antriksh30 antriksh30 closed this Apr 27, 2026
@antriksh30

Copy link
Copy Markdown
Contributor Author

closed in favor of #7930

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants