Skip to content

Add post-call delivery configuration and related models to VoiceAgent… - #49813

Open
Howie Leung (howieleung) wants to merge 6 commits into
mainfrom
feature/azure-ai-projects/vnext
Open

Howie Leung (howieleung) wants to merge 6 commits into
mainfrom
feature/azure-ai-projects/vnext

Conversation

@howieleung

Copy link
Copy Markdown
Member

… (#49805)

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
9 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.

🟡 Changes recommended

The new post-call delivery feature lacks a required changelog entry covering VoiceAgentDefinition.post_call, Event Grid/routine destinations, and the preview restriction on audio delivery, leaving the capability and limitation out of release notes.

1 open issue
What changed in this PR

Adds post-call delivery configuration to Voice Agents in azure-ai-projects, allowing callers to configure Event Grid and routine destinations.

Changes:

  • Adds VoiceAgentDefinition.post_call, destination models, and related enums; documents that audio delivery is unsupported in this preview.
  • Exports the new types and refreshes API snapshots, cross-language mappings, and the TypeSpec revision.
  • Adds Pylint suppressions to the sample CI runner.
File Description
sdk/​ai/​azure-ai-projects/​tsp-location.yaml Updates the source specification commit.
sdk/​ai/​azure-ai-projects/​tests/​samples/​ci/​run_samples.py Suppresses line-length and unused-suppression warnings.
sdk/​ai/​azure-ai-projects/​azure/​ai/​projects/​models/​_models.py Adds post-call configuration and destination models.
sdk/​ai/​azure-ai-projects/​azure/​ai/​projects/​models/​_enums.py Adds destination and delivery-content enums.
sdk/​ai/​azure-ai-projects/​azure/​ai/​projects/​models/​__init__.py Exports the new models and enums.
sdk/​ai/​azure-ai-projects/​apiview-properties.json Updates cross-language API mappings and version.
sdk/​ai/​azure-ai-projects/​api.metadata.yml Refreshes the API hash.
sdk/​ai/​azure-ai-projects/​api.md Records the expanded public API.

Review effort: Balanced

Comment on lines +28944 to +28946
post_call: Optional["_models.VoiceAgentPostCallConfig"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
@github-actions

This comment has been minimized.

Copilot AI balanced review requested due to automatic review settings November 4, 2026 19: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.

🟡 Changes recommended

The new post_call API lacks tests for serialization and polymorphic decoding of both destination subtypes, and release notes omit the feature and its preview audio restriction.

2 open issues

Review effort: Balanced

Comment on lines +29806 to +29808
destinations: list["_models.VoiceAgentPostCallDestination"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
- Improved the clarity of SSE frame documentation in AgentsOperations by formatting the description of the `data` field.
- Expanded the list of known values for the `provider` keyword in BetaVoiceAgentsTelephonyOperations to include "sip" for both bindings and calls.
- Updated the commit reference in tsp-location.yaml to reflect the latest changes in the Azure REST API specs repository.
Copilot AI balanced review requested due to automatic review settings November 4, 2026 20:00

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.

🟡 Changes recommended

The new handoff events return dictionaries instead of typed models in both sync and async dispatch, and transfer_tool annotations incorrectly exclude valid null values.

4 open issues

Review effort: Balanced

Comment on lines +659 to +661
VoiceAgentServerEventSessionHandoffAborted,
VoiceAgentServerEventSessionHandoffCompleted,
VoiceAgentServerEventSessionHandoffStarted,
"""The number of unique reserved handoff attempts. Required."""
available_edge_ids: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The edge identifiers currently available from the active node. Required."""
transfer_tool: "_models.VoiceAgentFunctionTool" = rest_field(
- Introduced new methods for managing live conversations in the BetaVoiceAgentsLiveConversationsOperations class, including listing, retrieving, deleting, and streaming audio for live conversations.
- Updated public methods documentation to reflect the addition of 9 new methods under the `beta.voice_agents.live_conversations` namespace.
- Updated the TSP location YAML file to point to the latest commit in the Azure REST API specs repository.

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.

🟡 Changes recommended

Renamed model exports break existing imports, pagination ignores has_more=false, and the new live-conversation operations lack dedicated sync and async test coverage.

7 open issues
1 file not reviewed
  • eng/emitter-package-lock.json: Generated file

Review effort: Balanced

return deserialized # type: ignore


class BetaVoiceAgentsLiveConversationsOperations: # pylint: disable=docstring-missing-param,name-too-long
)
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.get("last_id") or None, iter(list_of_elem)
Copilot AI balanced review requested due to automatic review settings November 4, 2026 23:29
@github-actions

This comment has been minimized.

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.

🟡 Changes recommended

Pagination ignores has_more and triggers extra requests, new realtime events lack typed dispatch registration, and the operation group is missing public exports and annotations.

8 open issues
1 resolved since last review
1 file not reviewed
  • eng/emitter-package-lock.json: Generated file

Review effort: Balanced

)
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.get("last_id") or None, AsyncList(list_of_elem)
return deserialized # type: ignore


class BetaVoiceAgentsLiveConversationsOperations: # pylint: disable=docstring-missing-param,name-too-long
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor
[Pilot] PR Pipeline Failure Analysis

What failed

Azure Pipelines build 7039262 (python - pullrequest) failed across the Build Analyze job and all Build Test platform jobs (Ubuntu2404_313, Ubuntu2404_314, macos311, ubuntu2404_311, ubuntu2404_311_coverage, ubuntu2404_311_ib1, windows2022_312, windows2022_312_ib1).

Root cause 1 — Spelling/lint validation failure (Build Analyze job): cspell flagged 92 unknown-word issues across sdk/ai/azure-ai-projects/api.md, models/__init__.py, models/_enums.py, and models/_models.py. Most are new vocabulary introduced by this PR's VoiceAgent models (e.g. Unmute/unmute/UNMUTE/Unmuted in enum/docstring names such as UNMUTE_REQUESTED), plus an unrelated cluster of nonsense tokens (brise, flitz, harema, juni, nira, noeul, nuri, shida) that appear to be sample/placeholder text baked into generated docstrings around _models.py:16855-16945 and api.md:10209/10215.

Root cause 2 — Playback/test-recording mismatch (azure-ai-projects, all 8 platforms): test_voice_agent_crud.py::test_voice_agent_crud, test_voice_agent_disable_enable, and their async counterparts fail with ResourceNotFoundError: Playback failure. The test-proxy reports: .definition.sub_protocol: Missing in request JSON when matching the recorded POST to .../agents/MyVoiceAgentCrudTest/versions?api-version=v1 (and VoiceAgentDisableEnableTest). This indicates the test recordings under sdk/ai/azure-ai-projects/tests/recordings/agents/ were not updated after the client code started sending (or stopped sending) a definition.sub_protocol field, so recorded request bodies no longer match what the current client sends.

Unrelated, pre-existing failure (azure-core, ubuntu2404_311_ib1 and windows2022_312_ib1 only): test_rest_stream_responses.py::test_iter_with_error and its async variant fail with ValueError: Should error before entering at tests/test_rest_stream_responses.py:64 / tests/async_tests/test_rest_stream_responses_async.py:56. This PR's diff touches only sdk/ai/azure-ai-projects and eng/ files, not azure-core, so this is unrelated to the PR's changes — flagged for visibility but not attributed to this change.

Relevant pipeline output
##[error]sdk/ai/azure-ai-projects/api.md:9202:65 - Unknown word (Unmute)
##[error]sdk/ai/azure-ai-projects/api.md:9204:63 - Unknown word (UNMUTE)
##[error]sdk/ai/azure-ai-projects/azure/ai/projects/models/_enums.py:1039:25 - Unknown word (UNMUTE)
##[error]sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py:16855:33 - Unknown word (brise)
##[error]sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py:16856:50 - Unknown word (flitz)
##[error]sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py:16857:15 - Unknown word (juni) fix: (june)
##[error]Spelling errors detected. To correct false positives or learn about spell checking see: https://aka.ms/azsdk/engsys/spellcheck
##[error]PowerShell exited with code '1'.

E azure.core.exceptions.ResourceNotFoundError: Playback failure -- for help resolving, see https://aka.ms/azsdk/python/test-proxy/troubleshoot. Error details:
E Unable to find a record for the request POST (sanitized.services.ai.azure.com/redacted)
E Header differences:
E Body differences:
E There are differences between request and recordentry bodies:
E .definition.sub_protocol: Missing in request JSON

Recommended next steps

  • Add the legitimately new terms (Unmute, unmute, UNMUTE, Unmuted, unmuted) to the cspell custom dictionary (.vscode/cspell.json or the package-level words list) since they are intentional new VoiceAgent enum/property names.
  • Review and fix or remove the nonsense placeholder tokens (brise, flitz, harema, juni, nira, noeul, nuri, shida) in sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py (around lines 16855-16945) and api.md (lines 10209, 10215) — these look like generated sample/dummy text that should likely be corrected or added to the dictionary if intentional.
  • Re-record the test_voice_agent_crud and test_voice_agent_disable_enable (and async variants) test recordings so the recorded request bodies include the current definition.sub_protocol field, then commit the updated recordings under sdk/ai/azure-ai-projects/tests/recordings/agents/.
  • The azure-core test_iter_with_error failures are unrelated to this PR's changes; no action needed here unless investigating separately.
  • See https://aka.ms/ci-fix

Automated fix: Requested

Generated by Pipeline Analysis Next Steps · copilot · sonnet50 · 113.5 AIC · ⌖ 0.595 AIC · ⊞ 9.1K · ◷

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants