Initialise Self-hosted Model Create App
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 theadmin/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 |
---|---|
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 return0
- 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)
- Navigate to your GDK instance in browser
- Click on "Admin" button at the bottom of the left sidebar
- Open the "AI-powered features" drop down in the admin area sidebar
- Click on "Self-hosted models"
- You may may be asked to accept some terms and conditions with usage (accept them)
- 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