Skip to content

Conversation

@xitzhang
Copy link
Member

@xitzhang xitzhang commented Jan 6, 2026

…ameter

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 swagger spec, a link to the pull request containing these swagger spec changes has been 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.

@xitzhang xitzhang requested a review from rhurey as a code owner January 6, 2026 23:08
Copilot AI review requested due to automatic review settings January 6, 2026 23:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds custom query parameter support for WebSocket connections in the Azure VoiceLive client and introduces an optional model parameter for session creation. The implementation allows developers to specify additional query parameters (e.g., deployment-id, region) when establishing WebSocket connections, with a clear precedence hierarchy: endpoint URL parameters → custom parameters → SDK-managed api-version → method parameter model.

Key Changes:

  • Added customQueryParameters support in VoiceLiveClientBuilder and VoiceLiveAsyncClient for passing custom query parameters to WebSocket connections
  • Added startSession() overload without model parameter for scenarios where model is provided via custom query parameters or endpoint URL
  • Refactored query parameter handling in convertToWebSocketEndpoint to use a map-based approach with proper precedence rules

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
VoiceLiveClientBuilder.java Added customQueryParameters method to builder for setting custom query parameters, updated constructors to pass parameters to client
VoiceLiveAsyncClient.java Added custom query parameters field, updated constructors to accept parameters, refactored query string building logic with precedence handling, added startSession() overload without model parameter
VoiceLiveClientBuilderTest.java Added unit tests for builder with custom query parameters (valid, null, empty cases) and fluent API validation
VoiceLiveAsyncClientTest.java Updated existing constructor calls to include new customQueryParameters parameter, added tests for new startSession() overload and custom query parameters
VoiceLiveClientQueryParametersTest.java New comprehensive test file covering custom query parameters integration, precedence rules, URL scheme conversion, path normalization, and edge cases
CHANGELOG.md Documented new features including custom query parameter support and startSession() overload

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

API Change Check

APIView identified API level changes in this PR and created the following API reviews

com.azure:azure-ai-voicelive

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.

3 participants