{"record":{"id":"6ae22d7c598c2be1","repo":"BerriAI/litellm","slug":"levoai-collector-url-environment-variable-is-requi","errorCode":null,"errorMessage":"LEVOAI_COLLECTOR_URL environment variable is required for Levo integration. Please contact Levo support to get your collector URL.","messagePattern":"LEVOAI_COLLECTOR_URL environment variable is required for Levo integration\\. Please contact Levo support to get your collector URL\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/levo/levo.py","lineNumber":65,"sourceCode":"\n        Raises:\n            ValueError: If required environment variables are missing.\n        \"\"\"\n        # Required environment variables\n        api_key: Final = os.environ.get(\"LEVOAI_API_KEY\", None)\n        org_id: Final = os.environ.get(\"LEVOAI_ORG_ID\", None)\n        workspace_id: Final = os.environ.get(\"LEVOAI_WORKSPACE_ID\", None)\n        collector_url: Final = os.environ.get(\"LEVOAI_COLLECTOR_URL\", None)\n\n        # Validate required env vars\n        if not api_key:\n            raise ValueError(\"LEVOAI_API_KEY environment variable is required for Levo integration.\")\n        if not org_id:\n            raise ValueError(\"LEVOAI_ORG_ID environment variable is required for Levo integration.\")\n        if not workspace_id:\n            raise ValueError(\"LEVOAI_WORKSPACE_ID environment variable is required for Levo integration.\")\n        if not collector_url:\n            raise ValueError(\n                \"LEVOAI_COLLECTOR_URL environment variable is required for Levo integration. \"\n                \"Please contact Levo support to get your collector URL.\"\n            )\n\n        # Use collector URL exactly as provided by the user\n        endpoint: Final = collector_url\n        protocol: Final[Protocol] = \"otlp_http\"\n\n        # Build OTLP headers string\n        # Format: Authorization=Bearer {api_key},x-levo-organization-id={org_id},x-levo-workspace-id={workspace_id}\n        headers_parts: Final = [f\"Authorization=Bearer {api_key}\"]\n        headers_parts.append(f\"x-levo-organization-id={org_id}\")\n        headers_parts.append(f\"x-levo-workspace-id={workspace_id}\")\n\n        otlp_auth_headers: Final = \",\".join(headers_parts)\n\n        return LevoConfig(\n            otlp_auth_headers=otlp_auth_headers,","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/integrations/levo/levo.py#L47-L83","documentation":"Levo integration validation: LEVOAI_COLLECTOR_URL is missing. This URL is the OTLP HTTP endpoint events are POSTed to and is customer-specific (one per Levo tenant), which is why the message tells you to contact Levo support. Without it, no endpoint exists and exporter construction fails.","triggerScenarios":"levo callback enabled with the other three vars set but no LEVOAI_COLLECTOR_URL; URL present in a local .env but not loaded in the container; a placeholder value that was never replaced.","commonSituations":"New Levo customers who have keys/org/workspace but have not completed collector provisioning (Levo support supplies the URL); environments where only the generic Levo doc vars were set.","solutions":["Obtain your collector URL from Levo support and export LEVOAI_COLLECTOR_URL=https://<your-tenant-collector>","Confirm the URL matches exactly what Levo provided (it is used verbatim)","Set it alongside the other three LEVOAI_* vars in the deployment env","Until provisioned, disable the levo callback to keep the proxy bootable"],"exampleFix":"# before\n# LEVOAI_COLLECTOR_URL unset -> ValueError ... contact Levo support\n\n# after\nexport LEVOAI_API_KEY=...\nexport LEVOAI_ORG_ID=...\nexport LEVOAI_WORKSPACE_ID=...\nexport LEVOAI_COLLECTOR_URL=https://collect.mycompany.levo.ai","handlingStrategy":"validation","validationCode":"import os\n\ndef levo_config_valid() -> bool:\n    return bool(os.getenv(\"LEVOAI_COLLECTOR_URL\"))","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Complete Levo collector provisioning before enabling the callback","Add a connectivity preflight: issue an HTTP request to the collector URL at startup"],"tags":["python","levo","environment","configuration","onboarding"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}