Add "disable_code_gecko_default" feature flag
What does this MR do and why?
Adds the ability to disable code gecko as the default code completion model using a feature flag disable_code_gecko_default
In non-asia regions, it will default to vertex_ai/codestral-2501, in asian regions, it will default to fireworks_ai/qwen2p5-coder-7b
This changes the default, so any other feature flags relating to code completion (i.e. fireworks_qwen_code_completion or amazon_q_chat_and_code_suggestions) need to be disabled for this to work
Depends on AIGW MR gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!1993 (merged)
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
Code Suggestions API
curl -X "POST" "http://gdk.test:3000/api/v4/code_suggestions/completions" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer AUTH_TOKEN' \
-d $'{
"current_file": {
"file_name": "test.go",
"content_above_cursor": "// write a function that parses a .env file",
"content_below_cursor": "//end function"
},
"prompt_version": 2,
"intent": "completion"
}'
should return "model.name": "vertex_ai/codestral-2501",
Direct Access
curl -X "POST" "http://gdk.test:3000/api/v4/code_suggestions/direct_access" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer AUTH_TOKEN' \
-d $'{}'
Should return "headers.x-gitlab-enabled-feature-flags": "disable_code_gecko_default"
Related to #519375 (closed)