Support hosted voice conversation engine - #9948
Conversation
|
Azure Pipelines: Successfully started running 2 pipeline(s). 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. |
|
Azure Pipelines: Successfully started running 2 pipeline(s). 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. |
There was a problem hiding this comment.
🟡 Changes recommended
The schema rejects the new authoring shape, runtime validation permits ambiguous mixed forms, and added lines violate enforced lint limits.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds hosted Voice wrapper support using the new conversationEngine authoring and service payload while retaining the legacy format.
Changes:
- Adds schema and model types for conversation engines.
- Resolves hosted targets and emits
conversation_engine. - Adds round-trip and wire-format tests.
File summaries
| File | Description |
|---|---|
schemas/azure.ai.agent.json |
Defines the new authoring schema. |
internal/project/service_target_agent.go |
Resolves hosted conversation targets. |
internal/project/service_target_agent_test.go |
Tests inline round-tripping. |
internal/project/agent_definition.go |
Preserves the field in service definitions. |
internal/pkg/agents/agent_yaml/yaml.go |
Adds authoring model types. |
internal/pkg/agents/agent_yaml/parse.go |
Validates hosted wrapper configuration. |
internal/pkg/agents/agent_yaml/map.go |
Maps to the service wire format. |
internal/pkg/agents/agent_yaml/map_voice_test.go |
Tests the emitted payload. |
internal/pkg/agents/agent_api/models.go |
Adds the data-plane model. |
Review details
Suppressed comments (1)
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go:559
- This fallback also handles a legacy
target_agentsupplied withoutmodel_type, but the error now only namesconversation_engine. That sends users toward a field they did not configure; report each invalid shape separately.
if agent.TargetAgent != nil || agent.ConversationEngine != nil {
errors = append(errors,
"template.conversation_engine is only valid for hosted voice wrappers")
- Files reviewed: 9/9 changed files
- Comments generated: 8
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
Two lines still violate enforced lint limits, and one validation diagnostic is misleading.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (2)
Previously missed (1) — in code that hasn't changed since the last review.
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go:534
- This line is still 128 columns with tabs counted as width 4, exceeding the enforced 125-column limit in
cli/azd/AGENTS.md:115-126; split the message solllcan pass.
This issue also appears on line 595 of the same file.
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go:595
- This line is still 128 columns with tabs counted as width 4, exceeding the enforced 125-column limit in
cli/azd/AGENTS.md:115-126; wrap the condition solllcan pass.
(agent.ConversationEngine != nil && strings.EqualFold(strings.TrimSpace(agent.ConversationEngine.Type), "hosted_agent"))
- Files reviewed: 10/10 changed files
- Comments generated: 2
- Review effort level: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
Standalone initialization remains incomplete, and two changed Go lines violate the enforced line-length limit.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (2)
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go:534
- This added error string is 128 columns with tabs counted as width 4, so it fails the enforced 125-column
llllimit incli/azd/AGENTS.md:115-126. Split the literal across lines.
"template.conversation_engine.name is required when conversation_engine.type is 'hosted_agent'")
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go:599
- This condition is 128 columns with tabs counted as width 4, so it fails the enforced 125-column
llllimit incli/azd/AGENTS.md:115-126. Wrap theEqualFoldcall onto a continuation line.
(agent.ConversationEngine != nil && strings.EqualFold(strings.TrimSpace(agent.ConversationEngine.Type), "hosted_agent"))
- Files reviewed: 11/11 changed files
- Comments generated: 2
- Review effort level: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
Two changed Go lines still exceed the repository’s enforced 125-column limit.
Review details
Suppressed comments (2)
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go:534
- This line is still 128 columns with tabs counted as width 4, exceeding the enforced 125-column limit in
cli/azd/AGENTS.md:115-126. Split the message again so thelllcheck can pass.
"template.conversation_engine.name is required when conversation_engine.type is 'hosted_agent'")
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go:599
- This condition remains 128 columns with tabs counted as width 4, exceeding the enforced 125-column limit in
cli/azd/AGENTS.md:115-126. Wrap the second operand onto its own line solllaccepts it.
(agent.ConversationEngine != nil && strings.EqualFold(strings.TrimSpace(agent.ConversationEngine.Type), "hosted_agent"))
- Files reviewed: 12/12 changed files
- Comments generated: 0 new
- Review effort level: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
Legacy mapping remains active, validation and schema behavior diverge, and two added lines violate the enforced line-length limit.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (3)
cli/azd/extensions/azure.ai.agents/schemas/azure.ai.agent.json:297
- The published schema still accepts the legacy
modelType: hosted_agentplustargetAgentbranch above, while runtime validation now always rejects that shape. This makes editor/schema validation advertise a configuration that deterministically fails deployment; remove the legacy acceptance branch or add an explicit schema rejection for those fields.
{ "required": ["toolChoice"] },
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go:529
- This line is 128 columns with tabs counted as width 4, exceeding the repository's enforced 125-column Go limit (
cli/azd/AGENTS.md:115-126). Split the message so thelllcheck passes.
"template.conversation_engine.name is required when conversation_engine.type is 'hosted_agent'")
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go:590
- This line remains 128 columns with tabs counted as width 4, exceeding the repository's enforced 125-column Go limit (
cli/azd/AGENTS.md:115-126). Wrap the condition so thelllcheck passes.
(agent.ConversationEngine != nil && strings.EqualFold(strings.TrimSpace(agent.ConversationEngine.Type), "hosted_agent"))
- Files reviewed: 12/12 changed files
- Comments generated: 2
- Review effort level: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
The legacy authoring rejection conflicts with the linked issue’s compatibility requirement, and its migration error references the wrong field spelling for azure.yaml.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go:523
- This validation is also used for inline
azure.yamlservices, where the accepted property is camelCaseconversationEngine; telling those users to addconversation_enginesends them to a field that the inline decoder does not bind. Mention theazure.yamlspelling as well so the fail-fast remediation is actionable in both authoring formats.
- Files reviewed: 12/12 changed files
- Comments generated: 1
- Review effort level: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
Two added lines violate the enforced line limit, and schema and error guidance still advertise the rejected legacy contract.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (3)
Previously missed (1) — in code that hasn't changed since the last review.
cli/azd/extensions/azure.ai.agents/schemas/azure.ai.agent.json:223
- The schema now rejects the legacy shape, but its
modelTypedescription/enum still advertiseshosted_agent, andtargetAgentstill appears as an ordinary completion. Editors will suggest configurations that this branch makes invalid. Removehosted_agentfrom the supportedmodelTypemetadata and marktargetAgentas deprecated/unsupported while retaining the explicit rejection needed withadditionalProperties: true.
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go:534
- This line is still 128 columns with tabs counted as width 4, exceeding the repository's 125-column
llllimit (cli/azd/AGENTS.md:115-126). Split the message across two literals so preflight can pass.
"template.conversation_engine.name is required when conversation_engine.type is 'hosted_agent'")
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go:595
- This condition remains 128 columns with tabs counted as width 4, exceeding the repository's 125-column
llllimit (cli/azd/AGENTS.md:115-126). Wrap theEqualFoldcall onto a continuation line.
(agent.ConversationEngine != nil && strings.EqualFold(strings.TrimSpace(agent.ConversationEngine.Type), "hosted_agent"))
- Files reviewed: 12/12 changed files
- Comments generated: 1
- Review effort level: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
Two changed Go lines violate the enforced line limit, and the schema and diagnostics still advertise obsolete authoring guidance.
Review details
Suppressed comments (5)
Previously missed (3) — in code that hasn't changed since the last review.
cli/azd/extensions/azure.ai.agents/schemas/azure.ai.agent.json:222
- This rejection conflicts with the public schema surface:
modelTypestill documents and enumerateshosted_agent, so editor completion advertises a value that this rule always rejects. Removehosted_agentfrom that property's enum/description while keepingconversationEngineas the supported hosted option.
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go:560 - This diagnostic directs users to
model_type: hosted_agent, but that value is now rejected. Tell users thattarget_agentis unsupported and to useconversation_engineinstead.
cli/azd/extensions/azure.ai.agents/internal/project/service_target_agent.go:2651 - The new authoring-to-deployment bridge is not covered by an automated test: the round-trip tests stop before this helper, while the wire test injects an already resolved target. Add cases proving that
conversationEngine.namebecomes the resolver's service name, an omitted version defaults todeployed, and non-hosted engines return nil; otherwise this deployment-critical handoff can regress while the added tests still pass.
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go:596
- This condition is still 128 columns with tabs counted as width 4, so it exceeds the enforced 125-column Go limit (
cli/azd/AGENTS.md:115-126) and will faillll. Break the second condition across lines.
(agent.ConversationEngine != nil && strings.EqualFold(strings.TrimSpace(agent.ConversationEngine.Type), "hosted_agent"))
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go:534
- This line is still 128 columns when tabs count as width 4, exceeding the repository's enforced 125-column Go limit (
cli/azd/AGENTS.md:115-126). Split the message so thelllcheck can pass.
"template.conversation_engine.name is required when conversation_engine.type is 'hosted_agent'")
- Files reviewed: 12/12 changed files
- Comments generated: 0 new
- Review effort level: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
Standalone validation still directs target_agent users to the newly unsupported legacy contract.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 12/12 changed files
- Comments generated: 1
- Review effort level: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
Two changed Go lines exceed the enforced 125-column limit and will fail linting.
Review details
Suppressed comments (2)
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go:575
- This line is still 128 columns with tabs counted as width 4, so it exceeds the enforced 125-column limit and will fail the
lllcheck (cli/azd/AGENTS.md:118-129). Split the message across concatenated strings.
"template.conversation_engine.name is required when conversation_engine.type is 'hosted_agent'")
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go:637
- This condition is still 128 columns with tabs counted as width 4, so it exceeds the enforced 125-column limit and will fail the
lllcheck (cli/azd/AGENTS.md:118-129). Reuse the package helper to keep this within the limit and avoid duplicating the predicate.
(agent.ConversationEngine != nil && strings.EqualFold(strings.TrimSpace(agent.ConversationEngine.Type), "hosted_agent"))
- Files reviewed: 12/12 changed files
- Comments generated: 0 new
- Review effort level: Balanced
There was a problem hiding this comment.
🟢 Approval recommended
The implementation consistently updates authoring, validation, deployment mapping, documentation, and tests for the new contract.
Review details
- Files reviewed: 12/12 changed files
- Comments generated: 0 new
- Review effort level: Balanced
azure.ai.agents PR buildNote This is an unsigned development build. Install it only if you trust this PR. Install the extension: azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/9948/azure-ai-agents.zip"
|
Context
This PR adapts azd to a service-side Hosted Voice breaking change: hosted Voice wrappers now use
conversationEngine/conversation_engineinstead of the previousmodelType: hosted_agent/targetAgentcontract.Summary
Closes #9949.
conversationEngineauthoring for hosted Voice wrappersconversationEngine.type=hosted_agentto the serviceconversation_enginepayloadconversationEngine.namethrough the existing hosted target service and pin the deployed target versionmodelType: hosted_agent/targetAgenthosted Voice authoring shape because the service no longer supports that wire contractValidation
go test ./...go vet ./...foundry-samples-pr/mainHosted Voice Python sample usingconversationEngineconversation_engineand does not sendmodel_type=hosted_agent/helpE2E returned target-ownedCommands:after greetingHello.and response text after greetingRelated