Persist first deployment name in AZURE_AI_MODEL_DEPLOYMENT_NAME#7633
Merged
Conversation
…onment variable. Fixes Azure#7632.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a gap in the azure.ai.agents extension init flow where AZURE_AI_MODEL_DEPLOYMENT_NAME was only persisted for the “from-code” path, ensuring it is also set when initializing from a manifest/template flow (ProcessModels).
Changes:
- Persist
AZURE_AI_MODEL_DEPLOYMENT_NAMEduringProcessModels()using the first resolved deployment’s name. - Fail initialization if persisting the env var fails (consistent with existing from-code behavior).
jongio
approved these changes
Apr 10, 2026
jongio
left a comment
Member
There was a problem hiding this comment.
Clean fix. Mirrors the existing setEnvValue pattern from init_from_code.go, proper guard check on empty deploymentDetails, and correct error wrapping. Nothing to flag.
JeffreyCA
approved these changes
Apr 10, 2026
…irstDeploymentName`
JeffreyCA
approved these changes
Apr 10, 2026
This was referenced Apr 10, 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.
Fixes #7632.
The env var was only set in the from-code path). The from-manifest path (ProcessModels) collected deployment details but never persisted the env var. This affected users who init via --manifest, templates, or --model/--model-deployment flags on those paths.
Fix: Added a setEnvValue call in ProcessModels() after deployment details are collected, using the first deployment's name. This covers all manifest/template init paths since they all flow through ProcessModel