﻿# How do lazy gateway imports affect the first request?

LiteLLM v1.113.0-dev.2 delays selected imports. Measure worker readiness, route-specific first use and warmed requests independently.

Author: Retrivium editorial team
Updated: 2026-11-29
Canonical URL: https://retrivium.ai/journal/daily-20261129-agents-litellm-lazy-import-first-use/
Language: en

LiteLLM published the v1.113.0-dev.2 prerelease on November 28. Its release notes describe loading realtime and provider cost modules on first use. The same notes describe changes to the lazy registry and an eager-loading mode controlled by `LITELLM_DISABLE_LAZY_LOADING`. The timing of some startup work can therefore depend on which route a fresh worker handles first. The release notes provide no universal latency improvement.

## Measure the start of an individual worker

Record process start, the first health response and the first success for a selected route. Hit each worker independently in staging because a load balancer may land on an already warmed process. Include an ordinary route and one that actually uses a deferred module. Log cold and warm results separately with the worker and build identities.

## Exercise the selector used in production

Use the same dependencies and import policy as the deployment. When comparing lazy and eager behavior, evaluate startup latency and first-use latency together. Test the realtime path and a route with provider-specific cost calculation if the service enables them. In a staging fixture, confirm that the outbound call and usage record are correct as well as timely.

## Check concurrent first use

Start a fresh worker and deliver the expected mix of simultaneous requests. Observe queue time, memory and completed usage records. A single first request may hide delays that matter when several routes first need their modules together. Use synthetic data and the authorized staging endpoints so a test measures the service without affecting users or billing.

## Align readiness with product traffic

Decide which routes need to succeed before traffic can arrive and which can load when requested. An application can warm the expected route before enabling it and still keep rarely used features deferred. Compare the actual first-request distribution after rollout. Changes in worker placement or request mix can matter more than a faster module import in isolation.

## Sources

- [Primary source · litellm v1.113.0-dev.2](https://github.com/BerriAI/litellm/releases/tag/v1.113.0-dev.2)
- [Primary source · litellm #54539](https://github.com/BerriAI/litellm/pull/54539)
- [Primary source · litellm #54344](https://github.com/BerriAI/litellm/pull/54344)

## Related reading

- [Related guide · Runai model streamer cold start loading readiness evidence](/journal/runai-model-streamer-cold-start-loading-readiness-evidence/)
- [Related guide · Autoscaling gpu cold start](/journal/autoscaling-gpu-cold-start/)
