Skip to content

AI features update for "glab_ask_git_command" is on self managed

Gary Holtz requested to merge garyh-make-ai-git-command-self-managed into master

What does this MR do and why?

Adds support for glab duo ask for self-managed customers. This changes past references of ai_git_command to glab_ask_git_command to make it more descriptive, adds some feature logic, and adds a feature flag to skip sending the request through workhorse and call VertexAI directly.

More details can be found here: cli#7549 (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.

How to set up and validate locally

  1. Check out this MR
  2. Confirm the move_git_service_to_ai_gateway feature flag is enabled in the console
  3. Confirm you have the AI Gateway setup correctly in https://docs.gitlab.com/ee/development/ai_features/#required-setup-ai-gateway-endpoint-in-gitlab-rails
  4. In your AI gateway directory, either checkout this MR which includes support for the new unit primitive or make the changes yourself
  5. Restart AI gateway
  6. Download glab https://gitlab.com/gitlab-org/cli/
  7. Setup glab to use your local GDK instance. You can use glab auth login to set it up, but you'll probably need to generate a PAT in your GDK instance for a user that can use AI commands. You can confirm glab is setup correctly by checking ~/.config/glab-cli/config.yml and making sure you have an entry like:
    gdk.test:3443:
        api_protocol: https
        api_host: gdk.test:3443
        token: [snip]
  1. FINALLY: run glab duo ask "how do i undo a commit". Confirm you get an answer. Celebrate.
Edited by Gary Holtz

Merge request reports