Skip to content

feat: default new agents to invocations protocol 2.0.0 - #9327

Merged
trangevi merged 1 commit into
mainfrom
hui/update-invocations-protocol-to-2-0-0
Jul 28, 2026
Merged

feat: default new agents to invocations protocol 2.0.0#9327
trangevi merged 1 commit into
mainfrom
hui/update-invocations-protocol-to-2-0-0

Conversation

@huimiu

@huimiu huimiu commented Jul 28, 2026

Copy link
Copy Markdown
Member

Fixes #9153

Why

invocations was the last protocol still pinned to 1.0.0 in azd ai agent init. responses, invocations_ws, and activity all moved to 2.0.0 already, so new agents were opting into a stale contract for no reason.

Approach

The defaults live in one knownProtocols table that feeds both init paths (local code and --image), so a single entry change keeps them consistent.

  • Existing manifests are untouched. Projects pinning 1.0.0 keep deploying as authored — no silent upgrade.
  • No client-side changes needed. azd routes on protocol name, never version; the version is a pass-through string in the hosted-agent request body.

Validation

Scenario Result
Local-code init with --no-prompt --protocol invocations Generated invocations/2.0.0
BYO-image init with --no-prompt --protocol invocations Preserved the image and generated invocations/2.0.0
Interactive local-code init selecting responses and invocations Generated both protocols at 2.0.0

Copilot AI review requested due to automatic review settings July 28, 2026 05:51
@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.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
21 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

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

Updates newly scaffolded agents to use invocations protocol version 2.0.0 while preserving existing manifests.

Changes:

  • Updates the shared invocations protocol default.
  • Adjusts interactive and flag-driven test expectations.
  • Adds regression coverage for image-based initialization.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
internal/cmd/init_from_code.go Sets the invocations default to 2.0.0.
internal/cmd/init_from_code_test.go Updates protocol-selection expectations.
internal/cmd/init_test.go Tests image-manifest synthesis with invocations 2.0.0.

@github-actions github-actions Bot added the ext-agents azure.ai.agents extension label Jul 28, 2026
Copilot AI review requested due to automatic review settings July 28, 2026 06:22
@huimiu
huimiu force-pushed the hui/update-invocations-protocol-to-2-0-0 branch from 0f193f6 to faa8e96 Compare July 28, 2026 06:22

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

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

Verified the change:

  • knownProtocols is the only source for both affected paths: interactive and flag selection in init_from_code.go, and --image manifest synthesis in init.go. There is no second default table to keep in sync.
  • Nothing client side branches on protocol version. protocolFromContainerAgent and the endpoint URL builders route on protocol name, and map.go passes the version straight through into protocol_versions. The only version comparison left in the extension is the legacy "v1" to "1.0.0" normalization in optimize_deploy.go, which this doesn't touch.
  • The schema types version as a plain string, so no validation surface moves.
  • The official Foundry sample at bring-your-own/invocations/hello-world already declares invocations at 2.0.0, so this lines azd up with what the samples already ship instead of introducing a new default.
  • The 1.0.0 fixtures in state_test.go and the yaml testdata stay valid as back compat parse coverage.
  • No help text, flag description, or doc references the protocol version, so nothing drifts out of sync.

Skipping the CHANGELOG matches current practice for this extension: everything merged since the 2026-07-23 release cut left it alone and the release prep PR batches the entries.

No findings.

@trangevi
trangevi merged commit dc8b86a into main Jul 28, 2026
34 checks passed
@huimiu
huimiu deleted the hui/update-invocations-protocol-to-2-0-0 branch July 29, 2026 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext-agents azure.ai.agents extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Agents Extension] Update Invocations Protocol to 2.0.0

4 participants