Skip to content

Add user setting for default namespace for no-context requests | Model Selection

Context

For Model selection we need to be able to route request when no namespace is given. For instance, when a developer is working in a new repo that is not yet an GitLab project or when they use the various AI capabilities of the GitLab CLI.

task

In this issue we are setting up a new user setting 'Default GitLab Duo Group' to be able to route these request in the cases above.

Specifications

  • Only duo namespaces where the user has sits should be able to be assigned in this setting.
  • Don't forget that it can be null. It is its default state and it can be setten back to null.
  • Nullify if the seat is removed

This issue just take care of the backend.

Implementation Proposal

Add a default_duo_namespace_id field to the user_preferences table.

Make sure in the validation of the field that the value of default_duo_namespace_id is the ID of a namespace where user has seats

Edited by Patrick Cyiza