[ActiveContext Code] Select embedding model in UI
## Context We need to provide the option for admins to select the embedding model to use _per collection_. Currently the only embedding model available is Vertex AI `text-embedding-005` but this is not necessarily available for all SM instances. This could be added to the Semantic Search section on the Search Admin Settings page. Another nice-to-have would be to show the currently used model (`current_indexing_embedding_model` / `search_embedding_model`) for each collection. ## Proposal ### Blocker notes - This needs https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/issues/1879+ before it can be fully productionized - However, this issue can be started and merged behind a feature flag, just make sure to check out the MR: https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/merge_requests/4612+, since you will need the changes to [`ai_gateway/model_selection/unit_primitives.yml`](https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/blob/ad9bcd78e79d005c988d5fc01ad2be47250940ce/ai_gateway/model_selection/unit_primitives.yml#L691) from that MR. ### Implementation 1. Add the embedding model selection setting in the **Admin -> Search** page - In the **Admin -> Search -> Semantic Search** section, add a card that displays the current embedding model (see [vector storage implementation](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/224735) for reference) - This should have a "Change Model" button that redirects to a new page for embedding model selection - The "Change Model" button should be disabled / greyed-out if the collection has a `next_indexing_embedding_model` 2. Embedding model selection page and related operations (see [mockup](https://gitlab.com/gitlab-org/gitlab/-/issues/582638#note_3094331050)) - Recommended breadcrumb: **Admin -> Search -> Semantic Search: Code Embeddings Model** - Add dropdown/selection fields for `Embedding model` and `Dimensions` - The `Embedding model` options should come from the list of models under the `embeddings_code` feature in [`ai_gateway/model_selection/unit_primitives.yml`](https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/blob/ad9bcd78e79d005c988d5fc01ad2be47250940ce/ai_gateway/model_selection/unit_primitives.yml#L691) - see [MR introducing feature in the yaml](https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/merge_requests/4612) - this is fetched from AIGW through the `Ai::ModelSelection::FetchModelDefinitionsService` - When the user clicks "Save", show a confirmation dialog saying that this action is destructive, uses extra storage and will not finish immediately. - When the user confirms the action, trigger the model switching and backfill service (`Ai::ActiveContext::EmbeddingModelActivationService`) 3. In the **Admin -> Gitlab Duo -> Model Configuration** page, add a link to the new Embedding Model Selection page
issue