Skip to content

Convert the self-hosted models configuration to Vue application - V2

Julie Huang requested to merge 463133-v2-custom-models-vue-app into master

What does this MR do and why?

This MR introduces a new Vue.js application for managing self-hosted AI models in the GitLab admin interface. It is a rebuild of existing UI created in HAML. The app will be developed iteratively behind a feature flag called :custom_models_vue_app. This MR introduces the app initialisation and empty state page only. Vue components for displaying, editing, and destroying models will be completed in follow up work.

How to set up and validate locally

Prequisites

You need an active GitLab ultimate license. Than in rails console enable the experiment fully

add_on = GitlabSubscriptions::AddOn.find_or_create_by!(name: "code_suggestions") {|e| e.description = "Test"}
add_on_purchase = GitlabSubscriptions::AddOnPurchase.create!(add_on: add_on, expires_on: 1.month.from_now, quantity: 5, purchase_xid: 'A-S0001')
Feature.enable(:self_managed_code_suggestions)
Feature.enable(:ai_custom_model)
ApplicationSetting.first.update(duo_features_enabled: true)
Feature.enable(:custom_models_vue_app) ## enables the vue app

Make sure you run your GDK instance with GITLAB_SIMULATE_SAAS=0 (for example, run export GITLAB_SIMULATE_SAAS=0 && gdk start to start the instance)

Test it!

  1. Log in as an admin
  2. Visit the index page Admin Area > AI-Powered Features > Models
  3. Without any self hosted models in the database, you should see the empty state page with a button to create new models. See screenshot below.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before (HAML) After (Vue)
Screenshot_2024-05-29_at_3.50.39_PM Screenshot_2024-05-29_at_3.46.03_PM

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Related to #463133 (closed)

Edited by Denys Mishunov

Merge request reports