{"record":{"id":"727efd12230f0036","repo":"bytedance/deer-flow","slug":"unsupported-run-option","errorCode":"unsupported_run_option","errorMessage":"Run option '{option}' is not supported by DeerFlow","messagePattern":"Run option '(.+?)' is not supported by DeerFlow","errorType":"validation","errorClass":"PydanticCustomError","httpStatus":422,"severity":"warning","filePath":"backend/app/gateway/run_models.py","lineNumber":81,"sourceCode":"    def reject_unsupported_run_options(cls, value: Any, info: ValidationInfo) -> Any:\n        if info.field_name in {\"multitask_strategy\", \"if_not_exists\"} and not isinstance(value, str):\n            return value\n\n        supported_defaults = {\n            \"webhook\": None,\n            \"on_completion\": None,\n            \"multitask_strategy\": {\"reject\", \"rollback\", \"interrupt\"},\n            \"after_seconds\": None,\n            \"if_not_exists\": \"create\",\n            \"feedback_keys\": None,\n        }\n        supported = supported_defaults[info.field_name]\n        if isinstance(supported, set):\n            is_supported = isinstance(value, str) and value in supported\n        else:\n            is_supported = value == supported\n        if not is_supported:\n            raise PydanticCustomError(\n                \"unsupported_run_option\",\n                \"Run option '{option}' is not supported by DeerFlow\",\n                {\"option\": info.field_name},\n            )\n        return value\n\n    @field_validator(\"stream_resumable\", mode=\"before\")\n    @classmethod\n    def reject_resumable_streams(cls, value: Any) -> Any:\n        # LangGraph SDK clients always send this field (its default is ``False``, which the\n        # payload's ``None`` filter keeps). ``False`` asks for the non-resumable stream\n        # DeerFlow already serves, so only an explicit ``True`` requests the unsupported feature.\n        if value is None or value is False:\n            return value\n        raise PydanticCustomError(\n            \"unsupported_run_option\",\n            \"Run option '{option}' is not supported by DeerFlow\",\n            {\"option\": \"stream_resumable\"},","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/bytedance/deer-flow/blob/1dd6ba1acb03700589994b0366c5d1c7d05e2eff/backend/app/gateway/run_models.py#L63-L99","documentation":"Pydantic validation error (code unsupported_run_option) raised on run-creation payloads that set a run option to a value DeerFlow does not support. A field validator compares each gated option against its allowed default/enum (e.g. multitask_strategy must be one of reject/rollback/interrupt, if_not_exists must be 'create'); anything else is rejected at request validation time with HTTP 422.","triggerScenarios":"POSTing a run (LangGraph-compatible /runs or stream endpoint) with e.g. multitask_strategy: 'enqueue', if_not_exists: 'replace', on_completion set to a non-null callback, or after_seconds set — values the supported_defaults map does not allow.","commonSituations":"Pointing an upstream LangGraph SDK/client at DeerFlow and sending options the full LangGraph platform supports but DeerFlow deliberately narrows; copying payload examples from LangGraph docs; version drift after DeerFlow tightened accepted options.","solutions":["Read the {option} placeholder in the error — it names the exact unsupported field; remove it or set it to the supported value.","For multitask_strategy use 'reject', 'rollback', or 'interrupt'; for if_not_exists use 'create'; leave on_completion/after_seconds/feedback_keys unset.","Pin the client to sending only options DeerFlow advertises; check the DeerFlow release notes when upgrading, as the supported set can change."],"exampleFix":"# before\n{\"assistant_id\": \"lead_agent\", \"multitask_strategy\": \"enqueue\", \"input\": {...}}\n\n# after\n{\"assistant_id\": \"lead_agent\", \"multitask_strategy\": \"reject\", \"input\": {...}}","handlingStrategy":"validation","validationCode":"const SUPPORTED = {\n  multitask_strategy: new Set(['reject', 'rollback', 'interrupt']),\n  if_not_exists: 'create',\n};\nfunction sanitizeRunOptions(payload) {\n  for (const [k, allowed] of Object.entries(SUPPORTED)) {\n    const v = payload[k];\n    if (v === undefined) continue;\n    const ok = allowed instanceof Set ? allowed.has(v) : v === allowed;\n    if (!ok) delete payload[k]; // or throw with field name\n  }\n  delete payload.on_completion;\n  delete payload.after_seconds;\n  return payload;\n}","typeGuard":null,"tryCatchPattern":"catch 422 with code 'unsupported_run_option'; parse the {option} from the message, strip/fix that field, retry once.","preventionTips":["Keep a client-side allowlist of run options and drop unknown keys before sending.","Re-check the supported option set on every DeerFlow upgrade.","Don't copy full LangGraph Platform payloads blindly into DeerFlow clients."],"tags":["runs","http-422","validation","langgraph-compat"],"backgroundTag":null,"analyzedSha":"1dd6ba1acb03700589994b0366c5d1c7d05e2eff","analyzedAt":"2026-08-14T21:20:34.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}