{"record":{"id":"2c6bb14338b952e9","repo":"BerriAI/litellm","slug":"invalid-action-v-must-be-one-of-sorted-vali","errorCode":null,"errorMessage":"Invalid action '{v}'. Must be one of: {sorted(VALID_PIPELINE_ACTIONS)}","messagePattern":"Invalid action '(.+?)'\\. Must be one of: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/types/proxy/policy_engine/pipeline_types.py","lineNumber":56,"sourceCode":"    )\n    pass_data: bool = Field(\n        default=False,\n        description=\"Forward modified request data (e.g., PII-masked) to next step.\",\n    )\n    modify_response_message: str | None = Field(\n        default=None,\n        description=\"Custom message for modify_response action.\",\n    )\n\n    model_config = ConfigDict(extra=\"forbid\")\n\n    @field_validator(\"on_fail\", \"on_pass\", \"on_error\")\n    @classmethod\n    def validate_action(cls, v: str | None) -> str | None:\n        if v is None:\n            return None\n        if v not in VALID_PIPELINE_ACTIONS:\n            raise ValueError(f\"Invalid action '{v}'. Must be one of: {sorted(VALID_PIPELINE_ACTIONS)}\")\n        return v\n\n\nclass GuardrailPipeline(BaseModel):\n    \"\"\"\n    Defines ordered execution of guardrails with conditional actions.\n\n    When present on a policy, the guardrails in `steps` are executed\n    sequentially instead of independently.\n    \"\"\"\n\n    mode: str = Field(description=\"Event hook: pre_call | post_call\")\n    steps: list[PipelineStep] = Field(\n        description=\"Ordered list of pipeline steps. Must have at least 1 step.\",\n        min_length=1,\n    )\n\n    model_config = ConfigDict(extra=\"forbid\")","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/types/proxy/policy_engine/pipeline_types.py#L38-L74","documentation":"Pydantic field_validator on PipelineStep transition fields (on_fail/on_pass/on_error): the given action string is not in VALID_PIPELINE_ACTIONS, so the policy engine would not know how to proceed after that step outcome.","triggerScenarios":"Thrown at litellm/types/proxy/policy_engine/pipeline_types.py:56 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of the valid pipeline actions listed in the error: {sorted(VALID_PIPELINE_ACTIONS)}."],"exampleFix":null,"handlingStrategy":"validation","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-14T00:17:10.932Z"}