Discussion: Should Self-managed customers be required to select a default Duo namespace

The default Duo namespace setting was added as a concept for gitlab.com: https://docs.gitlab.com/user/gitlab_duo/model_selection/#assign-a-default-gitlab-duo-namespace

But it is actually being used for all instances.

This issue is to align the Custom Models and Chat teams on this feature and make sure that our documentation and code accurately reflect the current state.

For example, right now this setting is documented as part of Model Selection but it actually has implications and use-cases for all of DAP.

Why do we have default Duo namespace?

The reason that a user might need to set this on .com is that if they belong to multiple top level groups and are using a feature like Agentic Chat outside of the context of a group or project, we need to know which entity we should look at to determine the LLM to use.

Use-case: model selection when using feature outside of the context of a group or project

For self-managed, model selection happens at the instance level. Therefore, there is no need to pick a default Duo namespace to determine model selection on SM instances. The setting at the instance level applies to all users in the instance.

On .com, model selection happens for a top level group. Therefore, if a user belongs to multiple Duo-enabled top-level groups we need to know which model selection settings to use when they are using a feature outside of the context of a project or group.

Use-case: Agentic chat outside of the context of a group or project

Agentic Chat sessions are always associated with a namespace when they are saved in the database.

The default Duo namespace is used to determine which namespace to use. Thread on this topic:

In Duo Agent Platform case, the default namespace is used for persisting a workflow entry and stuffing the namespace into the agent's prompt for hinting what the user is currently working on.

For DAP (specifically Agentic Chat) this means that the default Duo namespace setting is required on all instances. We cannot associate a chat session with the instance, it needs to be a namespace. So for SM users, we must ask them to set a default Duo namespace.