Skip to content

Add AiFeatureSelfHostedModels GraphQL query

What does this MR do and why?

GraphQL query to support frontend retrieving the self-hosted models compatible with a certain configurable AI feature.

Implementation AiFeatureSelfHostedModels GraphQL node

EE: true Changelog: added

How to set up and validate locally

Query has to look like:

query selfHostedModelsByAiFeature($feature: AiFeatures!) {
  selfHostedModelsByAiFeature(feature: $feature) {
    nodes {
      model
      endpoint
      id
    }
  }
}

and response

{
  "data": {
    "selfHostedModelsByAiFeature": {
      "nodes": [
        {
          "model": "codegemma_7b",
          "endpoint": "http://0.0.0.0:4000",
          "id": "gid://gitlab/Ai::SelfHostedModel/2"
        }
      ]
    }
  }
}

Related to #487948 (closed)

Edited by Patrick Cyiza

Merge request reports

Loading