Skip to content

Adds POST /code-sugestions/verify

Eduardo Bonet requested to merge ai-framework/verify-endpoint into master

What does this MR do and why?

Why

There are many reasons why code suggestions plugin might not be working, and working through them can be confusing for users. #418999 (closed) discusses the many potential errors messages. While these can be returned when a suggestion is requested, another solution is to have an endpoint that allows for this check in a central place.

What

Adds POST /code-sugestions/verify

The new endpoint adds a way for users to quickly check whether the setup of Duo is working correctly, and potentially get messages to help them fix the missing steps. It also returns metadata necessary for client (saving us a call to /metadata). It is built to replace /ml/ai-assist

A usage of this endpoint could be seen on gitlab-org/editor-extensions/gitlab-jetbrains-plugin!79 (merged), where on the JetBrains plugin we add a button allowing users to verify the server, PAT and setup. The medatada is also necessary for plugins to check which endpoint to fetch suggestions from.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Eduardo Bonet

Merge request reports