Skip to content

Remove Foundry-Features V1Preview headers for GA#8866

Open
trangevi wants to merge 2 commits into
mainfrom
trangevi/remove-foundry-preview-headers
Open

Remove Foundry-Features V1Preview headers for GA#8866
trangevi wants to merge 2 commits into
mainfrom
trangevi/remove-foundry-preview-headers

Conversation

@trangevi

Copy link
Copy Markdown
Member

Why

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

What changed

Removed all Foundry-Features header lines containing V1Preview values across 4 extensions (11 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.routines -- Routines=V1Preview from client.go
  • azure.ai.skills -- Skills=V1Preview from client.go
  • azure.ai.toolboxes -- Toolboxes=V1Preview from foundry_toolsets_client.go

Associated constants, helper functions (addPreviewHeader, updated addStandardHeaders), and test assertions were also removed or updated.

Not in scope

AgentsOptimization=V2Preview in optimize_api/client.go is intentionally left in place -- it uses a different preview version for a feature that is not yet GA.

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

3 participants