BerriAI/litellm · error · ValueError
ARIZE_API_KEY not found in environment variables
Error message
ARIZE_API_KEY not found in environment variables
What it means
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.
Source
Thrown at litellm/litellm_core_utils/litellm_logging.py:4554
return callback
elif logging_integration == "opik":
for callback in _in_memory_loggers:
if isinstance(callback, OpikLogger):
return callback
elif logging_integration == "langfuse":
for callback in _in_memory_loggers:
if isinstance(callback, LangfusePromptManagement):
return callback
elif logging_integration == "otel":
from litellm.integrations.opentelemetry import OpenTelemetry
for callback in _in_memory_loggers:
# Use exact type check to avoid matching ArizePhoenixLogger (subclass)
if type(callback) is OpenTelemetry:
return callback
elif logging_integration == "arize":
if "ARIZE_API_KEY" not in os.environ:
raise ValueError("ARIZE_API_KEY not found in environment variables")
for callback in _in_memory_loggers:
if isinstance(callback, ArizeLogger) and callback.callback_name == "arize":
return callback
elif logging_integration == "logfire":
if "LOGFIRE_TOKEN" not in os.environ:
raise ValueError("LOGFIRE_TOKEN not found in environment variables")
from litellm.integrations.opentelemetry import OpenTelemetry
for callback in _in_memory_loggers:
# Use exact type check to avoid matching ArizePhoenixLogger (subclass)
if type(callback) is OpenTelemetry:
return callback
elif logging_integration == "dynamic_rate_limiter":
from litellm.proxy.hooks.dynamic_rate_limiter import (
_PROXY_DynamicRateLimitHandler,
)
View on GitHub (pinned to 6c2dcb801b)
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
Example fix
# before litellm_settings: callbacks: ["arize"] # no ARIZE_API_KEY in env # after export ARIZE_API_KEY=... ARIZE_SPACE_KEY=... ARIZE_HTTP_ENDPOINT=... litellm_settings: callbacks: ["arize"]
Defensive patterns
Strategy: validation
Validate before calling
import os
assert os.getenv('ARIZE_API_KEY'), 'ARIZE_API_KEY required when arize is in callbacks' Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- No valid endpoint found for Arize, please set 'ARIZE_ENDPOIN
- LOGFIRE_TOKEN not found in environment variables
- LANGTRACE_API_KEY not found in environment variables
- Missing keys={missing_keys} in environment.
- Callback param '{param}' (from {source}) contains an 'os.env
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/a204e8378e677cea.
Report an issue: GitHub.