{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flowra-dev/json-schema/flowra-dev-stream-thread-run-dto-schema.json",
  "title": "StreamThreadRunDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flowra-dev-chat-api-openapi.yml#/components/schemas/StreamThreadRunDto",
  "type": "object",
  "properties": {
    "input": {
      "$ref": "#/$defs/ThreadInputDto"
    },
    "command": {
      "type": "object",
      "description": "Run command forwarded as-is (e.g. `{ \"resume\": { \"decisions\": [...] } }` for human-in-the-loop). Required when resuming without new messages."
    },
    "stream_mode": {
      "description": "Stream modes",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "stream_subgraphs": {
      "type": "boolean",
      "description": "Stream subgraphs",
      "default": true
    },
    "stream_resumable": {
      "type": "boolean",
      "description": "Stream resumable",
      "default": true
    },
    "assistant_id": {
      "type": "string",
      "description": "Assistant ID"
    },
    "on_disconnect": {
      "type": "string",
      "description": "Action on disconnect",
      "default": "continue"
    },
    "workflowId": {
      "type": "string",
      "description": "Workflow ID (agent workflow) to use for this conversation",
      "format": "uuid"
    },
    "model": {
      "type": "string",
      "description": "Optional model id override for this run (session-scoped). When set, wins over the agent workflow default model."
    },
    "reasoningEffort": {
      "type": "string",
      "enum": [
        "none",
        "low",
        "medium",
        "high"
      ],
      "description": "Optional reasoning effort override for this run (session-scoped). `none` disables workflow default reasoning. low|medium|high when the model supports reasoning_effort."
    }
  },
  "$defs": {
    "ImageUrlDto": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "Image URL (e.g. file download URL or data URL)"
        }
      },
      "required": [
        "url"
      ]
    },
    "MessageContentDto": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "Content type",
          "enum": [
            "text",
            "image_url"
          ]
        },
        "text": {
          "type": "string",
          "description": "Text content"
        },
        "image_url": {
          "$ref": "#/$defs/ImageUrlDto"
        }
      },
      "required": [
        "type"
      ]
    },
    "MessageDto": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Message ID"
        },
        "type": {
          "type": "string",
          "description": "Message type"
        },
        "content": {
          "description": "Message content",
          "type": "array",
          "items": {
            "$ref": "#/$defs/MessageContentDto"
          }
        }
      },
      "required": [
        "type",
        "content"
      ]
    },
    "ThreadInputDto": {
      "type": "object",
      "properties": {
        "messages": {
          "description": "Messages array",
          "type": "array",
          "items": {
            "$ref": "#/$defs/MessageDto"
          }
        }
      },
      "required": [
        "messages"
      ]
    }
  }
}