feat: dynamic model discovery from vercel ai gateway (#1353)
This commit is contained in:
parent
2b0b42d144
commit
b1da86062e
74 changed files with 7426 additions and 2277 deletions
|
|
@ -1,9 +1,7 @@
|
|||
import type { UserType } from "@/app/(auth)/auth";
|
||||
import type { ChatModel } from "./models";
|
||||
|
||||
type Entitlements = {
|
||||
maxMessagesPerDay: number;
|
||||
availableChatModelIds: ChatModel["id"][];
|
||||
};
|
||||
|
||||
export const entitlementsByUserType: Record<UserType, Entitlements> = {
|
||||
|
|
@ -11,16 +9,14 @@ export const entitlementsByUserType: Record<UserType, Entitlements> = {
|
|||
* For users without an account
|
||||
*/
|
||||
guest: {
|
||||
maxMessagesPerDay: 20,
|
||||
availableChatModelIds: ["chat-model", "chat-model-reasoning"],
|
||||
maxMessagesPerDay: 10,
|
||||
},
|
||||
|
||||
/*
|
||||
* For users with an account
|
||||
*/
|
||||
regular: {
|
||||
maxMessagesPerDay: 100,
|
||||
availableChatModelIds: ["chat-model", "chat-model-reasoning"],
|
||||
maxMessagesPerDay: 50,
|
||||
},
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue