[ai agents extension] Use PromptAiDeployment in init-from-code for explicit SKU selection#6891
Closed
rajeshkamal5050 wants to merge 2 commits intoAzure:mainfrom
Closed
[ai agents extension] Use PromptAiDeployment in init-from-code for explicit SKU selection#6891rajeshkamal5050 wants to merge 2 commits intoAzure:mainfrom
rajeshkamal5050 wants to merge 2 commits intoAzure:mainfrom
Conversation
The init-from-code flow was auto-selecting the deployment SKU via resolveModelDeploymentNoPrompt, which picked by priority (GlobalStandard first) without user visibility. This caused quota mismatches where the model prompt showed high available quota (from Standard SKU) but deployment failed because GlobalStandard had zero quota. Replace with PromptAiDeployment to prompt users for version, SKU, and capacity selection — matching the regular init flow behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to improve the init-from-code flow by replacing automatic SKU selection with explicit user prompts, addressing quota mismatch issues where auto-selected SKUs had zero quota despite high aggregate availability.
Changes:
- Replace
resolveModelDeploymentNoPromptwithPromptAiDeploymentto let users explicitly select model version, SKU, and capacity - Remove the unused
resolveModelDeploymentNoPromptfunction fromInitFromCodeAction
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cli/azd/extensions/azure.ai.agents/internal/cmd/init_from_code.go
Outdated
Show resolved
Hide resolved
Keep resolveModelDeploymentNoPrompt for --no-prompt mode, use PromptAiDeployment only in interactive mode. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
hemarina
approved these changes
Feb 26, 2026
vhvb1989
approved these changes
Feb 26, 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.
Problem
The
init-from-codeflow auto-selected deployment SKU viaresolveModelDeploymentNoPrompt, picking by priority (GlobalStandard first) without user visibility. This caused quota mismatches where:Fix
Replace
resolveModelDeploymentNoPromptwithPromptAiDeploymentin interactive mode so users explicitly select version, SKU, and capacity — matching the regularinitflow. Users now see per-SKU quota and can choose accordingly.In
--no-promptmode,resolveModelDeploymentNoPromptis preserved as a fallback for non-interactive scenarios.Changes
init_from_code.go: CallPromptAiDeploymentin interactive mode, fall back toresolveModelDeploymentNoPromptwhen--no-promptis set