{"record":{"id":"352bdc224f81aa45","repo":"BerriAI/litellm","slug":"panw-prisma-airs-api-key-is-required-set-it-via","errorCode":null,"errorMessage":"PANW Prisma AIRS: api_key is required. Set it via config or PANW_PRISMA_AIRS_API_KEY environment variable.","messagePattern":"PANW Prisma AIRS: api_key is required\\. Set it via config or PANW_PRISMA_AIRS_API_KEY environment variable\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/guardrails/guardrail_hooks/panw_prisma_airs/panw_prisma_airs.py","lineNumber":176,"sourceCode":"            **kwargs,\n        )\n\n        # Store configuration with env var fallbacks\n        self.api_key = api_key or os.getenv(\"PANW_PRISMA_AIRS_API_KEY\")\n        self.api_base = (\n            api_base or os.getenv(\"PANW_PRISMA_AIRS_API_BASE\") or \"https://service.api.aisecurity.paloaltonetworks.com\"\n        )\n        self.profile_name = profile_name\n\n        # Handle app_name: Default to \"LiteLLM\", or prefix user's app_name with \"LiteLLM-\"\n        if app_name:\n            self.app_name = f\"LiteLLM-{app_name}\"\n        else:\n            self.app_name = \"LiteLLM\"\n\n        # Validate required configuration\n        if not self.api_key:\n            raise ValueError(\n                \"PANW Prisma AIRS: api_key is required. \"\n                \"Set it via config or PANW_PRISMA_AIRS_API_KEY environment variable.\"\n            )\n\n        # Warn if no profile is configured (user must have API key with linked profile)\n        if not self.profile_name:\n            verbose_proxy_logger.warning(\n                \"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.\",\n                guardrail_name,\n            )\n\n        self.http_client = http_client\n        self.fallback_on_error = fallback_on_error\n        # Coerce defensively. The dashboard UI persists this field as a JSON\n        # string, and Pydantic extras (the path that splats model_dump into\n        # this handler) preserve whatever type the user supplied. A string\n        # value would otherwise reach httpx, which raises TypeError on its\n        # internal '<=' comparison and surfaces as a misleading api_error.","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/guardrails/guardrail_hooks/panw_prisma_airs/panw_prisma_airs.py#L158-L194","documentation":"Error \"PANW Prisma AIRS: api_key is required. Set it via config or PANW_PRISMA_AIRS_API_KEY environment variable.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/guardrails/guardrail_hooks/panw_prisma_airs/panw_prisma_airs.py:176 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the PANW_PRISMA_AIRS_API_KEY environment variable.","Or pass api_key in the guardrail's litellm_params in the config file."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}