Add Voice Live SDK client identification - #48848
Open
Yulin Li (yulin-li) wants to merge 1 commit into
Open
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a2ae7741-04b4-4da1-8351-1295949976cd
Yulin Li (yulin-li)
requested review from
amber-yujueWang,
emilyjiji,
pankopon,
Ryan Hurey (rhurey) and
xitzhang (xitzhang)
as code owners
September 2, 2026 06:58
|
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. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The package and SDK identifiers still report version 1.3.0 despite the new 1.3.1 changelog entry.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds Azure SDK identification to Voice Live WebSocket connections.
Changes:
- Adds SDK identification to headers and connection URLs.
- Preserves custom headers and query parameters.
- Adds unit coverage and release notes.
File summaries
| File | Description |
|---|---|
aio/_patch.py |
Generates and sends the SDK identifier. |
tests/unit/test_unit_connection.py |
Tests identification and parameter preservation. |
CHANGELOG.md |
Documents the telemetry change. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| @@ -1,5 +1,12 @@ | |||
| # Release History | |||
|
|
|||
| ## 1.3.1 (Unreleased) | |||
xitzhang (xitzhang)
approved these changes
Sep 3, 2026
xitzhang (xitzhang)
pushed a commit
that referenced
this pull request
Sep 3, 2026
… identification fix - _realtime.py/aio: add User-Agent + x-ms-client-sdk identification (ports fix from azure-ai-voicelive PR #48848), with case-insensitive header collision guard so a caller-supplied extra_headers User-Agent (any casing) is not duplicated - test_realtime_client(_async).py: add regression tests for identification headers and case-insensitive override behavior - tests/agents/test_voice_agent_realtime_live(_async).py: new live-only tests for voice agent realtime session lifecycle, text-to-audio/transcript turns, and function tool-call round trip - tests/agents/test_voice_agent_conversations(_async).py: new recorded tests for beta.agent_endpoint_conversations REST surface, with a live-only setup step to obtain a sanitized conversation_id for playback - assets.json: pin new recordings via test-proxy push (tag ..._d354d861da) - test-resources.bicep/test-resources-post.ps1/tests.yml: new live-test CI infrastructure (Foundry account/project + gpt-realtime model deployment), following the azure-ai-voicelive package pattern - CHANGELOG.md: document the identification fix under Bugs Fixed Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Description
Voice Live WebSocket requests currently fall back to aiohttp's generic User-Agent, preventing service telemetry from attributing traffic to the Python SDK. This change generates the standard Azure SDK identifier with
UserAgentPolicy, sends it in theUser-Agentheader, and adds the same value asx-ms-client-sdkon the connection URL for paths where the header is not forwarded.Caller-provided
User-Agentvalues continue to take precedence, and existing query parameters such astrafficTyperemain unchanged. Unit coverage verifies the default identifier and package version, custom header override behavior, URL identification, and query preservation.Tests:
python -m pytest --confcutdir=tests\unit tests\unit\test_unit_connection.py -qAll SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines