Skip to content

Remove Foundry-Features V1Preview headers for GA#8866

Merged
huimiu merged 3 commits into
mainfrom
trangevi/remove-foundry-preview-headers
Jul 6, 2026
Merged

Remove Foundry-Features V1Preview headers for GA#8866
huimiu merged 3 commits into
mainfrom
trangevi/remove-foundry-preview-headers

Conversation

@trangevi

@trangevi trangevi commented Jun 29, 2026

Copy link
Copy Markdown
Member

Why

Foundry APIs for hosted agents, code agents, and toolboxes are now GA and no longer require the Foundry-Features: *=V1Preview opt-in header. These headers were added during preview to gate access to those features. With GA, they are unnecessary and should be cleaned up.

What changed

Removed all Foundry-Features header lines containing V1Preview values across 2 extensions (7 files total):

  • azure.ai.agents -- HostedAgents=V1Preview, CodeAgents=V1Preview,HostedAgents=V1Preview, and Toolboxes=V1Preview from operations.go, invoke.go, and foundry_toolsets_client.go
  • azure.ai.toolboxes -- Toolboxes=V1Preview from foundry_toolsets_client.go

Associated constants, helper functions, comments, and test assertions were also removed or updated.

Not in scope

  • AgentsOptimization=V2Preview in optimize_api/client.go -- different preview version for a feature that is not yet GA.
  • Skills=V1Preview in azure.ai.skills -- Skills API is still in preview.
  • Routines=V1Preview in azure.ai.routines -- Routines API is still in preview.

Fixes: #8186

Foundry APIs are now GA and no longer require the preview opt-in
header. Remove all Foundry-Features header lines containing V1Preview
values across extensions:

- azure.ai.agents: HostedAgents=V1Preview, CodeAgents=V1Preview,
  Toolboxes=V1Preview
- azure.ai.routines: Routines=V1Preview
- azure.ai.skills: Skills=V1Preview
- azure.ai.toolboxes: Toolboxes=V1Preview

The AgentsOptimization=V2Preview header in optimize_api is intentionally
left in place as it uses a different preview version.

Fixes #8186

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 29, 2026 21:48
@github-actions

Copy link
Copy Markdown

📋 Prioritization Note

Thanks for the contribution! The linked issue isn't in the current milestone yet.
Thank you for logging this issue; our team is reviewing it. If you need urgent prioritization, tag @RickWinter and @kristenwomack to let us know.

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 removes the Foundry-Features: *=V1Preview opt-in headers from multiple Foundry data-plane clients across azd’s first-party Azure AI extensions now that the corresponding Foundry APIs are GA (Fixes #8186).

Changes:

  • Removed Foundry-Features V1Preview header injection from the Toolboxes, Skills, Routines, and Agents extension clients.
  • Removed related preview constants/helpers and updated inline comments accordingly.
  • Updated unit tests to stop asserting presence of the removed preview headers.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
cli/azd/extensions/azure.ai.toolboxes/internal/pkg/azure/foundry_toolsets_client.go Stops sending the Toolboxes V1Preview opt-in header on requests.
cli/azd/extensions/azure.ai.skills/internal/pkg/skill_api/client.go Removes Skills preview header constants and no longer sets the preview opt-in header.
cli/azd/extensions/azure.ai.skills/internal/pkg/skill_api/client_test.go Updates tests to stop asserting the removed Skills preview header.
cli/azd/extensions/azure.ai.routines/internal/pkg/routines/client.go Removes Routines preview header constants/helper and no longer sends the preview header.
cli/azd/extensions/azure.ai.routines/internal/pkg/routines/client_test.go Updates tests to stop asserting the removed Routines preview header.
cli/azd/extensions/azure.ai.agents/internal/pkg/azure/foundry_toolsets_client.go Stops sending the Toolboxes V1Preview opt-in header in agents toolbox client calls.
cli/azd/extensions/azure.ai.agents/internal/pkg/azure/foundry_toolsets_client_test.go Updates tests to stop asserting the removed Toolboxes preview header.
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_api/operations.go Removes HostedAgents/CodeAgents V1Preview header usage across agent operations.
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_api/operations_test.go Updates tests to stop asserting preview header behavior for agent operations.
cli/azd/extensions/azure.ai.agents/internal/cmd/invoke.go Stops sending HostedAgents V1Preview opt-in header in remote invoke flows.
cli/azd/extensions/azure.ai.agents/internal/cmd/invoke_test.go Updates tests to stop asserting the removed preview header in invoke-related requests.

@github-actions github-actions Bot added area/extensions Extensions (general) ext-agents azure.ai.agents extension labels Jun 29, 2026

@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.

Clean removal of the V1Preview feature headers. The scope is well-defined, the AgentsOptimization=V2Preview exclusion is correctly justified, and the test assertions tracking these headers are removed alongside the production code.

One issue worth addressing: TestDownloadAgentCode_SetsFeatureHeader in operations_test.go is now an empty test body (just calls the function + NoError + Close). Its raison d'etre was the assertion you removed. Either delete it or repurpose it to verify something else about DownloadAgentCode that isn't already covered by TestDownloadAgentCode_ReturnsResponseHeaders.

Minor nit: the mechanical removal left a few double blank lines in operations.go (~line 364, ~975), oundry_toolsets_client.go (agents extension, ~lines 114, 160, 199), and client.go (routines, ~line 116). A quick goimports pass or manual cleanup would tidy those up.

- Run gofmt to fix extra blank lines left by mechanical removal
- Delete TestDownloadAgentCode_SetsFeatureHeader (now empty after
  header assertion was removed; already covered by
  TestDownloadAgentCode_ReturnsResponseHeaders)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added ext-routines azure.ai.routines extension ext-skills azure.ai.skills extension ext-toolboxes azure.ai.toolboxes extension labels Jun 30, 2026

@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.

Prior findings addressed. Looks good.

@huimiu

huimiu commented Jul 2, 2026

Copy link
Copy Markdown
Member
  • azd ai skill list and azd ai routine list fail with 403 after the header removal — the service still returns: "This operation requires the following opt-in preview feature(s): Skills=V1Preview / Routines=V1Preview."
  • agents and toolboxes are fine without the header.

@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.

Based on @huimiu's testing, the Skills and Routines services still require their V1Preview headers. Removing them causes 403 responses:

"This operation requires the following opt-in preview feature(s): Skills=V1Preview / Routines=V1Preview."

Agents and toolboxes are confirmed working without headers.

Action needed: Restore the Foundry-Features headers for azure.ai.skills and azure.ai.routines. Only the agents and toolboxes header removals should ship in this PR.

Comment thread cli/azd/extensions/azure.ai.skills/internal/pkg/skill_api/client.go Outdated
Comment thread cli/azd/extensions/azure.ai.routines/internal/pkg/routines/client.go Outdated
Skills and Routines APIs are still in preview, so keep their
Foundry-Features V1Preview opt-in headers in place.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@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.

Skills and routines preview headers restored correctly. Tests verify the header presence. Agents and toolboxes remain header-free as intended.

@RickWinter RickWinter 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 removes the Foundry-Features: *=V1Preview opt-in headers (and their constants, helpers, and test assertions) from the agents and toolboxes extensions now that the hosted-agents, code-agents, and toolboxes APIs are GA. The change is a straightforward, mechanical deletion and the shape is correct: it drops the header set calls and the tests that asserted them, and the scope note correctly leaves the still-preview surfaces alone (AgentsOptimization=V2Preview, Skills=V1Preview, Routines=V1Preview).

The only correctness dependency is external: this is safe exactly when every endpoint these clients hit no longer gates on the header. That is an assertion about the deployed Foundry service that the diff itself can't prove, so it rests on the linked GA rollout. Nothing in the code needs to change. No inline comments, and nothing blocks.

@huimiu huimiu merged commit a4cf4a9 into main Jul 6, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/extensions Extensions (general) ext-agents azure.ai.agents extension ext-routines azure.ai.routines extension ext-skills azure.ai.skills extension ext-toolboxes azure.ai.toolboxes extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove preview headers sent to Foundry Services for GA

5 participants