{"record":{"id":"a204e8378e677cea","repo":"BerriAI/litellm","slug":"arize-api-key-not-found-in-environment-variables","errorCode":null,"errorMessage":"ARIZE_API_KEY not found in environment variables","messagePattern":"ARIZE_API_KEY not found in environment variables","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/litellm_core_utils/litellm_logging.py","lineNumber":4554,"sourceCode":"                    return callback\n        elif logging_integration == \"opik\":\n            for callback in _in_memory_loggers:\n                if isinstance(callback, OpikLogger):\n                    return callback\n        elif logging_integration == \"langfuse\":\n            for callback in _in_memory_loggers:\n                if isinstance(callback, LangfusePromptManagement):\n                    return callback\n        elif logging_integration == \"otel\":\n            from litellm.integrations.opentelemetry import OpenTelemetry\n\n            for callback in _in_memory_loggers:\n                # Use exact type check to avoid matching ArizePhoenixLogger (subclass)\n                if type(callback) is OpenTelemetry:\n                    return callback\n        elif logging_integration == \"arize\":\n            if \"ARIZE_API_KEY\" not in os.environ:\n                raise ValueError(\"ARIZE_API_KEY not found in environment variables\")\n            for callback in _in_memory_loggers:\n                if isinstance(callback, ArizeLogger) and callback.callback_name == \"arize\":\n                    return callback\n        elif logging_integration == \"logfire\":\n            if \"LOGFIRE_TOKEN\" not in os.environ:\n                raise ValueError(\"LOGFIRE_TOKEN not found in environment variables\")\n            from litellm.integrations.opentelemetry import OpenTelemetry\n\n            for callback in _in_memory_loggers:\n                # Use exact type check to avoid matching ArizePhoenixLogger (subclass)\n                if type(callback) is OpenTelemetry:\n                    return callback\n\n        elif logging_integration == \"dynamic_rate_limiter\":\n            from litellm.proxy.hooks.dynamic_rate_limiter import (\n                _PROXY_DynamicRateLimitHandler,\n            )\n","sourceCodeStart":4536,"sourceCodeEnd":4572,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/litellm_core_utils/litellm_logging.py#L4536-L4572","documentation":"A cheaper existence-check path for callbacks ('is this integration already configured?') also enforces credentials: for 'arize' it requires ARIZE_API_KEY in the environment before looking for an existing ArizeLogger. Raising here means Arize was referenced (e.g. when pruning/validating configured callbacks) but the API key is missing, so the integration cannot be considered usable.","triggerScenarios":"Any code path that consults the callback-presence helper for 'arize' — e.g. proxy startup validating litellm_settings.callbacks, or runtime checks before enabling the integration — while ARIZE_API_KEY is unset.","commonSituations":"ARIZE_SPACE_KEY set but API key forgotten; env var present in one deployment stage but not another; using Arize Phoenix (which needs a different setup) instead of Arize the platform and confusing the two integrations.","solutions":["Set ARIZE_API_KEY (and ARIZE_SPACE_KEY plus endpoint vars) in the proxy environment","If you meant Arize Phoenix, use the 'arize_phoenix' callback instead of 'arize'","Validate required env vars at startup with a preflight check so misconfig fails fast with your own message","Remove 'arize' from callbacks where it is not intended"],"exampleFix":"# before\nlitellm_settings:\n  callbacks: [\"arize\"]   # no ARIZE_API_KEY in env\n\n# after\nexport ARIZE_API_KEY=... ARIZE_SPACE_KEY=... ARIZE_HTTP_ENDPOINT=...\nlitellm_settings:\n  callbacks: [\"arize\"]","handlingStrategy":"validation","validationCode":"import os\nassert os.getenv('ARIZE_API_KEY'), 'ARIZE_API_KEY required when arize is in callbacks'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep ARIZE_API_KEY, ARIZE_SPACE_KEY and an endpoint var together as one secret bundle","Use 'arize_phoenix' for Phoenix, 'arize' for the Arize platform — don't mix them","Preflight all integration env vars at deploy time"],"tags":["litellm","arize","observability","callbacks","environment-variables"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}