forked from phoenix/litellm-mirror
build: update schema.prisma
This commit is contained in:
parent
0c8258c522
commit
5feea04831
2 changed files with 78 additions and 11 deletions
|
@ -7,10 +7,42 @@ generator client {
|
||||||
provider = "prisma-client-py"
|
provider = "prisma-client-py"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Budget / Rate Limits for an org
|
||||||
|
model LiteLLM_BudgetTable {
|
||||||
|
budget_id String @id @default(uuid())
|
||||||
|
max_budget Float?
|
||||||
|
max_parallel_requests Int?
|
||||||
|
tpm_limit BigInt?
|
||||||
|
rpm_limit BigInt?
|
||||||
|
model_max_budget Json @default("{}")
|
||||||
|
budget_duration String?
|
||||||
|
budget_reset_at DateTime?
|
||||||
|
created_at DateTime @default(now()) @map("created_at")
|
||||||
|
created_by String
|
||||||
|
updated_at DateTime @default(now()) @updatedAt @map("updated_at")
|
||||||
|
updated_by String
|
||||||
|
}
|
||||||
|
|
||||||
|
model LiteLLM_OrganizationTable {
|
||||||
|
organization_id String @id @default(uuid())
|
||||||
|
organization_alias String?
|
||||||
|
budget_id String
|
||||||
|
metadata Json @default("{}")
|
||||||
|
models String[]
|
||||||
|
spend Float @default(0.0)
|
||||||
|
model_spend Json @default("{}")
|
||||||
|
created_at DateTime @default(now()) @map("created_at")
|
||||||
|
created_by String
|
||||||
|
updated_at DateTime @default(now()) @updatedAt @map("updated_at")
|
||||||
|
updated_by String
|
||||||
|
litellm_budget_table LiteLLM_BudgetTable @relation(fields: [budget_id], references: [budget_id])
|
||||||
|
}
|
||||||
|
|
||||||
// Assign prod keys to groups, not individuals
|
// Assign prod keys to groups, not individuals
|
||||||
model LiteLLM_TeamTable {
|
model LiteLLM_TeamTable {
|
||||||
team_id String @unique
|
team_id String @id @default(uuid())
|
||||||
team_alias String?
|
team_alias String?
|
||||||
|
organization_id String?
|
||||||
admins String[]
|
admins String[]
|
||||||
members String[]
|
members String[]
|
||||||
members_with_roles Json @default("{}")
|
members_with_roles Json @default("{}")
|
||||||
|
@ -27,11 +59,12 @@ model LiteLLM_TeamTable {
|
||||||
updated_at DateTime @default(now()) @updatedAt @map("updated_at")
|
updated_at DateTime @default(now()) @updatedAt @map("updated_at")
|
||||||
model_spend Json @default("{}")
|
model_spend Json @default("{}")
|
||||||
model_max_budget Json @default("{}")
|
model_max_budget Json @default("{}")
|
||||||
|
litellm_organization_table LiteLLM_OrganizationTable @relation(fields: [organization_id], references: [organization_id])
|
||||||
}
|
}
|
||||||
|
|
||||||
// Track spend, rate limit, budget Users
|
// Track spend, rate limit, budget Users
|
||||||
model LiteLLM_UserTable {
|
model LiteLLM_UserTable {
|
||||||
user_id String @unique
|
user_id String @id
|
||||||
team_id String?
|
team_id String?
|
||||||
teams String[] @default([])
|
teams String[] @default([])
|
||||||
user_role String?
|
user_role String?
|
||||||
|
@ -51,7 +84,7 @@ model LiteLLM_UserTable {
|
||||||
|
|
||||||
// Generate Tokens for Proxy
|
// Generate Tokens for Proxy
|
||||||
model LiteLLM_VerificationToken {
|
model LiteLLM_VerificationToken {
|
||||||
token String @unique
|
token String @id
|
||||||
key_name String?
|
key_name String?
|
||||||
key_alias String?
|
key_alias String?
|
||||||
spend Float @default(0.0)
|
spend Float @default(0.0)
|
||||||
|
@ -82,7 +115,7 @@ model LiteLLM_Config {
|
||||||
|
|
||||||
// View spend, model, api_key per request
|
// View spend, model, api_key per request
|
||||||
model LiteLLM_SpendLogs {
|
model LiteLLM_SpendLogs {
|
||||||
request_id String @unique
|
request_id String @id
|
||||||
call_type String
|
call_type String
|
||||||
api_key String @default ("")
|
api_key String @default ("")
|
||||||
spend Float @default(0.0)
|
spend Float @default(0.0)
|
||||||
|
@ -100,9 +133,10 @@ model LiteLLM_SpendLogs {
|
||||||
team_id String?
|
team_id String?
|
||||||
end_user String?
|
end_user String?
|
||||||
}
|
}
|
||||||
|
|
||||||
// Beta - allow team members to request access to a model
|
// Beta - allow team members to request access to a model
|
||||||
model LiteLLM_UserNotifications {
|
model LiteLLM_UserNotifications {
|
||||||
request_id String @unique
|
request_id String @id
|
||||||
user_id String
|
user_id String
|
||||||
models String[]
|
models String[]
|
||||||
justification String
|
justification String
|
||||||
|
|
|
@ -7,10 +7,42 @@ generator client {
|
||||||
provider = "prisma-client-py"
|
provider = "prisma-client-py"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Budget / Rate Limits for an org
|
||||||
|
model LiteLLM_BudgetTable {
|
||||||
|
budget_id String @id @default(uuid())
|
||||||
|
max_budget Float?
|
||||||
|
max_parallel_requests Int?
|
||||||
|
tpm_limit BigInt?
|
||||||
|
rpm_limit BigInt?
|
||||||
|
model_max_budget Json @default("{}")
|
||||||
|
budget_duration String?
|
||||||
|
budget_reset_at DateTime?
|
||||||
|
created_at DateTime @default(now()) @map("created_at")
|
||||||
|
created_by String
|
||||||
|
updated_at DateTime @default(now()) @updatedAt @map("updated_at")
|
||||||
|
updated_by String
|
||||||
|
}
|
||||||
|
|
||||||
|
model LiteLLM_OrganizationTable {
|
||||||
|
organization_id String @id @default(uuid())
|
||||||
|
organization_alias String?
|
||||||
|
budget_id String
|
||||||
|
metadata Json @default("{}")
|
||||||
|
models String[]
|
||||||
|
spend Float @default(0.0)
|
||||||
|
model_spend Json @default("{}")
|
||||||
|
created_at DateTime @default(now()) @map("created_at")
|
||||||
|
created_by String
|
||||||
|
updated_at DateTime @default(now()) @updatedAt @map("updated_at")
|
||||||
|
updated_by String
|
||||||
|
litellm_budget_table LiteLLM_BudgetTable @relation(fields: [budget_id], references: [budget_id])
|
||||||
|
}
|
||||||
|
|
||||||
// Assign prod keys to groups, not individuals
|
// Assign prod keys to groups, not individuals
|
||||||
model LiteLLM_TeamTable {
|
model LiteLLM_TeamTable {
|
||||||
team_id String @unique
|
team_id String @id @default(uuid())
|
||||||
team_alias String?
|
team_alias String?
|
||||||
|
organization_id String?
|
||||||
admins String[]
|
admins String[]
|
||||||
members String[]
|
members String[]
|
||||||
members_with_roles Json @default("{}")
|
members_with_roles Json @default("{}")
|
||||||
|
@ -27,11 +59,12 @@ model LiteLLM_TeamTable {
|
||||||
updated_at DateTime @default(now()) @updatedAt @map("updated_at")
|
updated_at DateTime @default(now()) @updatedAt @map("updated_at")
|
||||||
model_spend Json @default("{}")
|
model_spend Json @default("{}")
|
||||||
model_max_budget Json @default("{}")
|
model_max_budget Json @default("{}")
|
||||||
|
litellm_organization_table LiteLLM_OrganizationTable @relation(fields: [organization_id], references: [organization_id])
|
||||||
}
|
}
|
||||||
|
|
||||||
// Track spend, rate limit, budget Users
|
// Track spend, rate limit, budget Users
|
||||||
model LiteLLM_UserTable {
|
model LiteLLM_UserTable {
|
||||||
user_id String @unique
|
user_id String @id
|
||||||
team_id String?
|
team_id String?
|
||||||
teams String[] @default([])
|
teams String[] @default([])
|
||||||
user_role String?
|
user_role String?
|
||||||
|
@ -51,7 +84,7 @@ model LiteLLM_UserTable {
|
||||||
|
|
||||||
// Generate Tokens for Proxy
|
// Generate Tokens for Proxy
|
||||||
model LiteLLM_VerificationToken {
|
model LiteLLM_VerificationToken {
|
||||||
token String @unique
|
token String @id
|
||||||
key_name String?
|
key_name String?
|
||||||
key_alias String?
|
key_alias String?
|
||||||
spend Float @default(0.0)
|
spend Float @default(0.0)
|
||||||
|
@ -82,7 +115,7 @@ model LiteLLM_Config {
|
||||||
|
|
||||||
// View spend, model, api_key per request
|
// View spend, model, api_key per request
|
||||||
model LiteLLM_SpendLogs {
|
model LiteLLM_SpendLogs {
|
||||||
request_id String @unique
|
request_id String @id
|
||||||
call_type String
|
call_type String
|
||||||
api_key String @default ("")
|
api_key String @default ("")
|
||||||
spend Float @default(0.0)
|
spend Float @default(0.0)
|
||||||
|
@ -103,7 +136,7 @@ model LiteLLM_SpendLogs {
|
||||||
|
|
||||||
// Beta - allow team members to request access to a model
|
// Beta - allow team members to request access to a model
|
||||||
model LiteLLM_UserNotifications {
|
model LiteLLM_UserNotifications {
|
||||||
request_id String @unique
|
request_id String @id
|
||||||
user_id String
|
user_id String
|
||||||
models String[]
|
models String[]
|
||||||
justification String
|
justification String
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue