{"record":{"id":"5b25c88bbed6f92c","repo":"BerriAI/litellm","slug":"panw-prisma-airs-profile-name-is-required","errorCode":null,"errorMessage":"PANW Prisma AIRS: profile_name is required","messagePattern":"PANW Prisma AIRS: profile_name is required","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/guardrails/guardrail_initializers.py","lineNumber":207,"sourceCode":"        conversation_id=litellm_params.lasso_conversation_id,\n        mask=litellm_params.mask,\n        event_hook=litellm_params.mode,\n        default_on=litellm_params.default_on,\n    )\n    litellm.logging_callback_manager.add_litellm_callback(_lasso_callback)\n\n    return _lasso_callback\n\n\ndef initialize_panw_prisma_airs(litellm_params, guardrail):\n    from litellm.proxy.guardrails.guardrail_hooks.panw_prisma_airs import (\n        PanwPrismaAirsHandler,\n    )\n\n    if not litellm_params.api_key:\n        raise ValueError(\"PANW Prisma AIRS: api_key is required\")\n    if not litellm_params.profile_name:\n        raise ValueError(\"PANW Prisma AIRS: profile_name is required\")\n\n    _panw_callback: Final = PanwPrismaAirsHandler(\n        guardrail_name=guardrail.get(\"guardrail_name\", \"panw_prisma_airs\"),  # Use .get() with default\n        api_key=litellm_params.api_key,\n        api_base=litellm_params.api_base or \"https://service.api.aisecurity.paloaltonetworks.com/v1/scan/sync/request\",\n        profile_name=litellm_params.profile_name,\n        default_on=litellm_params.default_on,\n        mask_on_block=getattr(litellm_params, \"mask_on_block\", False),\n        mask_request_content=getattr(litellm_params, \"mask_request_content\", False),\n        mask_response_content=getattr(litellm_params, \"mask_response_content\", False),\n        app_name=getattr(litellm_params, \"app_name\", None),\n        fallback_on_error=getattr(litellm_params, \"fallback_on_error\", \"block\"),\n        # `timeout` is now declared on BaseLitellmParams (Optional[float] = None),\n        # so the attribute always exists. The Pydantic validator on LitellmParams\n        # coerces strings to float, but None still means \"use handler default\" —\n        # guard against float(None) here.\n        timeout=(\n            float(getattr(litellm_params, \"timeout\", None))","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/guardrails/guardrail_initializers.py#L189-L225","documentation":"Companion check in initialize_panw_prisma_airs: besides api_key, the Prisma AIRS scan profile name is mandatory because every scan request must reference a security profile configured in the Palo Alto Networks console. A missing or empty profile_name fails guardrail init with ValueError.","triggerScenarios":"A panw_prisma_airs guardrail entry with api_key set but no profile_name under litellm_params, or a profile_name env reference that resolves to empty.","commonSituations":"Profile created in the Prisma AIRS console but its exact name not copied into config; quoting/whitespace mistakes in YAML; forgetting this key when migrating a guardrail from another deployment.","solutions":["Add profile_name under litellm_params with the exact profile name from your Prisma AIRS console","Check YAML quoting - names with spaces or special characters need quotes","Confirm the value is non-empty at startup (log the resolved litellm_params in debug mode)"],"exampleFix":"# before\nlitellm_params:\n  guardrail: panw_prisma_airs\n  api_key: os.environ/PANW_API_KEY\n\n# after\nlitellm_params:\n  guardrail: panw_prisma_airs\n  api_key: os.environ/PANW_API_KEY\n  profile_name: os.environ/PANW_PROFILE_NAME","handlingStrategy":"validation","validationCode":"# Confirm the scan profile exists and a key is present before proxy start\nimport os\n\nif not os.getenv('PANW_PRISMA_AIRS_PROFILE_NAME'):\n    raise SystemExit('PANW_PRISMA_AIRS_PROFILE_NAME not set - profile_name is required')\nif not os.getenv('PANW_PRISMA_AIRS_API_KEY'):\n    raise SystemExit('PANW_PRISMA_AIRS_API_KEY not set - api_key is required')","typeGuard":"def has_panw_profile(litellm_params: dict) -> bool:\n    \"\"\"True when profile_name is a non-empty string.\"\"\"\n    name = litellm_params.get('profile_name')\n    return isinstance(name, str) and len(name.strip()) > 0","tryCatchPattern":null,"preventionTips":["Copy the profile name exactly from the Prisma AIRS console (watch quoting and whitespace)","Keep a manifest of required env vars per guardrail and check it in deploy scripts","Prefer creating guardrails via config.yaml reviewed in CI over ad-hoc admin API calls"],"tags":["guardrail","panw","prisma-airs","profile","config"],"backgroundTag":"missing-required-config","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}