Skip to content

Add disabled_direct_code_suggestions setting

Jan Provaznik requested to merge jp-dc-setting into master

What does this MR do and why?

Adds disabled_direct_code_suggestions application setting which can be used to disable direct connections to AI Gateway for code completions.

If this admin sets this option, then direct_access endpoint (used by clients to obtain connection details) will return an error code so client will fall-back to use indirect connections through Rails.

Related to #462791 (closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
settings-before settings-after

How to set up and validate locally

  1. Add a valid codesuggestion addon (https://docs.gitlab.com/ee/development/code_suggestions/#setup-instructions-to-use-gdk-with-the-code-suggestions-add-on)
  2. Navigate to Admin->Settings and check that there is an option to disable direct connections
Edited by Jan Provaznik

Merge request reports