mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
feat(codersdk): remove AI Bridge entitlement from Premium license (#21540)
## Summary AI Bridge is moving out of Premium as a separate add-on (GA in Feb 3). Closes https://github.com/coder/internal/issues/1226 ## Changes - Excludes `FeatureAIBridge` from `Enterprise()` and `FeatureSetPremium.Features()` - Adds soft warning for deployments with AI Bridge enabled but not entitled - Warning is displayed to Auditor/Owner roles in UI banner and CLI headers ## Warning Message When AI Bridge is enabled (`CODER_AIBRIDGE_ENABLED=true`) but the license doesn't include the entitlement: > AI Bridge has reached General Availability and your Coder deployment is not entitled to run this feature. Contact your account team (https://coder.com/contact) for information around getting a license with AI Bridge. ## Behavior - The feature remains usable in v2.30 (soft warning only) - Future versions may include hard enforcement
This commit is contained in:
@@ -623,16 +623,16 @@ func TestPremiumSuperSet(t *testing.T) {
|
||||
// Premium ⊃ Enterprise
|
||||
require.Subset(t, premium.Features(), enterprise.Features(), "premium should be a superset of enterprise. If this fails, update the premium feature set to include all enterprise features.")
|
||||
|
||||
// Premium = All Features EXCEPT usage limit features
|
||||
// Premium = All Features EXCEPT usage limit features and AI Bridge (add-on).
|
||||
expectedPremiumFeatures := []codersdk.FeatureName{}
|
||||
for _, feature := range codersdk.FeatureNames {
|
||||
if feature.UsesLimit() {
|
||||
if feature.UsesLimit() || feature == codersdk.FeatureAIBridge {
|
||||
continue
|
||||
}
|
||||
expectedPremiumFeatures = append(expectedPremiumFeatures, feature)
|
||||
}
|
||||
require.NotEmpty(t, expectedPremiumFeatures, "expectedPremiumFeatures should not be empty")
|
||||
require.ElementsMatch(t, premium.Features(), expectedPremiumFeatures, "premium should contain all features except usage limit features")
|
||||
require.ElementsMatch(t, premium.Features(), expectedPremiumFeatures, "premium should contain all features except usage limit features and AI Bridge")
|
||||
|
||||
// This check exists because if you misuse the slices.Delete, you can end up
|
||||
// with zero'd values.
|
||||
|
||||
Reference in New Issue
Block a user