From 2f6aac4d8602df847783c9fa554e3eb144e9e3fc Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 6 May 2026 15:26:01 -0700 Subject: [PATCH] feat: migration for LiteLLM_AgentVMConfig BYOC AWS settings table Picked up by `prisma migrate deploy` on proxy startup (the `litellm-proxy-extras` package bundles its own migration directory). LIT-2878 --- .../migration.sql | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 litellm-proxy-extras/litellm_proxy_extras/migrations/20260506220000_add_agent_vm_config/migration.sql diff --git a/litellm-proxy-extras/litellm_proxy_extras/migrations/20260506220000_add_agent_vm_config/migration.sql b/litellm-proxy-extras/litellm_proxy_extras/migrations/20260506220000_add_agent_vm_config/migration.sql new file mode 100644 index 00000000000..ca3faf0cef1 --- /dev/null +++ b/litellm-proxy-extras/litellm_proxy_extras/migrations/20260506220000_add_agent_vm_config/migration.sql @@ -0,0 +1,28 @@ +-- Adds `LiteLLM_AgentVMConfig` for BYOC AWS settings keyed by team. +-- Used by `litellm/proxy/agent_session_endpoints/vm_providers/ec2.py` to +-- provision per-session EC2 instances in the customer's AWS account. +-- +-- The `aws_creds_enc` column is a JSON blob whose individual fields are +-- encrypted via `encrypt_value_helper` (libsodium SecretBox), so partial DB +-- exports never expose the secret. Schema fields match +-- `litellm/proxy/agent_session_endpoints/vm_providers/base.Ec2Config`. + +CREATE TABLE IF NOT EXISTS "LiteLLM_AgentVMConfig" ( + "team_id" TEXT NOT NULL, + "aws_creds_enc" TEXT, + "region" TEXT, + "subnet_id" TEXT, + "security_group_id" TEXT, + "iam_instance_profile" TEXT, + "ami_id" TEXT, + "instance_type" TEXT, + "use_spot" BOOLEAN NOT NULL DEFAULT true, + "warm_pool_size" INTEGER NOT NULL DEFAULT 0, + "network_access" JSONB, + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "created_by" TEXT NOT NULL, + "updated_at" TIMESTAMP(3) NOT NULL, + "updated_by" TEXT NOT NULL, + + CONSTRAINT "LiteLLM_AgentVMConfig_pkey" PRIMARY KEY ("team_id") +);