litellm - ✅(Solved) Fix [Bug]: ValueError: Unsupported prompt: langfuse [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#23860Fetched 2026-04-08 00:54:18
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×2mentioned ×2subscribed ×2commented ×1

Error Message

Traceback (most recent call last): File "/usr/lib/python3.13/site-packages/starlette/routing.py", line 694, in lifespan async with self.lifespan_context(app) as maybe_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) File "/usr/lib/python3.13/site-packages/litellm/proxy/proxy_server.py", line 814, in proxy_startup_event await initialize(**worker_config) File "/usr/lib/python3.13/site-packages/litellm/proxy/proxy_server.py", line 5157, in initialize ) = await proxy_config.load_config(router=llm_router, config_file_path=config) File "/usr/lib/python3.13/site-packages/litellm/proxy/proxy_server.py", line 3255, in load_config init_prompts(all_prompts=prompts, config_file_path=config_file_path) File "/usr/lib/python3.13/site-packages/litellm/proxy/prompts/init_prompts.py", line 21, in init_prompts initialized_prompt = IN_MEMORY_PROMPT_REGISTRY.initialize_prompt( prompt=PromptSpec(**prompt), config_file_path=config_file_path, ) File "/usr/lib/python3.13/site-packages/litellm/proxy/prompts/prompt_registry.py", line 147, in initialize_prompt raise ValueError(f"Unsupported prompt: {prompt_integration}") ValueError: Unsupported prompt: langfuse

Fix Action

Fix / Workaround

When using the docker image v1.82.3-stable (and a few other patch versions)

PR fix notes

PR #24648: fix(prompt_registry): add init.py and registry for langfuse integ…

Description (problem / solution / changelog)

Relevant issues

Fixes #23860

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/test_litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Type

🐛 Bug Fix

Changes

The InMemoryPromptRegistry uses a dynamic discovery mechanism to find prompt management integrations (like Langfuse, Hub, etc.). While the logic for Langfuse existed in langfuse_prompt_management.py, the directory was missing the __init__.py file required for the scanner to recognize it as a valid module.

Root cause

The function get_prompt_initializer_from_integrations() in prompt_registry.py scans subdirectories for __init__.py files. Since litellm/integrations/langfuse/ lacked this file, the integration was silently skipped during the registry initialization, leading to an "Unsupported prompt" error when a user attempted to use prompt_integration: "langfuse" in their config.

Fix

  • Added litellm/integrations/langfuse/__init__.py.

  • Implemented an initialize_prompt() function in the __init__.py that correctly instantiates LangfusePromptManagement using getattr for safe attribute access from PromptLiteLLMParams.

  • Exported the prompt_initializer_registry dictionary so the scanner can automatically discover and register the Langfuse integration.

Testing

Added a new unit test tests/test_langfuse_prompt_init.py which verifies: test_langfuse_discovery_and_init. Confirms langfuse is present in the registry after discovery and ensures initialize_prompt creates a valid LangfusePromptManagement instance without raising AttributeError.

Changed files

  • .github/workflows/auto_update_price_and_context_window.yml (modified, +0/-6)
  • .github/workflows/check_duplicate_issues.yml (modified, +0/-1)
  • .github/workflows/codeql.yml (modified, +2/-4)
  • .github/workflows/codspeed.yml (modified, +0/-2)
  • .github/workflows/create_daily_staging_branch.yml (modified, +0/-6)
  • .github/workflows/helm_unit_test.yml (modified, +0/-5)
  • .github/workflows/issue-keyword-labeler.yml (modified, +0/-2)
  • .github/workflows/llm-translation-testing.yml (modified, +5/-10)
  • .github/workflows/read_pyproject_version.yml (modified, +0/-5)
  • .github/workflows/run_observatory_tests.yml (modified, +4/-7)
  • .github/workflows/scan_duplicate_issues.yml (modified, +0/-1)
  • .github/workflows/stale.yml (modified, +0/-4)
  • .github/workflows/test-linting.yml (modified, +0/-5)
  • .github/workflows/test-litellm-matrix.yml (modified, +1/-49)
  • .github/workflows/test-litellm-ui-build.yml (modified, +1/-3)
  • .github/workflows/test-litellm.yml (modified, +0/-5)
  • .github/workflows/test-mcp.yml (modified, +0/-5)
  • .github/workflows/test-model-map.yaml (modified, +0/-5)
  • .github/workflows/test-proxy-e2e-azure-batches.yml (modified, +0/-8)
  • .github/workflows/test_server_root_path.yml (modified, +0/-2)
  • enterprise/litellm_enterprise/enterprise_callbacks/callback_controls.py (modified, +85/-54)
  • enterprise/litellm_enterprise/enterprise_callbacks/send_emails/base_email.py (modified, +3/-3)
  • enterprise/litellm_enterprise/enterprise_callbacks/send_emails/sendgrid_email.py (modified, +1/-1)
  • enterprise/litellm_enterprise/proxy/auth/__init__.py (modified, +1/-1)
  • enterprise/litellm_enterprise/proxy/auth/custom_sso_handler.py (modified, +22/-15)
  • enterprise/litellm_enterprise/proxy/common_utils/check_batch_cost.py (modified, +45/-20)
  • enterprise/litellm_enterprise/proxy/common_utils/check_responses_cost.py (modified, +29/-13)
  • enterprise/litellm_enterprise/proxy/hooks/managed_files.py (modified, +148/-101)
  • enterprise/litellm_enterprise/proxy/hooks/managed_vector_stores.py (modified, +44/-48)
  • enterprise/litellm_enterprise/proxy/management_endpoints/key_management_endpoints.py (modified, +0/-1)
  • enterprise/litellm_enterprise/proxy/vector_stores/endpoints.py (modified, +3/-3)
  • enterprise/litellm_enterprise/types/enterprise_callbacks/send_emails.py (modified, +11/-1)
  • litellm/integrations/langfuse/__init__.py (added, +21/-0)
  • litellm/integrations/langfuse/langfuse_prompt_management.py (modified, +52/-15)
  • tests/test_litellm/integrations/langfuse/test_langfuse_prompt_init.py (added, +33/-0)

Code Example

prompts:
- prompt_id: "workflow-designer"
  litellm_params:
    prompt_id: "workflow-designer"
    prompt_integration: "langfuse"
    langfuse_public_key: "os.environ/LANGFUSE_PUBLIC_KEY"
    langfuse_secret_key: "os.environ/LANGFUSE_SECRET_KEY"

---

general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY
  store_model_in_db: true
  store_prompts_in_spend_logs: true
  maximum_spend_logs_retention_period: "3d"
  maximum_spend_logs_retention_interval: "1d"
litellm_settings:
  drop_params: true
  cache: true
  cache_params:
    type: redis
    namespace: "litellm_cache"
    ttl: 86400
prompts:
- prompt_id: "workflow-designer"
  litellm_params:
    prompt_id: "workflow-designer"
    prompt_integration: "langfuse"
    langfuse_public_key: "os.environ/LANGFUSE_PUBLIC_KEY"
    langfuse_secret_key: "os.environ/LANGFUSE_SECRET_KEY"

---

apiVersion: apps/v1
kind: Deployment
metadata:
  name: litellm-prod-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: app
      app.kubernetes.io/instance: prod
      app.kubernetes.io/project: litellm
  template:
    spec:
      volumes:
      - name: chart-configs
        configMap:
          name: litellm-prod-app-configmap
          defaultMode: 420
      containers:
      - name: app
        image: ghcr.io/berriai/litellm:v1.82.3-stable
        args:
        - "--config"
        - /app/litellm_config.yaml
        - "--detailed_debug"
        env:
        - name: STORE_MODEL_IN_DB
          value: "true"
        - name: LITELLM_MASTER_KEY
          value: **********
        - name: OPENAI_API_KEY
          value: **********
        - name: DATABASE_URL
          value: **********
        - name: R EDIS_HOST
          value: **********
        - name: REDIS_PORT
          value: **********
        - name: LANGFUSE_PUBLIC_KEY
          valueFrom:
            secretKeyRef:
              name: langfuse-creds
              key: LANGFUSE_PUBLIC_KEY
        - name: LANGFUSE_SECRET_KEY
          valueFrom:
            secretKeyRef:
              name: langfuse-creds
              key: LANGFUSE_SECRET_KEY
        - name: LANGFUSE_HOST
          value: http://app.langfuse
        resources:
          limits:
            cpu: 500m
            memory: 4Gi
          requests:
            cpu: 100m
            memory: 1Gi
        volumeMounts:
        - name: chart-configs
          mountPath: /app/litellm_config.yaml
          subPath: litellm_config.yaml

---

Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/starlette/routing.py", line 694, in lifespan
    async with self.lifespan_context(app) as maybe_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/litellm/proxy/proxy_server.py", line 814, in proxy_startup_event
    await initialize(**worker_config)
  File "/usr/lib/python3.13/site-packages/litellm/proxy/proxy_server.py", line 5157, in initialize
    ) = await proxy_config.load_config(router=llm_router, config_file_path=config)
  File "/usr/lib/python3.13/site-packages/litellm/proxy/proxy_server.py", line 3255, in load_config
    init_prompts(all_prompts=prompts, config_file_path=config_file_path)
  File "/usr/lib/python3.13/site-packages/litellm/proxy/prompts/init_prompts.py", line 21, in init_prompts
    initialized_prompt = IN_MEMORY_PROMPT_REGISTRY.initialize_prompt(
        prompt=PromptSpec(**prompt),
        config_file_path=config_file_path,
    )
  File "/usr/lib/python3.13/site-packages/litellm/proxy/prompts/prompt_registry.py", line 147, in initialize_prompt
    raise ValueError(f"Unsupported prompt: {prompt_integration}")
ValueError: Unsupported prompt: langfuse
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

When using the docker image v1.82.3-stable (and a few other patch versions)

I added a langfuse prompt to my config

prompts:
- prompt_id: "workflow-designer"
  litellm_params:
    prompt_id: "workflow-designer"
    prompt_integration: "langfuse"
    langfuse_public_key: "os.environ/LANGFUSE_PUBLIC_KEY"
    langfuse_secret_key: "os.environ/LANGFUSE_SECRET_KEY"

I consistently get a error

ValueError: Unsupported prompt: langfuse

Using cursor AI to debug, it seems that the issue is that there is no __init__.py in the langfuse folder so the langfuse is not register. I mounted a temp __init__.py into my image and it is now starting up.

Steps to Reproduce

Full config:

general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY
  store_model_in_db: true
  store_prompts_in_spend_logs: true
  maximum_spend_logs_retention_period: "3d"
  maximum_spend_logs_retention_interval: "1d"
litellm_settings:
  drop_params: true
  cache: true
  cache_params:
    type: redis
    namespace: "litellm_cache"
    ttl: 86400
prompts:
- prompt_id: "workflow-designer"
  litellm_params:
    prompt_id: "workflow-designer"
    prompt_integration: "langfuse"
    langfuse_public_key: "os.environ/LANGFUSE_PUBLIC_KEY"
    langfuse_secret_key: "os.environ/LANGFUSE_SECRET_KEY"

Kube Deployment file:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: litellm-prod-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: app
      app.kubernetes.io/instance: prod
      app.kubernetes.io/project: litellm
  template:
    spec:
      volumes:
      - name: chart-configs
        configMap:
          name: litellm-prod-app-configmap
          defaultMode: 420
      containers:
      - name: app
        image: ghcr.io/berriai/litellm:v1.82.3-stable
        args:
        - "--config"
        - /app/litellm_config.yaml
        - "--detailed_debug"
        env:
        - name: STORE_MODEL_IN_DB
          value: "true"
        - name: LITELLM_MASTER_KEY
          value: **********
        - name: OPENAI_API_KEY
          value: **********
        - name: DATABASE_URL
          value: **********
        - name: R EDIS_HOST
          value: **********
        - name: REDIS_PORT
          value: **********
        - name: LANGFUSE_PUBLIC_KEY
          valueFrom:
            secretKeyRef:
              name: langfuse-creds
              key: LANGFUSE_PUBLIC_KEY
        - name: LANGFUSE_SECRET_KEY
          valueFrom:
            secretKeyRef:
              name: langfuse-creds
              key: LANGFUSE_SECRET_KEY
        - name: LANGFUSE_HOST
          value: http://app.langfuse
        resources:
          limits:
            cpu: 500m
            memory: 4Gi
          requests:
            cpu: 100m
            memory: 1Gi
        volumeMounts:
        - name: chart-configs
          mountPath: /app/litellm_config.yaml
          subPath: litellm_config.yaml

Relevant log output

Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/starlette/routing.py", line 694, in lifespan
    async with self.lifespan_context(app) as maybe_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
  File "/usr/lib/python3.13/site-packages/litellm/proxy/proxy_server.py", line 814, in proxy_startup_event
    await initialize(**worker_config)
  File "/usr/lib/python3.13/site-packages/litellm/proxy/proxy_server.py", line 5157, in initialize
    ) = await proxy_config.load_config(router=llm_router, config_file_path=config)
  File "/usr/lib/python3.13/site-packages/litellm/proxy/proxy_server.py", line 3255, in load_config
    init_prompts(all_prompts=prompts, config_file_path=config_file_path)
  File "/usr/lib/python3.13/site-packages/litellm/proxy/prompts/init_prompts.py", line 21, in init_prompts
    initialized_prompt = IN_MEMORY_PROMPT_REGISTRY.initialize_prompt(
        prompt=PromptSpec(**prompt),
        config_file_path=config_file_path,
    )
  File "/usr/lib/python3.13/site-packages/litellm/proxy/prompts/prompt_registry.py", line 147, in initialize_prompt
    raise ValueError(f"Unsupported prompt: {prompt_integration}")
ValueError: Unsupported prompt: langfuse

What part of LiteLLM is this about?

Other

What LiteLLM version are you on ?

v1.82.3

Twitter / LinkedIn details

No response

extent analysis

Fix Plan

The fix involves adding an __init__.py file to the langfuse folder to register the langfuse prompt integration.

Here are the steps:

  • Create a new file named __init__.py in the langfuse folder.
  • Add the necessary registration code to the __init__.py file. For example:
# langfuse/__init__.py
from .langfuse_prompt import LangfusePrompt

def register_prompt():
    # Register the langfuse prompt integration
    from litellm.proxy.prompts.prompt_registry import IN_MEMORY_PROMPT_REGISTRY
    IN_MEMORY_PROMPT_REGISTRY.register_prompt("langfuse", LangfusePrompt)
  • Ensure that the LangfusePrompt class is defined in the langfuse_prompt.py file and inherits from the Prompt class.
  • Update the Docker image to include the new __init__.py file.

Alternatively, you can also use a Dockerfile to copy the __init__.py file into the langfuse folder during the build process:

# Dockerfile
COPY langfuse/__init__.py /usr/lib/python3.13/site-packages/litellm/proxy/prompts/langfuse/__init__.py

Verification

To verify that the fix worked, you can check the LiteLLM logs for any errors related to the langfuse prompt integration. You can also test the langfuse prompt by sending a request to the LiteLLM API.

Extra Tips

  • Make sure to update the Docker image and redeploy the LiteLLM application after making changes to the __init__.py file.
  • If you are using a virtual environment, ensure that the __init__.py file is included in the virtual environment.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING