Summary
Extend the explicit model-selection safeguard to Azure AI Foundry (azure_ai).
Azure AI Foundry uses customer-defined deployment names. The application must not automatically select a catalog model ID as a deployment name.
Rationale
PR #2384 prevents automatic fallback model selection for azure. The same safeguard does not currently apply to the independently configured azure_ai provider. A declared or catalog model ID can refer to a different Azure AI Foundry deployment or workspace.
Affected areas
src/api/settings/helpers.py
- Update
_default_embedding_model() so azure_ai returns "", as azure does.
frontend/components/models/model-helpers.tsx
- Update
requiresExplicitModelSelection() so it returns true for azure_ai.
- Settings and onboarding flows that consume
requiresExplicitModelSelection().
- Backend and frontend regression tests for Azure AI Foundry LLM and embedding model selection.
Plan of action
- Define the Azure deployment-named provider set at each existing backend and frontend decision point, including both
azure and azure_ai.
- Prevent
_default_embedding_model("azure_ai") from using get_declared_default_embedding_model().
- Prevent Settings and Onboarding from auto-selecting a catalog model for
azure_ai.
- Require the user to enter or select an Azure AI Foundry deployment name before saving LLM or embedding settings.
- Add backend tests for Azure AI Foundry fallback behavior, including an operator-declared embedding default.
- Add frontend tests for Settings and Onboarding to verify that catalog model IDs are not persisted automatically for
azure_ai.
- Run the relevant backend and frontend test suites.
Acceptance criteria
_default_embedding_model("azure_ai") returns "", including when an environment-declared default exists.
requiresExplicitModelSelection("azure_ai") returns true.
- Settings and Onboarding do not auto-save a catalog model ID for Azure AI Foundry.
- A user can save an explicitly entered Azure AI Foundry deployment name for both LLM and embedding models.
- Regression tests cover the listed behavior.
References
Summary
Extend the explicit model-selection safeguard to Azure AI Foundry (
azure_ai).Azure AI Foundry uses customer-defined deployment names. The application must not automatically select a catalog model ID as a deployment name.
Rationale
PR #2384 prevents automatic fallback model selection for
azure. The same safeguard does not currently apply to the independently configuredazure_aiprovider. A declared or catalog model ID can refer to a different Azure AI Foundry deployment or workspace.Affected areas
src/api/settings/helpers.py_default_embedding_model()soazure_aireturns"", asazuredoes.frontend/components/models/model-helpers.tsxrequiresExplicitModelSelection()so it returnstrueforazure_ai.requiresExplicitModelSelection().Plan of action
azureandazure_ai._default_embedding_model("azure_ai")from usingget_declared_default_embedding_model().azure_ai.azure_ai.Acceptance criteria
_default_embedding_model("azure_ai")returns"", including when an environment-declared default exists.requiresExplicitModelSelection("azure_ai")returnstrue.References