{"record":{"id":"30e280fe9c674a20","repo":"BerriAI/litellm","slug":"flow-id-is-required-use-model-langflow-flow-id","errorCode":null,"errorMessage":"flow_id is required; use model langflow/{flow_id}","messagePattern":"flow_id is required; use model langflow/(.+?)","errorType":"http","errorClass":"LangFlowError","httpStatus":400,"severity":"error","filePath":"litellm/llms/langflow/chat/transformation.py","lineNumber":82,"sourceCode":"    ) -> dict:\n        return optional_params\n\n    def _get_flow_id(self, model: str, optional_params: dict) -> str:\n        \"\"\"\n        Extract flow_id from the authorized model name only.\n\n        Model format: \"langflow/{flow_id}\". Request kwargs must not override\n        flow_id (would allow calling another flow with the same API key).\n        \"\"\"\n        if optional_params.get(\"flow_id\") is not None:\n            raise LangFlowError(\n                status_code=400,\n                message=(\"flow_id cannot be set via request parameters; use model langflow/{flow_id}\"),\n            )\n\n        flow_id: Final = (model.split(\"/\", 1)[1] if \"/\" in model else model).strip()\n        if not flow_id:\n            raise LangFlowError(\n                status_code=400,\n                message=\"flow_id is required; use model langflow/{flow_id}\",\n            )\n        return flow_id\n\n    def get_complete_url(\n        self,\n        api_base: str | None,\n        api_key: str | None,\n        model: str,\n        optional_params: dict,\n        litellm_params: dict,\n        stream: bool | None = None,\n    ) -> str:\n        if api_base is None:\n            raise ValueError(\n                \"api_base is required for LangFlow. Set it via LANGFLOW_API_BASE env var or api_base parameter.\"\n            )","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/langflow/chat/transformation.py#L64-L100","documentation":"Error \"flow_id is required; use model langflow/{flow_id}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/langflow/chat/transformation.py:82 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Specify the flow via the model string: litellm.completion(model='langflow/<flow_id>', ...)."],"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-23T08:17:48.524Z"}