Skip to content

Front-end iteration for self-deployed model configuration

What does this MR do and why?

It introduces new pages in the admin panel where admins can manage self-hosted models, including adding, editing, and deleting them. The feature is accessible via a new menu item in the admin sidebar. Additionally, the code includes changes to the user interface, such as adding a new "API token (if needed)" field and updating the labels and descriptions of various elements. The code also includes various checks and error handling to ensure that the feature works as expected and displays appropriate messages to users.

Front-end iteration for self-deployed model configuration

Changelog: added

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.

How to set up and validate locally

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

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)

Test it!

  1. Log in as an admin
  2. Visit the index page Admin Area > GitLab Duo Pro > Self-Hosted Models
  3. Create new self-hosted models with and without Api tokens.
  4. your page should look something like this:

Screenshot_2024-05-15_at_15.55.39

Related to #455590 (closed)

Edited by Patrick Cyiza

Merge request reports

Loading