Resolve "Add feature flag to introduce Claude 3.7 Sonnet"

What does this MR do and why?

Adds a feature flag code_generation_claude_3_7_sonnet to use Claude 3.7 Sonnet for code generation

Requires gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!2034 (merged) to be merged before this can be merged

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

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

  1. Feature.enable(:code_generation_claude_3_7_sonnet)
curl -X "POST" "http://gdk.test:3000/api/v4/code_suggestions/completions" \
     -H 'Content-Type: application/json' \
     -H 'Authorization: Bearer AUTH_TOKEN' \
     -d $'{
  "project_path": "jashkenas/Underscore",
  "current_file": {
    "file_name": "user_test.js",
    "content_above_cursor": "// tests for createAssigner function",
    "content_below_cursor": ""
  },
  "instruction": "",
  "prompt_version": 2,
  "intent": "generation"
}'

Related to #521047 (closed)

Edited by Allen Cook

Merge request reports

Loading