Skip to content

Remove VertexAI prompts for chat

What does this MR do and why?

This MR removes all Vertex AI prompts for tools used in Chat.

This is because the chat's ai_request is now described as:

def ai_request
  ::Gitlab::Llm::Chain::Requests::AiGateway.new(user, tracking_context: tracking_context)
end

Source

and based on the code here

def provider_prompt_class
  ai_provider_name = ai_request.class.name.demodulize.underscore.to_sym

  self.class::PROVIDER_PROMPT_CLASSES[ai_provider_name]
end

the prompt provider class will always be obtained as self.class::PROVIDER_PROMPT_CLASSES[:ai_gateway], and hence Vertex AI prompts are redundant and can be removed.

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

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Related to #469377 (closed)

Edited by Manoj M J

Merge request reports

Loading