From eb120428025ca9992744deb34e1fbfb487319156 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Wed, 6 May 2026 15:53:11 -0700 Subject: [PATCH] feat(warm-pool): package __init__ exposing manager, attach, builder --- .../warm_pool/__init__.py | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 litellm/proxy/agent_session_endpoints/warm_pool/__init__.py diff --git a/litellm/proxy/agent_session_endpoints/warm_pool/__init__.py b/litellm/proxy/agent_session_endpoints/warm_pool/__init__.py new file mode 100644 index 00000000000..eec467b0ddc --- /dev/null +++ b/litellm/proxy/agent_session_endpoints/warm_pool/__init__.py @@ -0,0 +1,37 @@ +"""Warm pool subsystem for `agent_session_endpoints` (LIT-2890). + +Pre-provisions a small pool of EC2 (or other provider) VMs per team so +``POST /v2/sessions`` can attach a fully-booted VM in <3s instead of the +30-90s cold-boot path. + +Public surface: +- ``WarmPoolManager`` — async maintenance loop (start it on proxy boot) +- ``attach_warm_vm`` — race-safe attach + hydrate, called from session create +- ``HydratePayload`` — wire format the daemon receives +""" + +from litellm.proxy.agent_session_endpoints.warm_pool.attach import ( + AttachResult, + attach_warm_vm, +) +from litellm.proxy.agent_session_endpoints.warm_pool.hydrate import ( + build_hydrate_payload, +) +from litellm.proxy.agent_session_endpoints.warm_pool.manager import WarmPoolManager +from litellm.proxy.agent_session_endpoints.warm_pool.types import ( + AgentConfig, + HydratePayload, + NetworkAccess, + RepoSpec, +) + +__all__ = [ + "AgentConfig", + "AttachResult", + "HydratePayload", + "NetworkAccess", + "RepoSpec", + "WarmPoolManager", + "attach_warm_vm", + "build_hydrate_payload", +]