2025-09-21 12:03:29 +01:00
|
|
|
import type { UserType } from '@/app/(auth)/auth';
|
|
|
|
|
import type { ChatModel } from './models';
|
2025-04-25 23:40:15 -07:00
|
|
|
|
2025-09-21 12:03:29 +01:00
|
|
|
interface Entitlements {
|
2025-04-25 23:40:15 -07:00
|
|
|
maxMessagesPerDay: number;
|
2025-09-21 12:03:29 +01:00
|
|
|
availableChatModelIds: Array<ChatModel['id']>;
|
|
|
|
|
}
|
2025-04-25 23:40:15 -07:00
|
|
|
|
|
|
|
|
export const entitlementsByUserType: Record<UserType, Entitlements> = {
|
|
|
|
|
/*
|
|
|
|
|
* For users without an account
|
|
|
|
|
*/
|
|
|
|
|
guest: {
|
|
|
|
|
maxMessagesPerDay: 20,
|
2025-09-21 12:03:29 +01:00
|
|
|
availableChatModelIds: ['chat-model', 'chat-model-reasoning'],
|
2025-04-25 23:40:15 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* For users with an account
|
|
|
|
|
*/
|
|
|
|
|
regular: {
|
|
|
|
|
maxMessagesPerDay: 100,
|
2025-09-21 12:03:29 +01:00
|
|
|
availableChatModelIds: ['chat-model', 'chat-model-reasoning'],
|
2025-04-25 23:40:15 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* TODO: For users with an account and a paid membership
|
|
|
|
|
*/
|
|
|
|
|
};
|