Fix inconsistend backend gating of snapshot description endpoint#7330
Open
cstns wants to merge 3 commits into
Open
Conversation
…`generatedSnapshotDescription` feature
…gure assistant preHandler for validation
… in `setupApp` to bypass config freeze
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## make-nrassistant-plugin-instalation-conditional #7330 +/- ##
===================================================================================
- Coverage 76.61% 76.61% -0.01%
===================================================================================
Files 405 405
Lines 20630 20638 +8
Branches 5002 5006 +4
===================================================================================
+ Hits 15805 15811 +6
- Misses 4825 4827 +2
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:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
This PR is part of a nested merge list. Do not merge until its target branch is main.
Description
The device and project snapshot description endpoints had inconsistent gating compared to other AI features. They checked enterprise license tier and team feature property but did not check the platform feature flag or validate that the assistant service was configured before calling
invokeLLM().Changes in
forge/routes/api/device.jsandforge/routes/api/project.js:app.config.features.enabled('generatedSnapshotDescription')platform feature flag check in the preHandlerhasFeaturecheck into separatehasPlatformFeatureandhasTeamFeaturechecks for clarityassistant.enabledandassistant.service.url) before reaching the handler logic. Returns400withassistant_not_configuredinstead of letting theinvokeLLMcall fail with a raw errorGating order (both endpoints):
aiflag, platform + team (404)generatedSnapshotDescriptionplatform feature flag (404)generatedSnapshotDescriptionteam feature property (404)This aligns both endpoints with the pattern used by the FIM inline completions endpoint in
assistant.js.Related Issue(s)
closes #7314
Checklist
flowforge.yml?FlowFuse/helmto update ConfigMap TemplateFlowFuse/CloudProjectto update values for Staging/ProductionLabels
area:migrationlabel