BerriAI/litellm · error · ValueError

PANW Prisma AIRS: api_key is required. Set it via config or

Error message

PANW Prisma AIRS: api_key is required. Set it via config or PANW_PRISMA_AIRS_API_KEY environment variable.

What it means

Error "PANW Prisma AIRS: api_key is required. Set it via config or PANW_PRISMA_AIRS_API_KEY environment variable." thrown in BerriAI/litellm.

Source

Thrown at litellm/proxy/guardrails/guardrail_hooks/panw_prisma_airs/panw_prisma_airs.py:176

            **kwargs,
        )

        # Store configuration with env var fallbacks
        self.api_key = api_key or os.getenv("PANW_PRISMA_AIRS_API_KEY")
        self.api_base = (
            api_base or os.getenv("PANW_PRISMA_AIRS_API_BASE") or "https://service.api.aisecurity.paloaltonetworks.com"
        )
        self.profile_name = profile_name

        # Handle app_name: Default to "LiteLLM", or prefix user's app_name with "LiteLLM-"
        if app_name:
            self.app_name = f"LiteLLM-{app_name}"
        else:
            self.app_name = "LiteLLM"

        # Validate required configuration
        if not self.api_key:
            raise ValueError(
                "PANW Prisma AIRS: api_key is required. "
                "Set it via config or PANW_PRISMA_AIRS_API_KEY environment variable."
            )

        # Warn if no profile is configured (user must have API key with linked profile)
        if not self.profile_name:
            verbose_proxy_logger.warning(
                "PANW Prisma AIRS Guardrail '%s': No profile_name configured. Ensure your API key has a linked profile in Strata Cloud Manager, or provide 'profile_name'/'profile_id' via config or per-request metadata. Requests will fail if the API key is not linked to a profile.",
                guardrail_name,
            )

        self.http_client = http_client
        self.fallback_on_error = fallback_on_error
        # Coerce defensively. The dashboard UI persists this field as a JSON
        # string, and Pydantic extras (the path that splats model_dump into
        # this handler) preserve whatever type the user supplied. A string
        # value would otherwise reach httpx, which raises TypeError on its
        # internal '<=' comparison and surfaces as a misleading api_error.

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Set the PANW_PRISMA_AIRS_API_KEY environment variable.
  2. Or pass api_key in the guardrail's litellm_params in the config file.

When it happens

Trigger: Thrown at litellm/proxy/guardrails/guardrail_hooks/panw_prisma_airs/panw_prisma_airs.py:176 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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