mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-26 01:12:21 +00:00
feat(proxy): add LiteLLM_AccessGroupMembership table
Holds parent/child edges between access groups so a group can include another group's models. Schema + migration only; resolution next. Refs #28032
This commit is contained in:
parent
e58a561caa
commit
92729d8d64
4 changed files with 57 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
-- CreateTable
|
||||
CREATE TABLE IF NOT EXISTS "LiteLLM_AccessGroupMembership" (
|
||||
"id" TEXT NOT NULL,
|
||||
"parent_group" TEXT NOT NULL,
|
||||
"child_group" TEXT NOT NULL,
|
||||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
CONSTRAINT "LiteLLM_AccessGroupMembership_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS "LiteLLM_AccessGroupMembership_parent_group_child_group_key" ON "LiteLLM_AccessGroupMembership"("parent_group", "child_group");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX IF NOT EXISTS "LiteLLM_AccessGroupMembership_parent_group_idx" ON "LiteLLM_AccessGroupMembership"("parent_group");
|
||||
|
|
@ -1375,3 +1375,17 @@ model LiteLLM_WorkflowMessage {
|
|||
@@unique([run_id, sequence_number])
|
||||
@@index([run_id])
|
||||
}
|
||||
|
||||
// Parent/child relationships between access groups. Used by
|
||||
// _get_models_from_access_groups to expand a parent group into its
|
||||
// transitively-included models. Resolution is depth-first with a
|
||||
// visited set; cyclic edges are logged and skipped at read time.
|
||||
model LiteLLM_AccessGroupMembership {
|
||||
id String @id @default(uuid())
|
||||
parent_group String
|
||||
child_group String
|
||||
created_at DateTime @default(now())
|
||||
|
||||
@@unique([parent_group, child_group])
|
||||
@@index([parent_group])
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1375,3 +1375,17 @@ model LiteLLM_WorkflowMessage {
|
|||
@@unique([run_id, sequence_number])
|
||||
@@index([run_id])
|
||||
}
|
||||
|
||||
// Parent/child relationships between access groups. Used by
|
||||
// _get_models_from_access_groups to expand a parent group into its
|
||||
// transitively-included models. Resolution is depth-first with a
|
||||
// visited set; cyclic edges are logged and skipped at read time.
|
||||
model LiteLLM_AccessGroupMembership {
|
||||
id String @id @default(uuid())
|
||||
parent_group String
|
||||
child_group String
|
||||
created_at DateTime @default(now())
|
||||
|
||||
@@unique([parent_group, child_group])
|
||||
@@index([parent_group])
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1375,3 +1375,17 @@ model LiteLLM_WorkflowMessage {
|
|||
@@unique([run_id, sequence_number])
|
||||
@@index([run_id])
|
||||
}
|
||||
|
||||
// Parent/child relationships between access groups. Used by
|
||||
// _get_models_from_access_groups to expand a parent group into its
|
||||
// transitively-included models. Resolution is depth-first with a
|
||||
// visited set; cyclic edges are logged and skipped at read time.
|
||||
model LiteLLM_AccessGroupMembership {
|
||||
id String @id @default(uuid())
|
||||
parent_group String
|
||||
child_group String
|
||||
created_at DateTime @default(now())
|
||||
|
||||
@@unique([parent_group, child_group])
|
||||
@@index([parent_group])
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue