-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Add projects sdk version to openai user-agent and update assets.json tag and enhance User-Agent header sanitization in tests #44672
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 enhances User-Agent header handling by adding the Azure AI Projects SDK version to the OpenAI client's User-Agent header for better telemetry tracking, and sanitizes the User-Agent header in test recordings to prevent platform-specific variations from causing test failures.
Changes:
- Added SDK version to User-Agent header in OpenAI client requests for telemetry
- Enhanced test recording sanitization to handle User-Agent header variations
- Updated test assets tag to include new test recordings
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| sdk/ai/azure-ai-projects/azure/ai/projects/_patch.py | Imports VERSION constant and appends SDK version to User-Agent header in logging transport |
| sdk/ai/azure-ai-projects/tests/conftest.py | Adds import and sanitizer for User-Agent header to prevent platform-specific test failures |
| sdk/ai/azure-ai-projects/assets.json | Updates test assets tag to reference new recordings with sanitized User-Agent |
…tag and enhance User-Agent header sanitization in tests
6e292bf to
52e71f6
Compare
|
/azp run-ed |
|
Command 'run-ed' is not supported by Azure Pipelines. Supported commands
See additional documentation. |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 44672 in repo Azure/azure-sdk-for-python |
|
/azp run |
|
You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list. |
|
/azp run pullrequest (Build Test job_1_macos311) |
|
No pipelines are associated with this pull request. |
|
/azp run Test job_1_macos311 |
|
No pipelines are associated with this pull request. |
|
/azp run * |
|
No pipelines are associated with this pull request. |
|
/azp run python - pullrequest (Build Test job_1_macos311) |
|
No pipelines are associated with this pull request. |
|
/azp run Build Test job_1_macos311 |
|
No pipelines are associated with this pull request. |
|
/azp run python - pullrequest |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run python - pullrequest |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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