fix: multiple issues
1. Script warning in layout.tsx - Use Next.js Script component instead of plain <script> 2. QUOTA_EXCEEDED bug for chart suggestions - Add 'suggest_charts' to VALID_FEATURES - Add 'suggest_charts' to TIER_LIMITS for all tiers - Fix route to use 'suggest_charts' instead of invalid 'ai' feature This fixes the issue where users with valid credit were getting QUOTA_EXCEEDED errors because 'ai' was not a valid feature name. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -78,6 +78,7 @@ const TIER_LIMITS: Record<SubscriptionTier, Record<string, number | 'unlimited'>
|
||||
brainstorm_create: 1,
|
||||
brainstorm_expand: 10,
|
||||
brainstorm_enrich: 20,
|
||||
suggest_charts: 5,
|
||||
},
|
||||
PRO: {
|
||||
semantic_search: 100,
|
||||
@@ -88,6 +89,7 @@ const TIER_LIMITS: Record<SubscriptionTier, Record<string, number | 'unlimited'>
|
||||
brainstorm_create: 30,
|
||||
brainstorm_expand: 100,
|
||||
brainstorm_enrich: 200,
|
||||
suggest_charts: 50,
|
||||
},
|
||||
BUSINESS: {
|
||||
semantic_search: 1000,
|
||||
@@ -98,6 +100,7 @@ const TIER_LIMITS: Record<SubscriptionTier, Record<string, number | 'unlimited'>
|
||||
brainstorm_create: 200,
|
||||
brainstorm_expand: 500,
|
||||
brainstorm_enrich: 1000,
|
||||
suggest_charts: 200,
|
||||
},
|
||||
ENTERPRISE: {
|
||||
semantic_search: 'unlimited',
|
||||
@@ -108,6 +111,7 @@ const TIER_LIMITS: Record<SubscriptionTier, Record<string, number | 'unlimited'>
|
||||
brainstorm_create: 'unlimited',
|
||||
brainstorm_expand: 'unlimited',
|
||||
brainstorm_enrich: 'unlimited',
|
||||
suggest_charts: 'unlimited',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ export const VALID_FEATURES = [
|
||||
'brainstorm_create',
|
||||
'brainstorm_expand',
|
||||
'brainstorm_enrich',
|
||||
'suggest_charts',
|
||||
] as const;
|
||||
|
||||
export type FeatureName = (typeof VALID_FEATURES)[number];
|
||||
|
||||
Reference in New Issue
Block a user