Repository navigation
Add post-call delivery configuration and related models to VoiceAgent… - #49813
Howie Leung (howieleung) wants to merge 20 commits into
Conversation
|
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. |
There was a problem hiding this comment.
🟡 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
This comment has been minimized.
This comment has been minimized.
| 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.
| VoiceAgentServerEventSessionHandoffAborted, | ||
| VoiceAgentServerEventSessionHandoffCompleted, | ||
| VoiceAgentServerEventSessionHandoffStarted, |
- 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.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
The new realtime events are missing from both sync and async client dispatch maps and event unions, causing recv() to return dictionaries instead of models and breaking typed event handling.
12 open issues
Export campaigns operations from both public namespaces Add sync and async tests for Live-conversation operations Export the async Live conversations operation type Export and annotate the new operations group Fix async pagination for terminal pages Stop pagination when has_more is false Register handoff events in both realtime event unions Test post_call destination serialization and polymorphic decoding Document release features and preview-model breaking changes · New Document new capabilities in the release notes Add a Chronus entry for the voice features Add changelog entry for post-call delivery feature
1 file not reviewed
eng/emitter-package-lock.json: Generated file
Review effort: Balanced
This comment has been minimized.
This comment has been minimized.
…renceGraph script
There was a problem hiding this comment.
🔵 Needs a closer look
The new campaigns operations class is missing from the public imports and all, causing its documented public import to fail.
11 open issues
Export campaigns operations from both public namespaces Add sync and async tests for Live-conversation operations Export the async Live conversations operation type Export and annotate the new operations group Fix async pagination for terminal pages Stop pagination when has_more is false Register handoff events in both realtime event unions Test post_call destination serialization and polymorphic decoding Document new capabilities in the release notes Add a Chronus entry for the voice features Add changelog entry for post-call delivery feature
1 resolved since last review
1 file not reviewed
eng/emitter-package-lock.json: Generated file
Review effort: Balanced
* [azure-ai-projects] Add GPT Live WebSocket clients and samples Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix GPT Live event registry type narrowing Validate generated event registry values through a Mapping of objects so Pyright correctly narrows model classes without casts. Add invalid-registry regression coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * [azure-ai-projects] Add GPT Live REST conversation samples Add sync and async REST-only samples for stored conversation, item, and recording APIs, with opt-in downloads and deletion. Add 42 enabled offline guards and related documentation. Verified all 18 sync/async REST targets against the real service and 555 focused unit cases. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * [azure-ai-projects] Address GPT Live review feedback Protect input WAV recordings from hard-linked output aliases, normalize mapping inputs in Live serialization, and await cancellation-safe shared asynchronous transport cleanup. Add deterministic regressions for all three findings while preserving existing close-error behavior. Verified 580 focused unit cases and type/lint/build checks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * [azure-ai-projects] Add microphone mode to GPT Live audio sample Extend the existing audio sample with optional PyAudio microphone capture and speaker playback, preserving WAV mode. Bound device buffering, surface callback/send errors, report actual audio bytes, and gracefully close the session on Ctrl+C. Add 24 microphone guards and related documentation. Verified 162 focused tests, both CLI modes against the live service, and user-confirmed physical microphone operation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add recorded GPT Live REST coverage Cover all nine dedicated Live REST methods in sync and async Test Proxy lifecycles, including pagination, audio content, HTTP statuses, deletion and safe fixture cleanup. Reference the published recording assets and add offline playback regressions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Align GPT Live samples with review conventions Consolidate Live samples, remove CLI arguments, use user-temporary audio output, and cover resource ownership and sample conventions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Make GPT Live conversation REST sample self-contained Create and clean up a stored greeting conversation when no existing ID is supplied. Preserve read-only behavior for supplied IDs and remove source-shape and filename assertions per review while retaining behavioral coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Simplify GPT Live REST sample test coverage Reuse the existing REST fixture for success and failure cleanup checks. Remove the simulated greeting, clock, and persistence test setup without changing the sample. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Simplify handwritten VoiceAgents documentation Clarify Realtime and GPT Live setup, sample choices, and client descriptions without changing runtime behavior, public APIs, generated code, or tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * [azure-ai-projects] Align Live WebSocket support with regenerated SDK Use canonical Realtime/Live query parameters, native discriminator readback, and persisted Live delegation models. Update sync/async documentation, sample constructors and contract tests, and classify never-released Live changes as new features in the changelog. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * [azure-ai-projects] Align custom Live clients and recording layout with vnext Use native session-update delegation models, preserve typed Foundry ownership and recorded Live REST coverage, expose Live conversation operations, and add typed Realtime handoff dispatch. Refresh API artifacts and unreleased sample notes. Rebase and revalidate this local checkpoint against the newly advanced vnext target before publication. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * [azure-ai-projects] Complete vnext event alignment and refresh API Expose typed system-tool argument and input-collection events in both Realtime clients, preserving native vnext model names and generated output. Verify the rebased custom SDK with 1,973 passing tests and 120 existing skips, refresh the exact-wheel paired API artifacts, and keep never-released Live changes under features. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Voice sample docs, streaming tests, and spelling scope Use absolute source links for strict Sphinx builds, make sync and async connection-error tests deterministic behind CI proxies, and keep voice spelling additions in the AI service configuration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Expand VoiceAgents samples and regression coverage Add async WebSocket and sync REST examples, native feature and recorded CRUD tests, and protocol regression coverage. Fix the Live connection sample audio clock, simplify sample tests and documentation, and reference verified sanitized recordings. The generated-audio artifact test remains enabled; its recording is pending because the live service did not publish the artifact during validation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Deduplicate VoiceAgents samples by protocol Keep one example per scenario: synchronous REST and asynchronous WebSocket workflows. Remove duplicate counterparts, convert the remaining WebSocket entrypoints, and migrate workflow regressions and documentation to the retained examples. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Simplify Voice Agent samples and fix CI validation Bundle a synthetic spoken-question WAV with shared optional input-path handling, simplify the Live function-tool workflow and documentation, and remove source-shape sample tests while retaining behavioral coverage. Align the Projects development version and API metadata with 2.11.0 Unreleased, and isolate mocked management-policy requests from inherited CI proxy settings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Keep Voice Agent PR changes scoped to AI Remove the out-of-scope Azure Core streaming and management-policy test changes. Restore all three Core test files to the PR target while preserving every AI change and the latest target-branch merge. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix interrupted generated-audio recording test Wait for the persisted interrupted conversation item without requiring an optional generated-audio artifact. Validate the documented not-found result after incomplete generation, while retaining full metadata and WAV validation when audio is returned. Reference the genuine sanitized cancellation recording and preserve deletion and error-propagation checks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Xiting Zhang <xitzhang@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The samples do not catch asyncio.TimeoutError on supported Python 3.10, causing normal receive timeouts to abort the live connection or skip timeout messaging and response cancellation.
12 open issues
Catch asyncio.TimeoutError to handle receive timeouts on Python 3.10 · New Export campaigns operations from both public namespaces Add sync and async tests for Live-conversation operations Export the async Live conversations operation type Export and annotate the new operations group Fix async pagination for terminal pages Stop pagination when has_more is false Register handoff events in both realtime event unions Test post_call destination serialization and polymorphic decoding Document new capabilities in the release notes Add a Chronus entry for the voice features Add changelog entry for post-call delivery feature
1 file not reviewed
eng/emitter-package-lock.json: Generated file
Review effort: Balanced
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Human assessment is needed because Python 3.10 timeout handling and response-limit boundary behavior introduce compatibility and unnecessary backend-work concerns.
10 open issues
Export campaigns operations from both public namespaces Add sync and async tests for Live-conversation operations Export and annotate the new operations group Fix async pagination for terminal pages Stop pagination when has_more is false Register handoff events in both realtime event unions Test post_call destination serialization and polymorphic decoding Document new capabilities in the release notes Add a Chronus entry for the voice features Add changelog entry for post-call delivery feature
2 resolved since last review
1 file not reviewed
eng/emitter-package-lock.json: Generated file
Review effort: Balanced
This comment has been minimized.
This comment has been minimized.
- Introduced TelephonyCampaignDatasetReference model to represent dataset references in telephony campaigns. - Updated DatasetReference model to require a concrete version. - Refactored TelephonyCampaign to use TelephonyCampaignDatasetReference for recipient_dataset. - Implemented BetaVoiceAgentsCampaignsOperations for managing telephony campaigns, including create, cancel, and delete operations. - Added tests for campaign long-running operations (LRO) to ensure correct behavior and error handling. - Updated public methods documentation to include new campaign operations. - Cleaned up sample scripts and test files for consistency and readability.
There was a problem hiding this comment.
🟡 Changes recommended
Timeout handling remains incomplete: a stalled audio send can bypass the overall deadline, while Python 3.10 receive timeouts bypass cancellation and terminate the sample with a traceback.
10 open issues
Bound audio sends by the remaining overall timeout · New Export campaigns operations from both public namespaces Add sync and async tests for Live-conversation operations Export and annotate the new operations group Fix async pagination for terminal pages Stop pagination when has_more is false Register handoff events in both realtime event unions Test post_call destination serialization and polymorphic decoding Document new capabilities in the release notes Add a Chronus entry for the voice features
1 resolved since last review
1 file not reviewed
eng/emitter-package-lock.json: Generated file
Review effort: Balanced
| while True: | ||
| remaining_time(deadline, event_type) | ||
| if time.monotonic() >= next_frame: | ||
| await connection.session.input_audio.append(audio=silence) |
[Pilot] PR Pipeline Failure AnalysisWhat failedPipeline build 7048526 (
Relevant pipeline outputRecommended next steps
Automated fix: Requested
|
…ust release date, and enhance sample updates


… (#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:
General Guidelines and Best Practices
Testing Guidelines