Add user-agent policy to fine-tuning extension HTTP clients for request tracing#6923
Merged
saanikaguptamicrosoft merged 5 commits intoAzure:mainfrom Mar 2, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces build-time version metadata for the azure.ai.finetune extension and uses it to set a custom User-Agent on outbound HTTP calls (OpenAI + ARM), alongside required dependency and build-script updates.
Changes:
- Added
internal/versionpackage to hold build-injectedVersion/Commit/BuildDate, and updated theversioncommand + build scripts to use it. - Added an
azsdk.NewUserAgentPolicy(...)to Azure SDK pipelines used by the OpenAI middleware and ARM client factory. - Updated
go.mod/go.sumto newer Azure SDK / azd / related transitive dependencies (notablyazcoreto supportazcore/arm).
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| cli/azd/extensions/azure.ai.finetune/internal/version/version.go | New package for build-time version metadata variables. |
| cli/azd/extensions/azure.ai.finetune/internal/providers/factory/provider_factory.go | Builds a User-Agent string from version info and injects it into Azure SDK pipelines / ARM client options. |
| cli/azd/extensions/azure.ai.finetune/internal/cmd/version.go | Switches version command output to read from internal/version. |
| cli/azd/extensions/azure.ai.finetune/go.mod | Bumps dependencies to support new imports/policies. |
| cli/azd/extensions/azure.ai.finetune/go.sum | Updated dependency checksums for the bumped modules. |
| cli/azd/extensions/azure.ai.finetune/ci-build.ps1 | Updates ldflags to inject version metadata into internal/version. |
| cli/azd/extensions/azure.ai.finetune/build.sh | Updates ldflags injection target package path to internal/version. |
| cli/azd/extensions/azure.ai.finetune/build.ps1 | Updates ldflags injection target package path to internal/version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cli/azd/extensions/azure.ai.finetune/internal/providers/factory/provider_factory.go
Outdated
Show resolved
Hide resolved
cli/azd/extensions/azure.ai.finetune/internal/providers/factory/provider_factory.go
Outdated
Show resolved
Hide resolved
cli/azd/extensions/azure.ai.finetune/internal/providers/factory/provider_factory.go
Show resolved
Hide resolved
cli/azd/extensions/azure.ai.finetune/internal/providers/factory/provider_factory.go
Outdated
Show resolved
Hide resolved
achauhan-scc
approved these changes
Feb 28, 2026
rajeshkamal5050
approved these changes
Feb 28, 2026
d25e0ff to
b8d3c89
Compare
achauhan-scc
approved these changes
Mar 2, 2026
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.
Notes
azd-ext-azure-ai-finetune/<version>user-agent to all outgoing API calls (OpenAI + ARM)internal/versionpackage (previously version vars lived in internal/cmd), and accordingly updated ldflags paths in build scripts.armappservice/v2, ran-go get github.com/azure/azure-dev/cli/azd/pkg/azsdkgo mod tidyTesting