-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[VoiceLive]Add custom query parameters support and optional model par… #47637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
customQueryParameterssupport inVoiceLiveClientBuilderandVoiceLiveAsyncClientfor 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
convertToWebSocketEndpointto 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 |
...re-ai-voicelive/src/test/java/com/azure/ai/voicelive/VoiceLiveClientQueryParametersTest.java
Outdated
Show resolved
Hide resolved
sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/VoiceLiveClientBuilder.java
Outdated
Show resolved
Hide resolved
sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/VoiceLiveAsyncClient.java
Show resolved
Hide resolved
sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/VoiceLiveAsyncClient.java
Show resolved
Hide resolved
sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/VoiceLiveAsyncClient.java
Show resolved
Hide resolved
...re-ai-voicelive/src/test/java/com/azure/ai/voicelive/VoiceLiveClientQueryParametersTest.java
Outdated
Show resolved
Hide resolved
...re-ai-voicelive/src/test/java/com/azure/ai/voicelive/VoiceLiveClientQueryParametersTest.java
Outdated
Show resolved
Hide resolved
...re-ai-voicelive/src/test/java/com/azure/ai/voicelive/VoiceLiveClientQueryParametersTest.java
Outdated
Show resolved
Hide resolved
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
…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:
General Guidelines and Best Practices
Testing Guidelines