BerriAI/litellm · error · LangFlowError
flow_id cannot be set via request parameters; use model…
Error message
flow_id cannot be set via request parameters; use model langflow/{flow_id} What it means
Error "flow_id cannot be set via request parameters; use model langflow/{flow_id}" thrown in BerriAI/litellm.
Solutions
- Remove flow_id from the request parameters and encode it in the model string instead: model='langflow/<flow_id>'.
When it happens
Trigger: Thrown at litellm/llms/langflow/chat/transformation.py:75 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/548149a0db888216.
Report an issue: GitHub.
Appendix: source
Thrown at litellm/llms/langflow/chat/transformation.py:75
def map_openai_params(
self,
non_default_params: dict,
optional_params: dict,
model: str,
drop_params: bool,
) -> dict:
return optional_params
def _get_flow_id(self, model: str, optional_params: dict) -> str:
"""
Extract flow_id from the authorized model name only.
Model format: "langflow/{flow_id}". Request kwargs must not override
flow_id (would allow calling another flow with the same API key).
"""
if optional_params.get("flow_id") is not None:
raise LangFlowError(
status_code=400,
message=("flow_id cannot be set via request parameters; use model langflow/{flow_id}"),
)
flow_id: Final = (model.split("/", 1)[1] if "/" in model else model).strip()
if not flow_id:
raise LangFlowError(
status_code=400,
message="flow_id is required; use model langflow/{flow_id}",
)
return flow_id
def get_complete_url(
self,
api_base: str | None,
api_key: str | None,
model: str,
optional_params: dict,View on GitHub (pinned to 77b7c6c40c)