Skip to content

Initialise Self-hosted Model Create App

Julie Huang requested to merge 463135-initialise-new-self-hosted-model-app into master

What does this MR do and why?

This MR is part of the work taking place to convert the self-hosted models configuration pages from HAML to Vue. The work is feature flagged behind custom_models_vue_app and implements this Figma design.

What does the MR do?

  • If FF is enabled, mount the NewSelfHostedModel Vue app when the admin/ai/self_hosted_models/new endpoint is visited
  • Defines createSelfHostedModel mutation query for data fetching

This MR is split from !159043 (closed) to make the work easier to review (the original MR will be closed)

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

Note: This MR only initialises the app and adds the form container. The form contents is coming in a follow up.

Before After
Screenshot_2024-07-25_at_3.03.27_PM Screenshot_2024-07-25_at_2.56.39_PM

How to set up and validate locally

You will need:

  • An active GitLab ultimate license
  • Disable SAAS mode when running GDK
    • echo $GITLAB_SIMULATE_SAAS should return 0
    • See the docs for more information
  • Run the following commands in your terminal
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)
Feature.enable(:custom_models_vue_app)
ApplicationSetting.first.update(duo_features_enabled: true)
  1. Navigate to your GDK instance in browser
  2. Click on "Admin" button at the bottom of the left sidebar
  3. Open the "AI-powered features" drop down in the admin area sidebar
  4. Click on "Self-hosted models"
  5. You may may be asked to accept some terms and conditions with usage (accept them)
  6. If you do not have any models created, you will see an empty state where you will be prompted to create a new one. If you already have models, you will see a table and a button labeled "New model". Both will lead to the same "Create" skeleton page which is what this MR has added.

Related to #463135 (closed)

Edited by Julie Huang

Merge request reports

Loading