{"record":{"id":"ba6a953060eb19f8","repo":"BerriAI/litellm","slug":"phoenix-api-key-must-be-set-when-using-phoenix-clo","errorCode":null,"errorMessage":"PHOENIX_API_KEY must be set when using Phoenix Cloud (app.phoenix.arize.com).","messagePattern":"PHOENIX_API_KEY must be set when using Phoenix Cloud \\(app\\.phoenix\\.arize\\.com\\)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/arize/arize_phoenix.py","lineNumber":436,"sourceCode":"                        endpoint = f\"{collector_endpoint}v1/traces\"\n                    else:\n                        endpoint = f\"{collector_endpoint}/v1/traces\"\n                else:\n                    endpoint = collector_endpoint\n                protocol = \"otlp_http\"\n        else:\n            endpoint = \"http://localhost:6006/v1/traces\"\n            protocol = \"otlp_http\"\n            verbose_logger.debug(\n                \"No PHOENIX_COLLECTOR_ENDPOINT found, using default local Phoenix endpoint: %s\", endpoint\n            )\n\n        otlp_auth_headers = None\n        if api_key is not None:\n            auth_header_key = \"authorization\" if protocol == \"otlp_grpc\" else \"Authorization\"\n            otlp_auth_headers = f\"{auth_header_key}=Bearer {api_key}\"\n        elif \"app.phoenix.arize.com\" in endpoint:\n            raise ValueError(\"PHOENIX_API_KEY must be set when using Phoenix Cloud (app.phoenix.arize.com).\")\n\n        project_name: Final = os.environ.get(\"PHOENIX_PROJECT_NAME\") or \"default\"\n\n        return ArizePhoenixConfig(\n            otlp_auth_headers=otlp_auth_headers,\n            protocol=protocol,\n            endpoint=endpoint,\n            project_name=project_name,\n        )\n\n    async def async_health_check(self):\n        config: Final = self.get_arize_phoenix_config()\n\n        if not config.otlp_auth_headers:\n            return {\n                \"status\": \"unhealthy\",\n                \"error_message\": \"PHOENIX_API_KEY environment variable not set\",\n            }","sourceCodeStart":418,"sourceCodeEnd":454,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/integrations/arize/arize_phoenix.py#L418-L454","documentation":"Error \"PHOENIX_API_KEY must be set when using Phoenix Cloud (app.phoenix.arize.com).\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/integrations/arize/arize_phoenix.py:436 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set PHOENIX_API_KEY when connecting to Phoenix Cloud (app.phoenix.arize.com)."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}