Enforce AI feature dependency checks for feature flags and assistant-…#7319
Conversation
…related configurations
…ion-behind-assistant-config-flag' into gate-all-ai-features-begind-ai-platform-and-team-type-flag # Conflicts: # forge/ee/lib/index.js
…assistant-config-flag' into gate-all-ai-features-begind-ai-platform-and-team-type-flag
…ture dependency checks
…proved type safety and maintainability
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## gate-snapshot-description-and-inline-completion-behind-assistant-config-flag #7319 +/- ##
=============================================================================================================
Coverage 76.59% 76.60%
=============================================================================================================
Files 405 405
Lines 20615 20621 +6
Branches 4993 4998 +5
=============================================================================================================
+ Hits 15790 15796 +6
Misses 4825 4825
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
We can't ship a breaking change like this, it's going to have to default to on and allow opt out I suggest we discuss this in the Eng meeting today |
|
The description needs updating, sorry for the confusion. The That default was implemented in #7317 (commit 93900f4). I'll update the description now to reflect this. |
Description
Important
This PR is part of a nested merge list, do not merge it until its target is main
Note
The
aiplatform feature flag defaults totruewhen not set (implemented in #7317, commit 93900f4), so this is not a breaking change. AI features remain enabled by default; operators who want to disable them must explicitly setaitofalse.All AI feature flags now respect the
aiflag introduced in the previous PR. Ifaiis disabled at either the platform or team type level, all downstream AI features are disabled.Platform level (forge/ee/lib/index.js):
generatedSnapshotDescriptionandassistantInlineCompletionsnow requireai.enabledin addition to assistant configurationexpertAssistantandexpertInsightsnow requireai.enabledin addition to their own configFrontend (frontend/src/stores/account-settings.js):
dependsOnsupport toFEATURE_CONFIGSandbuildFeatureChecksisGeneratedSnapshotDescriptionFeatureEnabledandisExpertAssistantFeatureEnableddepend onisAiFeatureEnabledBackend endpoints:
aiteam feature property check to snapshot description endpoints (device.js, project.js)aiteam feature property check to the FIM inline completions endpoint (assistant.js)assistant.enabled: falseand disable inline completions whenaiis disabled for the team (deviceLive.js, project.js)Related Issue(s)
closes #7312
Checklist
flowforge.yml?FlowFuse/helmto update ConfigMap TemplateFlowFuse/CloudProjectto update values for Staging/ProductionLabels
area:migrationlabel