Resolve "Add feature flag for Fireworks/Codestral 25.01 code completion"
What does this MR do and why?
Depends on AIGW MR gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!2219 (merged)
Adds two feature flags
use_fireworks_codestral_code_completion
to enable Fireworks/Codestral code completion per-user
code_completion_opt_out_fireworks
to opt-out groups/instance from using Fireworks (intended to eventually replace code_completion_model_opt_out_from_fireworks_qwen
)
How to set up and validate locally
Request
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"
}'
Feature.enable(:use_fireworks_codestral_code_completion)
- Response should contain
model.name: "text-completion-fireworks_ai/codestral-2501"
Feature.enable(:code_completion_opt_out_fireworks)
- Response should not contain
model.name: "text-completion-fireworks_ai/codestral-2501"
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #525571
Edited by Allen Cook