{"record":{"id":"534bc21000484191","repo":"firecrawl/firecrawl","slug":"query-format-uses-mode-instead-of-directquote","errorCode":null,"errorMessage":"query format uses 'mode' instead of 'directQuote'","messagePattern":"query format uses 'mode' instead of 'directQuote'","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"apps/python-sdk/firecrawl/v2/utils/validation.py","lineNumber":458,"sourceCode":"    Validate and prepare query format object.\n\n    Args:\n        format_obj: Format object that should be query type\n\n    Returns:\n        Validated query format dict\n\n    Raises:\n        ValueError: If query format is missing required 'prompt' field\n    \"\"\"\n    if not isinstance(format_obj, dict):\n        raise ValueError(\"query format must be an object with 'type' and 'prompt' fields\")\n\n    if not isinstance(format_obj.get('prompt'), str) or not format_obj['prompt'].strip():\n        raise ValueError(\"query format requires a non-empty 'prompt' string\")\n\n    if \"directQuote\" in format_obj:\n        raise ValueError(\"query format uses 'mode' instead of 'directQuote'\")\n\n    mode = format_obj.get(\"mode\")\n    if mode is not None and mode not in (\"freeform\", \"directQuote\"):\n        raise ValueError(\"query format mode must be 'freeform' or 'directQuote'\")\n\n    return format_obj\n\n\ndef _validate_question_format(format_obj: Any) -> Dict[str, Any]:\n    \"\"\"Validate and prepare question format object.\"\"\"\n    if not isinstance(format_obj, dict):\n        raise ValueError(\"question format must be an object with 'type' and 'question' fields\")\n\n    if not isinstance(format_obj.get('question'), str) or not format_obj['question'].strip():\n        raise ValueError(\"question format requires a non-empty 'question' string\")\n\n    return format_obj\n","sourceCodeStart":440,"sourceCodeEnd":476,"githubUrl":"https://github.com/firecrawl/firecrawl/blob/656bffcc2883f1af5befe38766b1ff5f0469993a/apps/python-sdk/firecrawl/v2/utils/validation.py#L440-L476","documentation":"Error \"query format uses 'mode' instead of 'directQuote'\" thrown in firecrawl/firecrawl.","triggerScenarios":"Thrown at apps/python-sdk/firecrawl/v2/utils/validation.py:458 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"656bffcc2883f1af5befe38766b1ff5f0469993a","analyzedAt":"2026-08-12T01:18:00.488Z","schemaVersion":2},"datasetVersion":"2026-08-12T06:17:24.410Z"}