Skip to content

Configuration option to switch model for Code generations/completions

What does this MR do and why?

Related issue: Configuration option to select model (#454323 - closed). Draft MR with the full functionality: Draft: Instance-Level Self-Hosted Model serving... (!151505 - closed)

This MR introduces UI for switching model for Code Generations and Code Completions.

Prerequisite

A customer should first configure a self-hosted model:

output

This MR

Screen_Recording_2024-05-08_at_15.08.50

How to test it

  1. Checkout this branch
  2. Make sure that the feature is available for your environment: https://gitlab.com/gitlab-org/gitlab/-/blob/f5b475469a8c4108f5a04d4d86c07cc9bae6c600/ee/app/controllers/admin/ai/feature_settings_controller.rb#L60-62
  1. This MR requires Ai::SelfHostedModel record to be created in the database. The table/model exists on the target branch, but the UI doesn't yet exists there: Front-end iteration for self-deployed model con... (!152107 - merged). Please, create a record in Rails console: ::Ai::SelfHostedModel.create!(model: 0, endpoint: 'http://127.0.0.1:11434/v1', name: 'mistral-7B', api_token: 'token')
Edited by Igor Drozdov

Merge request reports

Loading