{"record":{"id":"009dd01724e075da","repo":"langgenius/dify","slug":"agent-app-only-supports-streaming-response-mode","errorCode":null,"errorMessage":"Agent App only supports streaming response mode.","messagePattern":"Agent App only supports streaming response mode\\.","errorType":"http","errorClass":"BadRequest","httpStatus":400,"severity":"error","filePath":"api/controllers/console/app/completion.py","lineNumber":76,"sourceCode":"from services.app_task_service import AppTaskService\nfrom services.errors.llm import InvokeRateLimitError\n\nlogger = logging.getLogger(__name__)\n\n\n@runtime_checkable\nclass _ClosableStream(Protocol):\n    def close(self) -> None: ...\n\n\ndef _resolve_debugger_chat_streaming(\n    *, app_mode: AppMode, response_mode: str, response_mode_provided: bool = True\n) -> bool:\n    \"\"\"Agent App runtime is SSE-only until backend blocking runs are supported.\"\"\"\n    if app_mode != AppMode.AGENT:\n        return response_mode != \"blocking\"\n    if response_mode_provided and response_mode == \"blocking\":\n        raise BadRequest(\"Agent App only supports streaming response mode.\")\n    return True\n\n\nclass BaseMessagePayload(BaseModel):\n    inputs: dict[str, Any]\n    # Agent Apps (AppMode.AGENT) derive their model + prompt from the bound Agent\n    # Soul, so no override ``model_config`` is sent; chat / agent-chat / completion\n    # debugging still pass it. Optional here, required in practice by those modes\n    # downstream when their config is built from args.\n    model_config_data: dict[str, Any] = Field(\n        default_factory=dict,\n        alias=\"model_config\",\n    )\n    files: list[Any] | None = Field(\n        default=None,\n        description=\"Uploaded files\",\n    )\n    response_mode: Literal[\"blocking\", \"streaming\"] = Field(default=\"blocking\", description=\"Response mode\")","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/api/controllers/console/app/completion.py#L58-L94","documentation":"Error \"Agent App only supports streaming response mode.\" thrown in langgenius/dify.","triggerScenarios":"Thrown at api/controllers/console/app/completion.py:76 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}