Skip to content

Require explicit Azure AI Foundry model deployment selection #2385

Description

@coderabbitai

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

  1. Define the Azure deployment-named provider set at each existing backend and frontend decision point, including both azure and azure_ai.
  2. Prevent _default_embedding_model("azure_ai") from using get_declared_default_embedding_model().
  3. Prevent Settings and Onboarding from auto-selecting a catalog model for azure_ai.
  4. Require the user to enter or select an Azure AI Foundry deployment name before saving LLM or embedding settings.
  5. Add backend tests for Azure AI Foundry fallback behavior, including an operator-declared embedding default.
  6. Add frontend tests for Settings and Onboarding to verify that catalog model IDs are not persisted automatically for azure_ai.
  7. 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

Activity

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions