Draft
fix(agents): make invocations_ws protocol priority order-independent in loadServiceProtocol#9192
Conversation
|
Azure Pipelines: 20 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
…erviceProtocol Fixes review comment r3601867100 on PR #9009. The original code returned ProtocolInvocationsWS immediately when encountered in the protocols list, making the selection order-dependent. If invocations_ws appeared before invocations in the list, the function would return early without checking for the higher-priority invocations protocol. The fix uses the same flag-based approach as invocations: track sawInvocationsWS and only return ProtocolInvocationsWS if neither responses nor invocations was found. Priority order is now: responses > invocations > invocations_ws (order-independent). Also includes the full PR 9009 changes: - Add invocations_ws to knownProtocols in init_from_code.go - Support --protocol invocations_ws in synthesizeImageManifestFile - Add invocations_ws to schema description - Add westus2 to hosted-agent-regions.json - Add VOICELIVE to cspell dictionary - Add tests for all new behavior Co-authored-by: v1212 <49907914+v1212@users.noreply.github.com>
- Use knownProtocols[0] for default protocol in protocolRecordsForImageManifest to avoid hardcoding 'responses' 2.0.0 in two places - Add flagProtocols parameter documentation to synthesizeImageManifestFile Co-authored-by: v1212 <49907914+v1212@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix the code for review comment on PR 9009
fix(agents): make invocations_ws protocol priority order-independent in loadServiceProtocol
Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
loadServiceProtocolreturnedProtocolInvocationsWSimmediately on first match, so a manifest listinginvocations_wsbeforeinvocationswould shadow the higher-priority invocable protocol. The selection should be deterministic regardless of declaration order.Fix
Changed
state.goto tracksawInvocationsWSwith a flag (same pattern assawInvocations) instead of returning early. Priority is now enforced post-loop:responses > invocations > invocations_ws.Also included (PR #9009 base changes)
resolver.go: AddedProtocolInvocationsWS = "invocations_ws"constant; suppress invoke hints inappendInvokeLocalSecondaryfor WS agents (not invocable viaazd ai agent invoke)init_from_code.go: Addedinvocations_wstoknownProtocolswith version2.0.0init.go: Plumbed--protocol invocations_wsthroughsynthesizeImageManifestFile; default protocol now usesknownProtocols[0]instead of a hardcoded literalschemas/azure.ai.agent.json: Addedinvocations_wsto protocol field descriptionshosted-agent-regions.json: Addedwestus2invocations_ws,responseswins over WS regardless of order,invocationswins over WS regardless of order