BerriAI/litellm · error · ValueError

No valid endpoint found for Arize, please set…

Error message

No valid endpoint found for Arize, please set 'ARIZE_ENDPOINT' to your GRPC endpoint or 'ARIZE_HTTP_ENDPOINT' to your HTTP endpoint

What it means

Raised while constructing the 'arize' callback: LiteLLM builds an OpenTelemetry exporter from ArizeLogger.get_arize_config(), which reads ARIZE_ENDPOINT (gRPC) or ARIZE_HTTP_ENDPOINT (HTTP) from the environment; if neither produces an endpoint, logger initialization fails with this ValueError before any telemetry is sent. It typically fires on the first logged request or at proxy startup, and also stamps OTEL_EXPORTER_OTLP_TRACES_HEADERS from the Arize space/key once configured.

Solutions

  1. Export ARIZE_ENDPOINT (gRPC, e.g. https://otlp.arize.com:443) or ARIZE_HTTP_ENDPOINT (HTTP) in the environment of the LiteLLM process.
  2. Also set ARIZE_API_KEY and ARIZE_SPACE_KEY/ARIZE_SPACE_ID so the exporter can authenticate.
  3. For Docker, add the vars to the container env (docker run -e / compose environment:).
  4. Verify inside the running process: printenv | grep ARIZE.

Example fix

# before
import litellm
litellm.success_callback = ['arize']  # ValueError: No valid endpoint found for Arize

# after
import os
os.environ['ARIZE_HTTP_ENDPOINT'] = 'https://otlp.arize.com/v1'
os.environ['ARIZE_API_KEY'] = '...'
os.environ['ARIZE_SPACE_KEY'] = '...'
import litellm
litellm.success_callback = ['arize']
Defensive patterns

Strategy: validation

Validate before calling

import os

missing = [v for v in ('ARIZE_ENDPOINT', 'ARIZE_HTTP_ENDPOINT') if not os.environ.get(v)]
if missing == ['ARIZE_ENDPOINT', 'ARIZE_HTTP_ENDPOINT']:
    raise RuntimeError('Set ARIZE_ENDPOINT (gRPC) or ARIZE_HTTP_ENDPOINT (HTTP) before enabling the arize callback')
for v in ('ARIZE_API_KEY', 'ARIZE_SPACE_KEY'):
    if not os.environ.get(v):
        raise RuntimeError(f'{v} is required by the arize callback')

Try / catch

try:
    litellm.completion(model='gpt-4o', messages=m)
except ValueError as e:
    if 'No valid endpoint found for Arize' in str(e):
        os.environ['ARIZE_HTTP_ENDPOINT'] = 'https://otlp.arize.com/v1'
        litellm.completion(model='gpt-4o', messages=m)
    else:
        raise

Prevention

When it happens

Trigger: litellm.callbacks/success_callback = ['arize'] (or config.yaml callbacks: ['arize']) on a process where neither ARIZE_ENDPOINT nor ARIZE_HTTP_ENDPOINT is set; env vars set in your shell but not in the Docker/systemd/uvicorn process running LiteLLM.

Common situations: Containerized proxies without env passthrough; CI runs with callbacks copied from config but env vars omitted; typos like ARIZE_ENDPONT; configuring only ARIZE_API_KEY/ARIZE_SPACE_KEY and assuming the endpoint is inferred.

Understand the failure class

Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.

Related errors


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/40f9a814569b3a69. Report an issue: GitHub.

Appendix: source

Thrown at litellm/litellm_core_utils/litellm_logging.py:3949

            for callback in _in_memory_loggers:
                if isinstance(callback, OpikLogger):
                    return callback

            _opik_logger: Final = OpikLogger()
            _in_memory_loggers.append(_opik_logger)
            return _opik_logger
        elif logging_integration == "arize":
            _v2 = _maybe_construct_otel_v2("arize", _in_memory_loggers)
            if _v2 is not None:
                return _v2
            from litellm.integrations.opentelemetry import (
                OpenTelemetry,
                OpenTelemetryConfig,
            )

            arize_config: Final = ArizeLogger.get_arize_config()
            if arize_config.endpoint is None:
                raise ValueError(
                    "No valid endpoint found for Arize, please set 'ARIZE_ENDPOINT' to your GRPC endpoint or 'ARIZE_HTTP_ENDPOINT' to your HTTP endpoint"
                )
            otel_config = OpenTelemetryConfig(
                exporter=arize_config.protocol,
                endpoint=arize_config.endpoint,
                service_name=arize_config.project_name,
            )

            os.environ["OTEL_EXPORTER_OTLP_TRACES_HEADERS"] = (
                f"space_id={arize_config.space_key or arize_config.space_id},api_key={arize_config.api_key}"
            )
            for callback in _in_memory_loggers:
                if isinstance(callback, ArizeLogger) and callback.callback_name == "arize":
                    return callback
            _arize_otel_logger: Final = ArizeLogger(config=otel_config, callback_name="arize")
            _in_memory_loggers.append(_arize_otel_logger)
            return _arize_otel_logger
        elif logging_integration == "arize_phoenix":

View on GitHub (pinned to 77b7c6c40c)