Skip to content

Resolve "Ensure Code Generation Prompt matches model it's designed for on AI Gateway"

What does this MR do and why?

Updates the rails monolith to use the v3 code completions endpoint from the AI model gateway, behind the feature flag use_code_completion_v3_ai_gateway_endpoint

How to set up and validate locally

  1. Setup code suggestions for GDK use
  2. Enable the use_code_completion_v3_ai_gateway_endpoint feature flag
  3. Make a completion request to the monolith completion endpoint (i.e. /api/v4/code_suggestions/completions)

Valid request payload

{
  "prompt_version": 2,
  "project_path": "root/xray-repo-mirror",
  "current_file": {
    "file_name": "test.go",
    "content_above_cursor": "// write a function that parses a .env file",
    "content_below_cursor": ""
  }
}

MR acceptance checklist

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

Related to #433524 (closed)

Edited by Allen Cook

Merge request reports