{"record":{"id":"f69f99ca4ecdef46","repo":"github/spec-kit","slug":"response-exceeds-the-max-bytes-byte-workflow-siz","errorCode":null,"errorMessage":"response exceeds the {max_bytes}-byte workflow size limit","messagePattern":"response exceeds the (.+?)-byte workflow size limit","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/workflows/_commands.py","lineNumber":460,"sourceCode":"            try:\n                content_length = int(raw_length)\n            except (TypeError, ValueError):\n                content_length = None\n    if content_length is not None and content_length > max_bytes:\n        raise ValueError(\n            f\"response declared {content_length} bytes, exceeding the \"\n            f\"{max_bytes}-byte workflow size limit\"\n        )\n\n    chunks: list[bytes] = []\n    total = 0\n    while True:\n        chunk = response.read(_DOWNLOAD_CHUNK_SIZE)\n        if not chunk:\n            break\n        total += len(chunk)\n        if total > max_bytes:\n            raise ValueError(f\"response exceeds the {max_bytes}-byte workflow size limit\")\n        chunks.append(chunk)\n    return b\"\".join(chunks)\n\n\ndef _workflow_yaml_is_declared(\n    source_name: str, content_type: str | None\n) -> bool:\n    \"\"\"Return whether response metadata explicitly identifies workflow YAML.\"\"\"\n    from urllib.parse import urlparse\n\n    path = urlparse(source_name).path.casefold()\n    media_type = (content_type or \"\").split(\";\", 1)[0].strip().casefold()\n    return path.endswith((\".yml\", \".yaml\")) or media_type in {\n        \"application/yaml\",\n        \"application/x-yaml\",\n        \"text/yaml\",\n        \"text/x-yaml\",\n    }","sourceCodeStart":442,"sourceCodeEnd":478,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/workflows/_commands.py#L442-L478","documentation":"Error \"response exceeds the {max_bytes}-byte workflow size limit\" thrown in github/spec-kit.","triggerScenarios":"Thrown at src/specify_cli/workflows/_commands.py:460 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the workflow YAML size below the byte limit, or install from a local file."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c","analyzedAt":"2026-08-14T19:43:37.150Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}