Implementation AiFeatureSettingUpdate GraphQL node

What does this MR do and why?

Implementation AiFeatureSettingUpdate GraphQL node. It upsets a ::Ai::FeatureSetting.

How to set up and validate locally

  • Activate the ai_custom_model FF.
  • Login as an admin and visit http://gdk.test:3000/-/graphql-explorer
  • Ensure you have a Ai::SelfHostedModel instance created and note the ID below
  • Do the GQL mutation below.
mutation AiFeatureSettingUpdate($input: AiFeatureSettingUpdateInput!) {
  aiFeatureSettingUpdate(input: $input) {
    aiFeatureSetting {
      feature
      provider
      selfHostedModel {
        name
        id
        endpoint
      }
    }
  }
}

Inputs:

{
  "input": {
    "feature": "DUO_CHAT",
    "provider": "SELF_HOSTED",
    "selfHostedModelId": "gid://gitlab/Ai::SelfHostedModel/1"
  }
}

Enum type for feature setting:

|Screenshot_2024-09-05_at_10.12.28|

Enum type for providers:

|Screenshot_2024-09-05_at_10.12.09|

Related to #476661 (closed)

Edited by Lucas Charles

Merge request reports

Loading