Skip to content

fix: update default agent init model to gpt-5.4-mini#9290

Open
huimiu wants to merge 2 commits into
mainfrom
hui/issue-9119-update-default-model
Open

fix: update default agent init model to gpt-5.4-mini#9290
huimiu wants to merge 2 commits into
mainfrom
hui/issue-9119-update-default-model

Conversation

@huimiu

@huimiu huimiu commented Jul 24, 2026

Copy link
Copy Markdown
Member

Closes #9119.

What changed

  • Replaced the deprecated gpt-4.1-mini default in interactive model catalog prompts with gpt-5.4-mini.
  • Centralized the value in defaultAgentModel so the From Code flow, adopt flow, help text, and error guidance stay synchronized.
  • Clarified --model help: the default applies during interactive selection, while --model is required to deploy a new model with --no-prompt.
  • Added regression coverage for the default and for explicit --model precedence.

An explicit --model <name> continues to override the interactive default.

Why this change is needed

gpt-4.1-mini is deprecated, so it should no longer be preselected when users choose a new model from the catalog. Leaving it as the default steers users toward an obsolete model and can eventually leave the prompt without its intended selection as catalog availability changes.

The non-interactive behavior is intentionally unchanged. In the From Code flow, --no-prompt skips new-model configuration unless --model is provided; an existing deployment can still be selected with --project-id and --model-deployment.

Why this approach

gpt-5.4-mini is a current Azure AI Foundry model and preserves the small, cost-efficient intent of the previous default. A shared constant is used instead of repeating the model name so future default changes cannot leave prompts, help text, and guidance out of sync. The focused gRPC test verifies both the default request value and explicit flag precedence.

Copilot AI review requested due to automatic review settings July 24, 2026 04:54
@github-actions

Copy link
Copy Markdown

📋 Prioritization Note

Thanks for the contribution! The linked issue isn't in the current milestone yet.
Thank you for logging this issue; our team is reviewing it. If you need urgent prioritization, tag @RickWinter and @kristenwomack to let us know.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
21 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates agent initialization to default to gpt-5.4-mini instead of deprecated gpt-4.1-mini.

Changes:

  • Updates From Code and adopt/catalog model defaults.
  • Refreshes model flag help and resolution guidance.
  • Preserves explicit --model overrides.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
init.go Updates --model help text.
init_foundry_resources_helpers.go Changes the shared model default and error hint.
init_adopt.go Changes the adopt/catalog model default.

Comment thread cli/azd/extensions/azure.ai.agents/internal/cmd/init_foundry_resources_helpers.go Outdated
Comment thread cli/azd/extensions/azure.ai.agents/internal/cmd/init_adopt.go Outdated
@github-actions github-actions Bot added the ext-agents azure.ai.agents extension label Jul 24, 2026
Copilot AI review requested due to automatic review settings July 24, 2026 06:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment on lines +1269 to +1273
fmt.Sprintf(
"pass --model <name> (e.g. --model %s) or --project-id "+
"<id> with --model-deployment <name> to skip interactive model selection",
defaultAgentModel,
),
Comment on lines +1551 to +1554
"Name of the AI model to deploy. Defaults to '%s' during interactive model selection; "+
"required to deploy a new model with --no-prompt. Mutually exclusive with --model-deployment, "+
"with --model-deployment being used if both are provided",
defaultAgentModel,

@jongio jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed the deprecated default is centralized in defaultAgentModel and referenced from all three selection paths (From Code, adopt/catalog, and the shared helper) plus the --model help and the model-resolution error guidance, so the value can't drift out of sync. TestSelectNewModel exercises both the interactive default and the explicit --model override. Resolves #9119.

@jongio jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scope is limited to replacing the deprecated gpt-4.1-mini default with the shared defaultAgentModel constant across the From Code flow, adopt flow, help text, and error guidance. TestSelectNewModel covers both the interactive default and explicit --model precedence, and CI is green across Linux, Windows, and Mac.

@jongio jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed the deprecated default is centralized in the shared defaultAgentModel constant across all selection paths (From Code, adopt/catalog, and error guidance) and the --model help text, so the value stays in sync. TestSelectNewModel asserts the prompt request DefaultValue and the explicit-flag override. CI is green.

@jongio jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the deprecated default is centralized in the shared defaultAgentModel constant and referenced from every selection path: the --model help text, the adopt/catalog flow, selectNewModel, and the model-resolution error guidance, so the value can't drift out of sync. The remaining gpt-4.1-mini literals are unrelated test fixtures (filter-exclusion and deployment-name cases), not defaults. TestSelectNewModel covers both the interactive default and the explicit --model override. CI is green across Linux, Windows, and Mac. Resolves #9119.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext-agents azure.ai.agents extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Agents Extension] Update Default Model in "From Code" Flow

4 participants