🚩(project) add more backend AI feature flags

The Blocknote AI feature is a bit flaky, we want
to be able to disable it if to much issues arise,
without having to do a new release.
We add a bunch of feature flags to be able to
disable the AI features if needed:
- add AI_FEATURE_BLOCKNOTE_ENABLED, to display
or not the feature powered by blocknote
- add AI_FEATURE_LEGACY_ENABLED, to display or not
the legacy AI features
This commit is contained in:
Anthony LC
2026-02-26 13:50:17 +01:00
parent 24ec1fa70e
commit 1070b91d2f
16 changed files with 397 additions and 391 deletions
+3 -1
View File
@@ -1852,7 +1852,7 @@ class DocumentViewSet(
# Check permissions first
self.get_object()
if not settings.AI_FEATURE_ENABLED:
if not settings.AI_FEATURE_ENABLED or not settings.AI_FEATURE_BLOCKNOTE_ENABLED:
raise ValidationError("AI feature is not enabled.")
ai_service = AIService()
@@ -2572,6 +2572,8 @@ class ConfigView(drf.views.APIView):
array_settings = [
"AI_BOT",
"AI_FEATURE_ENABLED",
"AI_FEATURE_BLOCKNOTE_ENABLED",
"AI_FEATURE_LEGACY_ENABLED",
"API_USERS_SEARCH_QUERY_MIN_LENGTH",
"COLLABORATION_WS_URL",
"COLLABORATION_WS_NOT_CONNECTED_READY_ONLY",