{"record":{"id":"eca930875651a678","repo":"BerriAI/litellm","slug":"unknown-lazy-feature-name","errorCode":null,"errorMessage":"unknown lazy feature: {name}","messagePattern":"unknown lazy feature: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"litellm/proxy/_lazy_features.py","lineNumber":375,"sourceCode":"    Requires auth — anyone who can hit the proxy can already trigger the same\n    imports by sending a real request to a feature's prefix, but gating this\n    debug endpoint avoids unauthenticated callers forcing the import chain.\"\"\"\n    from fastapi import APIRouter, Depends, HTTPException\n    from fastapi.openapi.utils import get_openapi\n\n    from litellm.proxy.auth.user_api_key_auth import user_api_key_auth\n\n    router: Final = APIRouter()\n\n    @router.post(\n        \"/lazy/warm/{name}\",\n        include_in_schema=False,\n        dependencies=[Depends(user_api_key_auth)],\n    )\n    async def warm(name: str):\n        feat: Final = next((f for f in LAZY_FEATURES if f.name == name), None)\n        if feat is None:\n            raise HTTPException(404, f\"unknown lazy feature: {name}\")\n        if feat.persistent_swagger_stub:\n            return {\"stub_path\": None, \"paths\": {}, \"components\": {\"schemas\": {}}}\n\n        await _force_load(app, feat)\n\n        feat_routes: Final = [r for r in app.routes if feat.matches(getattr(r, \"path\", \"\"))]\n        full: Final = get_openapi(title=app.title, version=app.version, routes=feat_routes)\n        # Force all operations under one tag so they group under a single Swagger\n        # section — many lazy modules tag routes inconsistently.\n        for path_ops in full.get(\"paths\", {}).values():\n            for op in path_ops.values():\n                if isinstance(op, dict):\n                    op[\"tags\"] = [feat.name]\n        return {\n            \"stub_path\": feat.path_prefixes[0],\n            \"paths\": full.get(\"paths\", {}),\n            \"components\": {\"schemas\": full.get(\"components\", {}).get(\"schemas\", {})},\n        }","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/_lazy_features.py#L357-L393","documentation":"The lazy-warm debug endpoint received a feature name not present in the lazy-feature registry. It is a lookup guard on an authenticated-only endpoint that forces import of a feature module before first real use.","triggerScenarios":"Thrown at litellm/proxy/_lazy_features.py:375 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the lazy feature name against the supported list in _lazy_features.py."],"exampleFix":"Use a registered feature name.","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}