{
  "openapi": "3.1.0",
  "info": {
    "title": "FastGPT System OpenAPI",
    "version": "0.1.0",
    "description": "FastGPT Open API documentation covering endpoints that support API key authentication."
  },
  "servers": [
    {
      "url": "https://cloud.fastgpt.io/api",
      "description": "FastGPT International Cloud"
    },
    {
      "url": "{origin}/api",
      "description": "Self-hosted instance (replace origin with your FastGPT instance URL)",
      "variables": {
        "origin": {
          "default": "https://your-fastgpt-domain.com",
          "description": "Scheme and host of your self-hosted FastGPT instance (without trailing slash)"
        }
      }
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "x-tagGroups": [
    {
      "name": "Core Features",
      "tags": [
        "Models"
      ]
    },
    {
      "name": "Applications",
      "tags": [
        "App Logs"
      ]
    },
    {
      "name": "Chat",
      "tags": [
        "Chat History",
        "Chat Records",
        "Chat Feedback",
        "Chat Completions & Control"
      ]
    },
    {
      "name": "Datasets",
      "tags": [
        "Datasets",
        "Collections",
        "Create Collections",
        "Dataset Data",
        "Dataset Search"
      ]
    }
  ],
  "paths": {
    "/core/app/logs/list": {
      "post": {
        "deprecated": true,
        "summary": "List App Chat Logs",
        "description": "Retrieve paginated application chat logs with filters for time range, source, feedback status, errors, and users.",
        "tags": [
          "App Logs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "title": "Explicit App ID",
                        "description": "Personal API keys and login sessions must pass `appId`; an App API Key always uses the bound application.",
                        "type": "object",
                        "properties": {
                          "appId": {
                            "allOf": [
                              {
                                "example": "68ad85a7463006c963799a05",
                                "description": "Application ID",
                                "type": "string",
                                "minLength": 1
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          }
                        },
                        "required": [
                          "appId"
                        ]
                      },
                      {
                        "title": "App API Key (no appId required)",
                        "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                        "type": "object",
                        "properties": {}
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "title": "Offset Pagination",
                        "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                        "type": "object",
                        "properties": {
                          "offset": {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "Pagination Parameters"
                            },
                            "x-fastgpt-union-parameter": {
                              "label": "Pagination Parameters",
                              "position": "first"
                            },
                            "example": 0,
                            "description": "0-based offset",
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "pageSize": {
                            "allOf": [
                              {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "Pagination Parameters"
                                },
                                "example": 20,
                                "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                "default": 20,
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 500
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "Pagination Parameters",
                              "position": "last"
                            }
                          },
                          "feedbackType": {
                            "example": "good",
                            "description": "Feedback filter: `all` (all logs), `has_feedback` (logs with feedback), `good` (likes), `bad` (dislikes)",
                            "type": "string",
                            "enum": [
                              "all",
                              "has_feedback",
                              "good",
                              "bad"
                            ]
                          },
                          "unreadOnly": {
                            "example": false,
                            "description": "Whether to return only unread feedback (ignored when `feedbackType` is `all`)",
                            "type": "boolean"
                          },
                          "errorFilter": {
                            "example": "has_error",
                            "description": "Error filter: `all` (all logs), `has_error` (error logs only)",
                            "type": "string",
                            "enum": [
                              "all",
                              "has_error"
                            ]
                          },
                          "dateStart": {
                            "example": "2024-01-01T00:00:00.000Z",
                            "description": "Start time",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "dateEnd": {
                            "example": "2024-12-31T23:59:59.999Z",
                            "description": "End time",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "sources": {
                            "example": [
                              "api",
                              "online"
                            ],
                            "description": "Chat source filter",
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "test",
                                "online",
                                "share",
                                "api",
                                "cronJob",
                                "feishu",
                                "official_account",
                                "wecom",
                                "wechat",
                                "mcp",
                                "dingtalk",
                                "unknown"
                              ]
                            }
                          },
                          "tmbIds": {
                            "example": [
                              "tmb123",
                              "tmb456"
                            ],
                            "description": "List of team member IDs",
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "outLinkUids": {
                            "example": [
                              "user123",
                              "user456"
                            ],
                            "description": "List of external user IDs",
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "chatSearch": {
                            "example": "hello",
                            "description": "Search keyword for chat content",
                            "type": "string"
                          }
                        },
                        "required": [
                          "offset",
                          "dateStart",
                          "dateEnd"
                        ]
                      },
                      {
                        "title": "Page-Number Pagination",
                        "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                        "type": "object",
                        "properties": {
                          "pageNum": {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "Pagination Parameters"
                            },
                            "x-fastgpt-union-parameter": {
                              "label": "Pagination Parameters",
                              "position": "first"
                            },
                            "example": 1,
                            "description": "1-based page number; ignored when `offset` is provided",
                            "default": 1,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          "pageSize": {
                            "allOf": [
                              {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "Pagination Parameters"
                                },
                                "example": 20,
                                "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                "default": 20,
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 500
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "Pagination Parameters",
                              "position": "last"
                            }
                          },
                          "feedbackType": {
                            "example": "good",
                            "description": "Feedback filter: `all` (all logs), `has_feedback` (logs with feedback), `good` (likes), `bad` (dislikes)",
                            "type": "string",
                            "enum": [
                              "all",
                              "has_feedback",
                              "good",
                              "bad"
                            ]
                          },
                          "unreadOnly": {
                            "example": false,
                            "description": "Whether to return only unread feedback (ignored when `feedbackType` is `all`)",
                            "type": "boolean"
                          },
                          "errorFilter": {
                            "example": "has_error",
                            "description": "Error filter: `all` (all logs), `has_error` (error logs only)",
                            "type": "string",
                            "enum": [
                              "all",
                              "has_error"
                            ]
                          },
                          "dateStart": {
                            "example": "2024-01-01T00:00:00.000Z",
                            "description": "Start time",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "dateEnd": {
                            "example": "2024-12-31T23:59:59.999Z",
                            "description": "End time",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "sources": {
                            "example": [
                              "api",
                              "online"
                            ],
                            "description": "Chat source filter",
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "test",
                                "online",
                                "share",
                                "api",
                                "cronJob",
                                "feishu",
                                "official_account",
                                "wecom",
                                "wechat",
                                "mcp",
                                "dingtalk",
                                "unknown"
                              ]
                            }
                          },
                          "tmbIds": {
                            "example": [
                              "tmb123",
                              "tmb456"
                            ],
                            "description": "List of team member IDs",
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "outLinkUids": {
                            "example": [
                              "user123",
                              "user456"
                            ],
                            "description": "List of external user IDs",
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "chatSearch": {
                            "example": "hello",
                            "description": "Search keyword for chat content",
                            "type": "string"
                          }
                        },
                        "required": [
                          "dateStart",
                          "dateEnd"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "offset": 0,
                "dateStart": "2024-01-01T00:00:00.000Z",
                "dateEnd": "2024-12-31T23:59:59.999Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully retrieved application chat logs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "example": {
                        "total": 100,
                        "list": []
                      },
                      "description": "Application chat log list",
                      "type": "object",
                      "properties": {
                        "total": {
                          "example": 100,
                          "description": "Total record count",
                          "type": "number"
                        },
                        "list": {
                          "description": "List of chat log records",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "publishSource": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "description": "Channel type of the latest run; falls back to `unknown` if unrecognized",
                                    "example": "api",
                                    "default": "unknown",
                                    "type": "string",
                                    "enum": [
                                      "test",
                                      "online",
                                      "share",
                                      "api",
                                      "cronJob",
                                      "feishu",
                                      "official_account",
                                      "wecom",
                                      "wechat",
                                      "mcp",
                                      "dingtalk",
                                      "unknown"
                                    ]
                                  },
                                  "id": {
                                    "description": "Database ID of the channel record; omitted for internal entry points or legacy data without recoverable references",
                                    "example": "6909d3c4b6a72185d0f08101",
                                    "type": "string",
                                    "pattern": "^[0-9a-fA-F]{24}$"
                                  },
                                  "name": {
                                    "description": "Current channel name, compatible with legacy source names",
                                    "example": "Support Backend",
                                    "type": "string"
                                  }
                                },
                                "additionalProperties": false
                              },
                              "_id": {
                                "example": "68ad85a7463006c963799a05",
                                "description": "Chat log ID",
                                "type": "string"
                              },
                              "chatId": {
                                "example": "chat123",
                                "description": "Chat ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "title": {
                                "example": "User Conversation",
                                "description": "Chat title",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "customTitle": {
                                "example": "Custom Title",
                                "description": "Custom chat title",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "source": {
                                "deprecated": true,
                                "description": "Legacy channel type retained for compatibility; use `publishSource.type` instead",
                                "example": "api",
                                "default": "unknown",
                                "type": "string",
                                "enum": [
                                  "test",
                                  "online",
                                  "share",
                                  "api",
                                  "cronJob",
                                  "feishu",
                                  "official_account",
                                  "wecom",
                                  "wechat",
                                  "mcp",
                                  "dingtalk",
                                  "unknown"
                                ]
                              },
                              "sourceName": {
                                "example": "Support Backend",
                                "deprecated": true,
                                "description": "Legacy channel name retained for compatibility; use `publishSource.name` instead",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "updateTime": {
                                "example": "2024-01-01T00:30:00.000Z",
                                "description": "Update time",
                                "type": "string"
                              },
                              "createTime": {
                                "example": "2024-01-01T00:00:00.000Z",
                                "description": "Creation time",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "messageCount": {
                                "example": 10,
                                "description": "Message count",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "userGoodFeedbackCount": {
                                "example": 3,
                                "description": "Positive feedback count",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "userBadFeedbackCount": {
                                "example": 1,
                                "description": "Negative feedback count",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "customFeedbacksCount": {
                                "example": 2,
                                "description": "Custom feedback count",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "markCount": {
                                "example": 0,
                                "description": "Marked count",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "averageResponseTime": {
                                "example": 1500,
                                "description": "Average response time (ms)",
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "errorCount": {
                                "example": 0,
                                "description": "Error count",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "totalPoints": {
                                "example": 150.5,
                                "description": "Total credit points consumed",
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "outLinkUid": {
                                "example": "outLink123",
                                "description": "End-user ID from a share link visitor or API `customUid`; takes precedence over `tmbId` when non-empty",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tmbId": {
                                "example": "tmb123",
                                "description": "Effective authenticated team member ID (or proxied member ID when using `authProxy`)",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sourceMember": {
                                "description": "Source member details (compatibility field; may represent a guest for share-link traffic)",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "example": "Alice",
                                        "description": "Member name",
                                        "type": "string"
                                      },
                                      "avatar": {
                                        "description": "Member avatar",
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "status": {
                                        "example": "active",
                                        "description": "Member status",
                                        "type": "string",
                                        "enum": [
                                          "active",
                                          "leave",
                                          "forbidden"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "status"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "authMember": {
                                "description": "Authenticated member metadata resolved by `tmbId`, for display only",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "example": "Alice",
                                        "description": "Member name",
                                        "type": "string"
                                      },
                                      "avatar": {
                                        "description": "Member avatar",
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "status": {
                                        "example": "active",
                                        "description": "Member status",
                                        "type": "string",
                                        "enum": [
                                          "active",
                                          "leave",
                                          "forbidden"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "status"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "versionName": {
                                "example": "v1.0.0",
                                "description": "Version name",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "originIp": {
                                "example": "192.168.1.1",
                                "description": "Origin IP address",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "region": {
                                "example": "US",
                                "description": "Region",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "_id",
                              "chatId",
                              "source",
                              "updateTime"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "total",
                        "list"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/app/logs/search": {
      "post": {
        "summary": "Search app logs",
        "description": "Search app chat logs with cursor-based pagination. The page size is fixed at 50 and the response does not include a total count.",
        "tags": [
          "App Logs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "title": "Explicit App ID",
                        "description": "Personal API keys and login sessions must pass `appId`; an App API Key always uses the bound application.",
                        "type": "object",
                        "properties": {
                          "appId": {
                            "allOf": [
                              {
                                "example": "68ad85a7463006c963799a05",
                                "description": "Application ID",
                                "type": "string",
                                "minLength": 1
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          }
                        },
                        "required": [
                          "appId"
                        ]
                      },
                      {
                        "title": "App API Key (no appId required)",
                        "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                        "type": "object",
                        "properties": {}
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "feedbackType": {
                        "example": "good",
                        "description": "Feedback filter: `all` (all logs), `has_feedback` (logs with feedback), `good` (likes), `bad` (dislikes)",
                        "type": "string",
                        "enum": [
                          "all",
                          "has_feedback",
                          "good",
                          "bad"
                        ]
                      },
                      "unreadOnly": {
                        "example": false,
                        "description": "Whether to return only unread feedback (ignored when `feedbackType` is `all`)",
                        "type": "boolean"
                      },
                      "errorFilter": {
                        "example": "has_error",
                        "description": "Error filter: `all` (all logs), `has_error` (error logs only)",
                        "type": "string",
                        "enum": [
                          "all",
                          "has_error"
                        ]
                      },
                      "dateStart": {
                        "example": "2024-01-01T00:00:00.000Z",
                        "description": "Start time",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "string",
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "dateEnd": {
                        "example": "2024-12-31T23:59:59.999Z",
                        "description": "End time",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "string",
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "sources": {
                        "example": [
                          "api",
                          "online"
                        ],
                        "description": "Chat source filter",
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "test",
                            "online",
                            "share",
                            "api",
                            "cronJob",
                            "feishu",
                            "official_account",
                            "wecom",
                            "wechat",
                            "mcp",
                            "dingtalk",
                            "unknown"
                          ]
                        }
                      },
                      "tmbIds": {
                        "example": [
                          "tmb123",
                          "tmb456"
                        ],
                        "description": "List of team member IDs",
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "outLinkUids": {
                        "example": [
                          "user123",
                          "user456"
                        ],
                        "description": "List of external user IDs",
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "chatSearch": {
                        "example": "chat123",
                        "description": "Search term. Use with `searchType` to search titles or match a session ID exactly.",
                        "type": "string"
                      },
                      "searchType": {
                        "description": "Search mode. Use `title` to search titles or `chatId` to match a session ID exactly. Omit this field to use the legacy search behavior.",
                        "example": "title",
                        "type": "string",
                        "enum": [
                          "title",
                          "chatId"
                        ]
                      },
                      "cursor": {
                        "example": {
                          "timestamp": 1735689600000,
                          "id": "68ad85a7463006c963799a05"
                        },
                        "description": "The `nextCursor` from the previous response. Omit this field on the first page and pass the cursor unchanged for subsequent pages.",
                        "type": "object",
                        "properties": {
                          "timestamp": {
                            "example": 1735689600000,
                            "description": "Cursor timestamp in milliseconds",
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "id": {
                            "example": "68ad85a7463006c963799a05",
                            "description": "Log ID in the cursor",
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "timestamp",
                          "id"
                        ]
                      }
                    },
                    "required": [
                      "dateStart",
                      "dateEnd"
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "dateStart": "2024-01-01T00:00:00.000Z",
                "dateEnd": "2024-12-31T23:59:59.999Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "App log search completed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "example": {
                        "list": []
                      },
                      "description": "App chat log search results",
                      "type": "object",
                      "properties": {
                        "list": {
                          "description": "Chat log records for this page. The page size is fixed at 50.",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "publishSource": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "description": "Channel type of the latest run; falls back to `unknown` if unrecognized",
                                    "example": "api",
                                    "default": "unknown",
                                    "type": "string",
                                    "enum": [
                                      "test",
                                      "online",
                                      "share",
                                      "api",
                                      "cronJob",
                                      "feishu",
                                      "official_account",
                                      "wecom",
                                      "wechat",
                                      "mcp",
                                      "dingtalk",
                                      "unknown"
                                    ]
                                  },
                                  "id": {
                                    "description": "Database ID of the channel record; omitted for internal entry points or legacy data without recoverable references",
                                    "example": "6909d3c4b6a72185d0f08101",
                                    "type": "string",
                                    "pattern": "^[0-9a-fA-F]{24}$"
                                  },
                                  "name": {
                                    "description": "Current channel name, compatible with legacy source names",
                                    "example": "Support Backend",
                                    "type": "string"
                                  }
                                },
                                "additionalProperties": false
                              },
                              "_id": {
                                "example": "68ad85a7463006c963799a05",
                                "description": "Chat log ID",
                                "type": "string"
                              },
                              "chatId": {
                                "example": "chat123",
                                "description": "Chat ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "title": {
                                "example": "User Conversation",
                                "description": "Chat title",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "customTitle": {
                                "example": "Custom Title",
                                "description": "Custom chat title",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "source": {
                                "deprecated": true,
                                "description": "Legacy channel type retained for compatibility; use `publishSource.type` instead",
                                "example": "api",
                                "default": "unknown",
                                "type": "string",
                                "enum": [
                                  "test",
                                  "online",
                                  "share",
                                  "api",
                                  "cronJob",
                                  "feishu",
                                  "official_account",
                                  "wecom",
                                  "wechat",
                                  "mcp",
                                  "dingtalk",
                                  "unknown"
                                ]
                              },
                              "sourceName": {
                                "example": "Support Backend",
                                "deprecated": true,
                                "description": "Legacy channel name retained for compatibility; use `publishSource.name` instead",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "updateTime": {
                                "example": "2024-01-01T00:30:00.000Z",
                                "description": "Update time",
                                "type": "string"
                              },
                              "createTime": {
                                "example": "2024-01-01T00:00:00.000Z",
                                "description": "Creation time",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "messageCount": {
                                "example": 10,
                                "description": "Message count",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "userGoodFeedbackCount": {
                                "example": 3,
                                "description": "Positive feedback count",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "userBadFeedbackCount": {
                                "example": 1,
                                "description": "Negative feedback count",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "customFeedbacksCount": {
                                "example": 2,
                                "description": "Custom feedback count",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "markCount": {
                                "example": 0,
                                "description": "Marked count",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "averageResponseTime": {
                                "example": 1500,
                                "description": "Average response time (ms)",
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "errorCount": {
                                "example": 0,
                                "description": "Error count",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "totalPoints": {
                                "example": 150.5,
                                "description": "Total credit points consumed",
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "outLinkUid": {
                                "example": "outLink123",
                                "description": "End-user ID from a share link visitor or API `customUid`; takes precedence over `tmbId` when non-empty",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tmbId": {
                                "example": "tmb123",
                                "description": "Effective authenticated team member ID (or proxied member ID when using `authProxy`)",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sourceMember": {
                                "description": "Source member details (compatibility field; may represent a guest for share-link traffic)",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "example": "Alice",
                                        "description": "Member name",
                                        "type": "string"
                                      },
                                      "avatar": {
                                        "description": "Member avatar",
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "status": {
                                        "example": "active",
                                        "description": "Member status",
                                        "type": "string",
                                        "enum": [
                                          "active",
                                          "leave",
                                          "forbidden"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "status"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "authMember": {
                                "description": "Authenticated member metadata resolved by `tmbId`, for display only",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "example": "Alice",
                                        "description": "Member name",
                                        "type": "string"
                                      },
                                      "avatar": {
                                        "description": "Member avatar",
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "status": {
                                        "example": "active",
                                        "description": "Member status",
                                        "type": "string",
                                        "enum": [
                                          "active",
                                          "leave",
                                          "forbidden"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "status"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "versionName": {
                                "example": "v1.0.0",
                                "description": "Version name",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "originIp": {
                                "example": "192.168.1.1",
                                "description": "Origin IP address",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "region": {
                                "example": "US",
                                "description": "Region",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "_id",
                              "chatId",
                              "source",
                              "updateTime"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "nextCursor": {
                          "description": "Cursor for the next page. This field is absent when no more results are available.",
                          "type": "object",
                          "properties": {
                            "timestamp": {
                              "example": 1735689600000,
                              "description": "Cursor timestamp in milliseconds",
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "id": {
                              "example": "68ad85a7463006c963799a05",
                              "description": "Log ID in the cursor",
                              "type": "string",
                              "pattern": "^[a-f\\d]{24}$"
                            }
                          },
                          "required": [
                            "timestamp",
                            "id"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "list"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/proApi/core/app/logs/getTotalData": {
      "get": {
        "summary": "Get App Total Statistics",
        "description": "Retrieve cumulative application statistics including total users, total chats, and total credit consumption.",
        "tags": [
          "App Logs"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "schema": {
              "anyOf": [
                {
                  "title": "Explicit App ID",
                  "description": "Personal API keys and login sessions must pass `appId`; an App API Key always uses the bound application.",
                  "type": "object",
                  "properties": {
                    "appId": {
                      "allOf": [
                        {
                          "example": "68ad85a7463006c963799a05",
                          "description": "Application ID",
                          "type": "string",
                          "minLength": 1
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "only"
                      }
                    }
                  },
                  "required": [
                    "appId"
                  ]
                },
                {
                  "title": "App API Key (no appId required)",
                  "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                  "type": "object",
                  "properties": {}
                }
              ]
            },
            "required": false,
            "style": "form",
            "explode": true,
            "examples": {
              "default": {
                "value": {
                  "appId": "68ad85a7463006c963799a05"
                },
                "x-disabled": true
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved application total statistics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalUsers": {
                          "example": 1000,
                          "description": "Total users",
                          "type": "number"
                        },
                        "totalChats": {
                          "example": 5000,
                          "description": "Total chats",
                          "type": "number"
                        },
                        "totalPoints": {
                          "example": 15000,
                          "description": "Total credit points consumed",
                          "type": "number"
                        },
                        "totalInputTokens": {
                          "example": 500000,
                          "description": "Total input tokens consumed",
                          "type": "number"
                        },
                        "totalOutputTokens": {
                          "example": 200000,
                          "description": "Total output tokens consumed",
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalUsers",
                        "totalChats",
                        "totalPoints",
                        "totalInputTokens",
                        "totalOutputTokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/proApi/core/app/logs/getChartData": {
      "post": {
        "summary": "Get App Chart Analytics",
        "description": "Queries strictly within the exact absolute start and end timestamps without expanding the window. User, chat, and app buckets are grouped by the fixed timezone offset carried in `dateStart` (or server timezone if omitted); no separate timezone parameter is accepted.",
        "tags": [
          "App Logs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "Explicit App ID",
                    "description": "Personal API keys and login sessions must pass `appId`; an App API Key always uses the bound application.",
                    "type": "object",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "Application ID",
                            "type": "string",
                            "minLength": 1
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "dateStart": {
                        "example": "2024-01-01T00:00:00.000Z",
                        "description": "Inclusive start timestamp as an ISO string preserving timezone offset and milliseconds; buckets use this fixed offset (server timezone if omitted, `Z` for UTC)",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "string",
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "dateEnd": {
                        "example": "2024-12-31T23:59:59.999Z",
                        "description": "Inclusive end timestamp (server timezone if offset is omitted); preserves the exact boundary without date expansion",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "string",
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "source": {
                        "example": [
                          "api",
                          "online"
                        ],
                        "description": "Chat source filter; omit for all sources, pass an empty array to match nothing",
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "test",
                            "online",
                            "share",
                            "api",
                            "cronJob",
                            "feishu",
                            "official_account",
                            "wecom",
                            "wechat",
                            "mcp",
                            "dingtalk",
                            "unknown"
                          ]
                        }
                      },
                      "offset": {
                        "example": 1,
                        "description": "Retention offset measured in `userTimespan` units (defaults to 1); counts subsequent activity within the selected range only",
                        "default": 1,
                        "type": "number"
                      },
                      "userTimespan": {
                        "example": "day",
                        "description": "User analytics timespan",
                        "type": "string",
                        "enum": [
                          "day",
                          "week",
                          "month",
                          "quarter"
                        ]
                      },
                      "chatTimespan": {
                        "example": "day",
                        "description": "Chat analytics timespan",
                        "type": "string",
                        "enum": [
                          "day",
                          "week",
                          "month",
                          "quarter"
                        ]
                      },
                      "appTimespan": {
                        "example": "day",
                        "description": "App analytics timespan",
                        "type": "string",
                        "enum": [
                          "day",
                          "week",
                          "month",
                          "quarter"
                        ]
                      }
                    },
                    "required": [
                      "appId",
                      "dateStart",
                      "dateEnd",
                      "userTimespan",
                      "chatTimespan",
                      "appTimespan"
                    ]
                  },
                  {
                    "title": "App API Key (no appId required)",
                    "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                    "type": "object",
                    "properties": {
                      "dateStart": {
                        "example": "2024-01-01T00:00:00.000Z",
                        "description": "Inclusive start timestamp as an ISO string preserving timezone offset and milliseconds; buckets use this fixed offset (server timezone if omitted, `Z` for UTC)",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "string",
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "dateEnd": {
                        "example": "2024-12-31T23:59:59.999Z",
                        "description": "Inclusive end timestamp (server timezone if offset is omitted); preserves the exact boundary without date expansion",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "string",
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "source": {
                        "example": [
                          "api",
                          "online"
                        ],
                        "description": "Chat source filter; omit for all sources, pass an empty array to match nothing",
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "test",
                            "online",
                            "share",
                            "api",
                            "cronJob",
                            "feishu",
                            "official_account",
                            "wecom",
                            "wechat",
                            "mcp",
                            "dingtalk",
                            "unknown"
                          ]
                        }
                      },
                      "offset": {
                        "example": 1,
                        "description": "Retention offset measured in `userTimespan` units (defaults to 1); counts subsequent activity within the selected range only",
                        "default": 1,
                        "type": "number"
                      },
                      "userTimespan": {
                        "example": "day",
                        "description": "User analytics timespan",
                        "type": "string",
                        "enum": [
                          "day",
                          "week",
                          "month",
                          "quarter"
                        ]
                      },
                      "chatTimespan": {
                        "example": "day",
                        "description": "Chat analytics timespan",
                        "type": "string",
                        "enum": [
                          "day",
                          "week",
                          "month",
                          "quarter"
                        ]
                      },
                      "appTimespan": {
                        "example": "day",
                        "description": "App analytics timespan",
                        "type": "string",
                        "enum": [
                          "day",
                          "week",
                          "month",
                          "quarter"
                        ]
                      }
                    },
                    "required": [
                      "dateStart",
                      "dateEnd",
                      "userTimespan",
                      "chatTimespan",
                      "appTimespan"
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "dateStart": "2024-01-01T00:00:00.000Z",
                "dateEnd": "2024-12-31T23:59:59.999Z",
                "userTimespan": "day",
                "chatTimespan": "day",
                "appTimespan": "day"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully retrieved application chart analytics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "userData": {
                          "description": "User statistics",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "timestamp": {
                                "example": 1704067200,
                                "description": "Timestamp",
                                "type": "number"
                              },
                              "summary": {
                                "description": "User summary metrics for the current time bucket",
                                "type": "object",
                                "properties": {
                                  "userCount": {
                                    "example": 100,
                                    "description": "Total user count",
                                    "type": "number"
                                  },
                                  "newUserCount": {
                                    "example": 30,
                                    "description": "New user count",
                                    "type": "number"
                                  },
                                  "retentionUserCount": {
                                    "example": 70,
                                    "description": "Retained user count",
                                    "type": "number"
                                  },
                                  "points": {
                                    "example": 1500,
                                    "description": "Credit points consumed",
                                    "type": "number"
                                  },
                                  "inputTokens": {
                                    "example": 50000,
                                    "description": "Input tokens consumed",
                                    "type": "number"
                                  },
                                  "outputTokens": {
                                    "example": 20000,
                                    "description": "Output tokens consumed",
                                    "type": "number"
                                  },
                                  "sourceCountMap": {
                                    "example": {
                                      "api": 50,
                                      "web": 30,
                                      "mobile": 20
                                    },
                                    "description": "User count by source",
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "additionalProperties": {
                                      "type": "number"
                                    }
                                  }
                                },
                                "required": [
                                  "userCount",
                                  "newUserCount",
                                  "retentionUserCount",
                                  "points",
                                  "inputTokens",
                                  "outputTokens",
                                  "sourceCountMap"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "timestamp",
                              "summary"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "chatData": {
                          "description": "Chat statistics",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "timestamp": {
                                "example": 1704067200,
                                "description": "Timestamp",
                                "type": "number"
                              },
                              "summary": {
                                "description": "Chat summary metrics for the current time bucket",
                                "type": "object",
                                "properties": {
                                  "chatItemCount": {
                                    "example": 500,
                                    "description": "Total message count",
                                    "type": "number"
                                  },
                                  "chatCount": {
                                    "example": 100,
                                    "description": "Total chat sessions",
                                    "type": "number"
                                  },
                                  "errorCount": {
                                    "example": 5,
                                    "description": "Error message count",
                                    "type": "number"
                                  },
                                  "points": {
                                    "example": 800,
                                    "description": "Credit points consumed",
                                    "type": "number"
                                  },
                                  "inputTokens": {
                                    "example": 30000,
                                    "description": "Input tokens consumed",
                                    "type": "number"
                                  },
                                  "outputTokens": {
                                    "example": 10000,
                                    "description": "Output tokens consumed",
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "chatItemCount",
                                  "chatCount",
                                  "errorCount",
                                  "points",
                                  "inputTokens",
                                  "outputTokens"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "timestamp",
                              "summary"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "appData": {
                          "description": "App statistics",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "timestamp": {
                                "example": 1704067200,
                                "description": "Timestamp",
                                "type": "number"
                              },
                              "summary": {
                                "description": "App performance summary metrics for the current time bucket",
                                "type": "object",
                                "properties": {
                                  "goodFeedBackCount": {
                                    "example": 25,
                                    "description": "Positive feedback count",
                                    "type": "number"
                                  },
                                  "badFeedBackCount": {
                                    "example": 3,
                                    "description": "Negative feedback count",
                                    "type": "number"
                                  },
                                  "chatCount": {
                                    "example": 100,
                                    "description": "Chat item count",
                                    "type": "number"
                                  },
                                  "totalResponseTime": {
                                    "example": 120000,
                                    "description": "Total response time (ms)",
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "goodFeedBackCount",
                                  "badFeedBackCount",
                                  "chatCount",
                                  "totalResponseTime"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "timestamp",
                              "summary"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "userData",
                        "chatData",
                        "appData"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/app/logs/getUsers": {
      "post": {
        "summary": "List App Log Users",
        "description": "Retrieve external users and team members from application chat logs, sorted by chat count with search and pagination.",
        "tags": [
          "App Logs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "title": "Explicit App ID",
                        "description": "Personal API keys and login sessions must pass `appId`; an App API Key always uses the bound application.",
                        "type": "object",
                        "properties": {
                          "appId": {
                            "allOf": [
                              {
                                "example": "68ad85a7463006c963799a05",
                                "description": "Application ID",
                                "type": "string",
                                "minLength": 1
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          }
                        },
                        "required": [
                          "appId"
                        ]
                      },
                      {
                        "title": "App API Key (no appId required)",
                        "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                        "type": "object",
                        "properties": {}
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "title": "Offset Pagination",
                        "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                        "type": "object",
                        "properties": {
                          "offset": {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "Pagination Parameters"
                            },
                            "x-fastgpt-union-parameter": {
                              "label": "Pagination Parameters",
                              "position": "first"
                            },
                            "example": 0,
                            "description": "0-based offset",
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "pageSize": {
                            "allOf": [
                              {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "Pagination Parameters"
                                },
                                "example": 20,
                                "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                "default": 20,
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 500
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "Pagination Parameters",
                              "position": "last"
                            }
                          },
                          "dateStart": {
                            "example": "2024-01-01T00:00:00.000Z",
                            "description": "Start time",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "dateEnd": {
                            "example": "2024-12-31T23:59:59.999Z",
                            "description": "End time",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "searchKey": {
                            "example": "user",
                            "description": "Search by username",
                            "type": "string"
                          },
                          "sources": {
                            "example": [
                              "online",
                              "share"
                            ],
                            "description": "Source filter",
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "offset",
                          "dateStart",
                          "dateEnd"
                        ]
                      },
                      {
                        "title": "Page-Number Pagination",
                        "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                        "type": "object",
                        "properties": {
                          "pageNum": {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "Pagination Parameters"
                            },
                            "x-fastgpt-union-parameter": {
                              "label": "Pagination Parameters",
                              "position": "first"
                            },
                            "example": 1,
                            "description": "1-based page number; ignored when `offset` is provided",
                            "default": 1,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          "pageSize": {
                            "allOf": [
                              {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "Pagination Parameters"
                                },
                                "example": 20,
                                "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                "default": 20,
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 500
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "Pagination Parameters",
                              "position": "last"
                            }
                          },
                          "dateStart": {
                            "example": "2024-01-01T00:00:00.000Z",
                            "description": "Start time",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "dateEnd": {
                            "example": "2024-12-31T23:59:59.999Z",
                            "description": "End time",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "searchKey": {
                            "example": "user",
                            "description": "Search by username",
                            "type": "string"
                          },
                          "sources": {
                            "example": [
                              "online",
                              "share"
                            ],
                            "description": "Source filter",
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "dateStart",
                          "dateEnd"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "offset": 0,
                "dateStart": "2024-01-01T00:00:00.000Z",
                "dateEnd": "2024-12-31T23:59:59.999Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully retrieved application log users",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Paginated user list",
                      "type": "object",
                      "properties": {
                        "total": {
                          "default": 0,
                          "type": "number"
                        },
                        "list": {
                          "default": [],
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "outLinkUid": {
                                "example": "outLink123",
                                "description": "End-user ID from a share link visitor or API `customUid`; takes precedence over `tmbId` when non-empty",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tmbId": {
                                "example": "tmb123",
                                "description": "Effective authenticated team member ID (or proxied member ID when using `authProxy`)",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "name": {
                                "example": "Username",
                                "description": "User display name",
                                "type": "string"
                              },
                              "avatar": {
                                "example": "https://example.com/avatar.png",
                                "description": "Avatar",
                                "type": "string"
                              },
                              "count": {
                                "example": 10,
                                "description": "Chat item count",
                                "type": "number"
                              }
                            },
                            "required": [
                              "outLinkUid",
                              "tmbId",
                              "name",
                              "count"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "total",
                        "list"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v2/chat/completions": {
      "post": {
        "tags": [
          "Chat Completions & Control"
        ],
        "summary": "Create Chat Completion (v2)",
        "description": "The v2 chat completions endpoint follows the OpenAI Chat Completions schema.\n\n**API Key Usage**\n\n- Authenticate with an API Key. When calling `chat/completions` with a personal key, passing `body.appId` in the request body is recommended.\n- For OpenAI SDK compatibility, `Authorization: Bearer <apiKey>-<appId>` is also supported without passing `body.appId`.\n- Some SDKs append `/v1` to `baseURL` while others do not; if you receive a 404, try adjusting `/v1` in `baseURL`.\n- `appId` resolution precedence: `body.appId` > `<apiKey>-<appId>` header suffix > legacy key-bound `appId`.\n\n**Important Notes**\n\n- Backend callers can pass `customUid` to identify their end users (passed to workflow `userId`). It does not change the authenticating member and is mutually exclusive with `authProxy` (max 1024 chars; empty string uses the default member; supported in FastGPT >= 4.18.0).\n- To impersonate a team member via `authProxy`, a team owner must enable `authProxy` on the personal API key; the proxied member must still have access to the target app and chat session (FastGPT >= v4.15.0).\n- Request fields such as `model` and `temperature` are ignored because model and inference parameters are controlled by the published app workflow.\n- Standard `usage` tokens are placeholder values; set `detail=true` and sum `tokens` in `responseData` if you need per-node token usage.\n\n**`chatId` Behavior**\n\n- Omitted or empty: FastGPT server-side history is disabled; context is constructed solely from the request `messages` array.\n- Non-empty string: FastGPT loads existing conversation history for `chatId` from storage and uses only the last message in `messages` as the user prompt (earlier entries are ignored). Ensure `chatId` is unique (max 1024 chars).\n\n**`stream` / `detail` Combinations**\n\n- `detail=false, stream=false`: Returns compact OpenAI-compatible JSON (`choices`, `usage`, `id`).\n- `detail=false, stream=true`: Returns an OpenAI-compatible SSE stream with answer deltas and `[DONE]`.\n- `detail=true, stream=false`: Includes `responseData` (per-node execution details) and `newVariables` in the JSON response.\n- `detail=true, stream=true`: Returns a multi-event SSE stream (`answer`, `flowNodeStatus`, `flowNodeResponse`, `workflowDuration`, etc.).\n\nShare-link calls use the same per-node SSE protocol with public fields filtered by share settings (`showCite`, `showRunningStatus`, `showSkillReferences`, and download permissions).\n\n**Interactive Nodes**\n\nIf the workflow includes interactive nodes, set `detail=true`:\n\n- `stream=true`: Read interactive payloads from `event: interactive`.\n- `stream=false`: Read the `interactive` entry from `choices[].message.content`.\n\nNon-streaming `interactive` payloads unwrap nested `children` / `loop` / `tool` wrappers down to the innermost prompt and strip internal runtime fields (`entryNodeIds`, `memoryEdges`, `nodeOutputs`). SSE frames may preserve wrapper envelopes whose inner payload sits under `params.childrenResponse`.\n\nTo resume execution after rendering the interactive prompt to the user, call this endpoint again with the same `chatId`:\n\n- User selection: Send the selected option value directly as the user message `content`.\n- Form input: Serialize the form key-value map as a JSON string in the user message `content`.\n",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "App Chat",
                    "description": "Identify the application via `appId` and authenticate with an API Key or login session. Personal API Key requests may omit `body.appId` when using an `apiKey-appId` header suffix or legacy bound key; login sessions must provide `appId`. App API Keys do not support `authProxy`.",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "Application ID. App API Keys ignore this field and SDK suffixes in favor of the bound app; personal keys resolve in order: `body.appId` > `Authorization` `key-appId` suffix. The suffix is never persisted.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "Default Identity",
                            "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "description": "Chat session ID; automatically generated if omitted or empty",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "metadata": {
                                "description": "Metadata",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "messages": {
                                "description": "Messages list",
                                "default": [],
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "system"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "developer"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "user"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "select"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "select": {
                                                            "allOf": [
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Q&A input type",
                                                                            "type": "string",
                                                                            "const": "agentAsk"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "questions": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "User answers ordered by question",
                                                                            "minItems": 1,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "question": {
                                                                                  "description": "Question snapshot at prompt time",
                                                                                  "type": "string"
                                                                                },
                                                                                "value": {
                                                                                  "description": "User answer text (selected option or custom text); empty string means skipped",
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "question",
                                                                                "value"
                                                                              ]
                                                                            }
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "questions"
                                                                    ],
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "oneOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Confirm plan and start building",
                                                                                "type": "string",
                                                                                "const": "confirm"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Cancel this build",
                                                                                "type": "string",
                                                                                "const": "cancel"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Modify plan",
                                                                                "type": "string",
                                                                                "const": "revise"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "first"
                                                                            }
                                                                          },
                                                                          "reviseText": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Specific revision feedback for the plan; cannot be empty",
                                                                                "type": "string",
                                                                                "minLength": 1
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "last"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action",
                                                                          "reviseText"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      }
                                                                    ],
                                                                    "type": "object"
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "select"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "input_audio"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "input_audio": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  },
                                                                  "format": {
                                                                    "description": "Known audio format; omit if unknown so the model endpoint infers it",
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "mp3",
                                                                      "wav",
                                                                      "ogg",
                                                                      "m4a",
                                                                      "amr",
                                                                      "mpga"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "input_audio"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "video_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "video_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "video_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "file": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "file_data": {
                                                                    "type": "string"
                                                                  },
                                                                  "file_id": {
                                                                    "type": "string"
                                                                  },
                                                                  "filename": {
                                                                    "type": "string"
                                                                  }
                                                                }
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "file"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "name": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "url": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "fileType": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "audio",
                                                                  "video",
                                                                  "document",
                                                                  "unknown",
                                                                  "file"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "assistant"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "description": "Assistant message content",
                                              "example": "Hello, how are you?",
                                              "anyOf": [
                                                {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "oneOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "text"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "text": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "middle"
                                                                }
                                                              },
                                                              "key": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "refusal"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "refusal": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "refusal"
                                                            ],
                                                            "description": ""
                                                          }
                                                        ],
                                                        "type": "object"
                                                      }
                                                    }
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_calls": {
                                          "allOf": [
                                            {
                                              "description": "Tool Call",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "id": {
                                                    "type": "string"
                                                  },
                                                  "type": {
                                                    "type": "string",
                                                    "const": "function"
                                                  },
                                                  "function": {
                                                    "type": "object",
                                                    "properties": {
                                                      "arguments": {
                                                        "description": "Tool arguments",
                                                        "type": "string"
                                                      },
                                                      "name": {
                                                        "description": "Tool name",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "arguments",
                                                      "name"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "type",
                                                  "function"
                                                ]
                                              }
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "interactive": {
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "Interactive response (FastGPT extension)"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "audio": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "function_call": {
                                          "allOf": [
                                            {
                                              "description": "Function call",
                                              "deprecated": true,
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "description": "Tool arguments",
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "description": "Tool name",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "refusal": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "tool"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_call_id": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "tool_call_id"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "function"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "name": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "name"
                                      ],
                                      "description": ""
                                    }
                                  ],
                                  "type": "object"
                                }
                              },
                              "stream": {
                                "description": "Whether to stream the response via SSE",
                                "default": false,
                                "type": "boolean"
                              },
                              "variables": {
                                "description": "Global workflow variables or plugin inputs",
                                "default": {},
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "responseChatItemId": {
                                "description": "Custom ID for the assistant response message; auto-generated if omitted",
                                "type": "string"
                              },
                              "detail": {
                                "description": "Whether to include detailed execution metadata such as `responseData`, `reasoning_content`, `tool_calls`, and `newVariables`",
                                "default": false,
                                "type": "boolean"
                              },
                              "retainDatasetCite": {
                                "description": "Whether to retain dataset citations",
                                "default": false,
                                "type": "boolean"
                              },
                              "showSkillReferences": {
                                "description": "Whether to include skill references",
                                "default": false,
                                "type": "boolean"
                              }
                            },
                            "required": []
                          },
                          {
                            "title": "Custom End-User (`customUid`)",
                            "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "End-user ID supplied by your backend during API Key calls (FastGPT >= 4.18.0, max 1024 chars); does not alter member permissions and is mutually exclusive with `authProxy`. New chats treat empty string as default user; existing chats bound to a `customUid` reject missing, empty, or mismatched values. Share-link calls use `outLinkAuthData.outLinkUid` instead.",
                                    "type": "string",
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "Chat session ID; automatically generated if omitted or empty",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "metadata": {
                                "description": "Metadata",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "messages": {
                                "description": "Messages list",
                                "default": [],
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "system"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "developer"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "user"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "select"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "select": {
                                                            "allOf": [
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Q&A input type",
                                                                            "type": "string",
                                                                            "const": "agentAsk"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "questions": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "User answers ordered by question",
                                                                            "minItems": 1,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "question": {
                                                                                  "description": "Question snapshot at prompt time",
                                                                                  "type": "string"
                                                                                },
                                                                                "value": {
                                                                                  "description": "User answer text (selected option or custom text); empty string means skipped",
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "question",
                                                                                "value"
                                                                              ]
                                                                            }
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "questions"
                                                                    ],
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "oneOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Confirm plan and start building",
                                                                                "type": "string",
                                                                                "const": "confirm"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Cancel this build",
                                                                                "type": "string",
                                                                                "const": "cancel"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Modify plan",
                                                                                "type": "string",
                                                                                "const": "revise"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "first"
                                                                            }
                                                                          },
                                                                          "reviseText": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Specific revision feedback for the plan; cannot be empty",
                                                                                "type": "string",
                                                                                "minLength": 1
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "last"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action",
                                                                          "reviseText"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      }
                                                                    ],
                                                                    "type": "object"
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "select"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "input_audio"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "input_audio": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  },
                                                                  "format": {
                                                                    "description": "Known audio format; omit if unknown so the model endpoint infers it",
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "mp3",
                                                                      "wav",
                                                                      "ogg",
                                                                      "m4a",
                                                                      "amr",
                                                                      "mpga"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "input_audio"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "video_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "video_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "video_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "file": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "file_data": {
                                                                    "type": "string"
                                                                  },
                                                                  "file_id": {
                                                                    "type": "string"
                                                                  },
                                                                  "filename": {
                                                                    "type": "string"
                                                                  }
                                                                }
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "file"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "name": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "url": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "fileType": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "audio",
                                                                  "video",
                                                                  "document",
                                                                  "unknown",
                                                                  "file"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "assistant"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "description": "Assistant message content",
                                              "example": "Hello, how are you?",
                                              "anyOf": [
                                                {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "oneOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "text"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "text": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "middle"
                                                                }
                                                              },
                                                              "key": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "refusal"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "refusal": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "refusal"
                                                            ],
                                                            "description": ""
                                                          }
                                                        ],
                                                        "type": "object"
                                                      }
                                                    }
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_calls": {
                                          "allOf": [
                                            {
                                              "description": "Tool Call",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "id": {
                                                    "type": "string"
                                                  },
                                                  "type": {
                                                    "type": "string",
                                                    "const": "function"
                                                  },
                                                  "function": {
                                                    "type": "object",
                                                    "properties": {
                                                      "arguments": {
                                                        "description": "Tool arguments",
                                                        "type": "string"
                                                      },
                                                      "name": {
                                                        "description": "Tool name",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "arguments",
                                                      "name"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "type",
                                                  "function"
                                                ]
                                              }
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "interactive": {
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "Interactive response (FastGPT extension)"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "audio": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "function_call": {
                                          "allOf": [
                                            {
                                              "description": "Function call",
                                              "deprecated": true,
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "description": "Tool arguments",
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "description": "Tool name",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "refusal": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "tool"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_call_id": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "tool_call_id"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "function"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "name": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "name"
                                      ],
                                      "description": ""
                                    }
                                  ],
                                  "type": "object"
                                }
                              },
                              "stream": {
                                "description": "Whether to stream the response via SSE",
                                "default": false,
                                "type": "boolean"
                              },
                              "variables": {
                                "description": "Global workflow variables or plugin inputs",
                                "default": {},
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "responseChatItemId": {
                                "description": "Custom ID for the assistant response message; auto-generated if omitted",
                                "type": "string"
                              },
                              "detail": {
                                "description": "Whether to include detailed execution metadata such as `responseData`, `reasoning_content`, `tool_calls`, and `newVariables`",
                                "default": false,
                                "type": "boolean"
                              },
                              "retainDatasetCite": {
                                "description": "Whether to retain dataset citations",
                                "default": false,
                                "type": "boolean"
                              },
                              "showSkillReferences": {
                                "description": "Whether to include skill references",
                                "default": false,
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "customUid"
                            ]
                          },
                          {
                            "title": "Proxy Team Member (`authProxy`)",
                            "description": "Act on behalf of another member in the same team via `authProxy`. Available only on personal API keys with `authProxy` enabled; mutually exclusive with `customUid`.",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "description": "Team member identity to proxy via API Key (mutually exclusive with `customUid`; unsupported on share-link chats). Specify `tmbId` or `username`; if both are sent, `tmbId` takes precedence without falling back to `username` on invalid ID.",
                                    "type": "object",
                                    "anyOf": [
                                      {
                                        "title": "By Team Member ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "Proxied team member ID (`tmbId`), takes precedence over `username`",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "By Username",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "Proxied team member username",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "Chat session ID; automatically generated if omitted or empty",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "metadata": {
                                "description": "Metadata",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "messages": {
                                "description": "Messages list",
                                "default": [],
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "system"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "developer"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "user"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "select"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "select": {
                                                            "allOf": [
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Q&A input type",
                                                                            "type": "string",
                                                                            "const": "agentAsk"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "questions": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "User answers ordered by question",
                                                                            "minItems": 1,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "question": {
                                                                                  "description": "Question snapshot at prompt time",
                                                                                  "type": "string"
                                                                                },
                                                                                "value": {
                                                                                  "description": "User answer text (selected option or custom text); empty string means skipped",
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "question",
                                                                                "value"
                                                                              ]
                                                                            }
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "questions"
                                                                    ],
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "oneOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Confirm plan and start building",
                                                                                "type": "string",
                                                                                "const": "confirm"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Cancel this build",
                                                                                "type": "string",
                                                                                "const": "cancel"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Modify plan",
                                                                                "type": "string",
                                                                                "const": "revise"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "first"
                                                                            }
                                                                          },
                                                                          "reviseText": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Specific revision feedback for the plan; cannot be empty",
                                                                                "type": "string",
                                                                                "minLength": 1
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "last"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action",
                                                                          "reviseText"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      }
                                                                    ],
                                                                    "type": "object"
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "select"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "input_audio"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "input_audio": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  },
                                                                  "format": {
                                                                    "description": "Known audio format; omit if unknown so the model endpoint infers it",
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "mp3",
                                                                      "wav",
                                                                      "ogg",
                                                                      "m4a",
                                                                      "amr",
                                                                      "mpga"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "input_audio"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "video_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "video_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "video_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "file": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "file_data": {
                                                                    "type": "string"
                                                                  },
                                                                  "file_id": {
                                                                    "type": "string"
                                                                  },
                                                                  "filename": {
                                                                    "type": "string"
                                                                  }
                                                                }
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "file"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "name": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "url": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "fileType": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "audio",
                                                                  "video",
                                                                  "document",
                                                                  "unknown",
                                                                  "file"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "assistant"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "description": "Assistant message content",
                                              "example": "Hello, how are you?",
                                              "anyOf": [
                                                {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "oneOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "text"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "text": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "middle"
                                                                }
                                                              },
                                                              "key": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "refusal"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "refusal": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "refusal"
                                                            ],
                                                            "description": ""
                                                          }
                                                        ],
                                                        "type": "object"
                                                      }
                                                    }
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_calls": {
                                          "allOf": [
                                            {
                                              "description": "Tool Call",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "id": {
                                                    "type": "string"
                                                  },
                                                  "type": {
                                                    "type": "string",
                                                    "const": "function"
                                                  },
                                                  "function": {
                                                    "type": "object",
                                                    "properties": {
                                                      "arguments": {
                                                        "description": "Tool arguments",
                                                        "type": "string"
                                                      },
                                                      "name": {
                                                        "description": "Tool name",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "arguments",
                                                      "name"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "type",
                                                  "function"
                                                ]
                                              }
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "interactive": {
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "Interactive response (FastGPT extension)"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "audio": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "function_call": {
                                          "allOf": [
                                            {
                                              "description": "Function call",
                                              "deprecated": true,
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "description": "Tool arguments",
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "description": "Tool name",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "refusal": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "tool"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_call_id": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "tool_call_id"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "function"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "name": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "name"
                                      ],
                                      "description": ""
                                    }
                                  ],
                                  "type": "object"
                                }
                              },
                              "stream": {
                                "description": "Whether to stream the response via SSE",
                                "default": false,
                                "type": "boolean"
                              },
                              "variables": {
                                "description": "Global workflow variables or plugin inputs",
                                "default": {},
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "responseChatItemId": {
                                "description": "Custom ID for the assistant response message; auto-generated if omitted",
                                "type": "string"
                              },
                              "detail": {
                                "description": "Whether to include detailed execution metadata such as `responseData`, `reasoning_content`, `tool_calls`, and `newVariables`",
                                "default": false,
                                "type": "boolean"
                              },
                              "retainDatasetCite": {
                                "description": "Whether to retain dataset citations",
                                "default": false,
                                "type": "boolean"
                              },
                              "showSkillReferences": {
                                "description": "Whether to include skill references",
                                "default": false,
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "App API Key (no appId required)",
                    "description": "When using an app-bound App API Key, `appId` is omitted and resolved from the key binding; supports default identity or `customUid` (not `authProxy`). Compatible with personal key `key-appId` SDK suffixes (which follow App Chat proxy rules); regular personal keys and login sessions require `appId`.",
                    "anyOf": [
                      {
                        "title": "Default Identity",
                        "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                        "type": "object",
                        "properties": {
                          "chatId": {
                            "description": "Chat session ID; automatically generated if omitted or empty",
                            "type": "string",
                            "maxLength": 1024
                          },
                          "metadata": {
                            "description": "Metadata",
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "messages": {
                            "description": "Messages list",
                            "default": [],
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "system"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "text"
                                                  },
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "developer"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "text"
                                                  },
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "user"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "select"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "select": {
                                                        "allOf": [
                                                          {
                                                            "oneOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "Q&A input type",
                                                                        "type": "string",
                                                                        "const": "agentAsk"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "first"
                                                                    }
                                                                  },
                                                                  "questions": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "User answers ordered by question",
                                                                        "minItems": 1,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "question": {
                                                                              "description": "Question snapshot at prompt time",
                                                                              "type": "string"
                                                                            },
                                                                            "value": {
                                                                              "description": "User answer text (selected option or custom text); empty string means skipped",
                                                                              "type": "string"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "question",
                                                                            "value"
                                                                          ]
                                                                        }
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "last"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "questions"
                                                                ],
                                                                "description": ""
                                                              },
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Confirm plan and start building",
                                                                            "type": "string",
                                                                            "const": "confirm"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Cancel this build",
                                                                            "type": "string",
                                                                            "const": "cancel"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Modify plan",
                                                                            "type": "string",
                                                                            "const": "revise"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "reviseText": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Specific revision feedback for the plan; cannot be empty",
                                                                            "type": "string",
                                                                            "minLength": 1
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action",
                                                                      "reviseText"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "type": "object"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "select"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "image_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "image_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              },
                                                              "detail": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "auto",
                                                                  "low",
                                                                  "high"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "image_url"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "input_audio"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "input_audio": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "data": {
                                                                "type": "string"
                                                              },
                                                              "format": {
                                                                "description": "Known audio format; omit if unknown so the model endpoint infers it",
                                                                "type": "string",
                                                                "enum": [
                                                                  "mp3",
                                                                  "wav",
                                                                  "ogg",
                                                                  "m4a",
                                                                  "amr",
                                                                  "mpga"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "data"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "input_audio"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "video_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "video_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "video_url"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "file"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "file": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "file_data": {
                                                                "type": "string"
                                                              },
                                                              "file_id": {
                                                                "type": "string"
                                                              },
                                                              "filename": {
                                                                "type": "string"
                                                              }
                                                            }
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "file"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "file_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "name": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "url": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "fileType": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "audio",
                                                              "video",
                                                              "document",
                                                              "unknown",
                                                              "file"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "url"
                                                    ],
                                                    "description": ""
                                                  }
                                                ],
                                                "type": "object"
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "assistant"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "description": "Assistant message content",
                                          "example": "Hello, how are you?",
                                          "anyOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "key": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "refusal"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "refusal": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "refusal"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "tool_calls": {
                                      "allOf": [
                                        {
                                          "description": "Tool Call",
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "id": {
                                                "type": "string"
                                              },
                                              "type": {
                                                "type": "string",
                                                "const": "function"
                                              },
                                              "function": {
                                                "type": "object",
                                                "properties": {
                                                  "arguments": {
                                                    "description": "Tool arguments",
                                                    "type": "string"
                                                  },
                                                  "name": {
                                                    "description": "Tool name",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "arguments",
                                                  "name"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "id",
                                              "type",
                                              "function"
                                            ]
                                          }
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "interactive": {
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": true,
                                          "description": "Interactive response (FastGPT extension)"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "audio": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "id"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "function_call": {
                                      "allOf": [
                                        {
                                          "description": "Function call",
                                          "deprecated": true,
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "arguments": {
                                                  "description": "Tool arguments",
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "description": "Tool name",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "arguments",
                                                "name"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "refusal": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "tool"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "image_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "image_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              },
                                                              "detail": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "auto",
                                                                  "low",
                                                                  "high"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "image_url"
                                                    ],
                                                    "description": ""
                                                  }
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "tool_call_id": {
                                      "allOf": [
                                        {
                                          "type": "string"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content",
                                    "tool_call_id"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "function"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "name": {
                                      "allOf": [
                                        {
                                          "type": "string"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content",
                                    "name"
                                  ],
                                  "description": ""
                                }
                              ],
                              "type": "object"
                            }
                          },
                          "stream": {
                            "description": "Whether to stream the response via SSE",
                            "default": false,
                            "type": "boolean"
                          },
                          "variables": {
                            "description": "Global workflow variables or plugin inputs",
                            "default": {},
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "responseChatItemId": {
                            "description": "Custom ID for the assistant response message; auto-generated if omitted",
                            "type": "string"
                          },
                          "detail": {
                            "description": "Whether to include detailed execution metadata such as `responseData`, `reasoning_content`, `tool_calls`, and `newVariables`",
                            "default": false,
                            "type": "boolean"
                          },
                          "retainDatasetCite": {
                            "description": "Whether to retain dataset citations",
                            "default": false,
                            "type": "boolean"
                          },
                          "showSkillReferences": {
                            "description": "Whether to include skill references",
                            "default": false,
                            "type": "boolean"
                          }
                        },
                        "required": []
                      },
                      {
                        "title": "Custom End-User (`customUid`)",
                        "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "End-user ID supplied by your backend during API Key calls (FastGPT >= 4.18.0, max 1024 chars); does not alter member permissions and is mutually exclusive with `authProxy`. New chats treat empty string as default user; existing chats bound to a `customUid` reject missing, empty, or mismatched values. Share-link calls use `outLinkAuthData.outLinkUid` instead.",
                                "type": "string",
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "description": "Chat session ID; automatically generated if omitted or empty",
                            "type": "string",
                            "maxLength": 1024
                          },
                          "metadata": {
                            "description": "Metadata",
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "messages": {
                            "description": "Messages list",
                            "default": [],
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "system"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "text"
                                                  },
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "developer"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "text"
                                                  },
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "user"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "select"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "select": {
                                                        "allOf": [
                                                          {
                                                            "oneOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "Q&A input type",
                                                                        "type": "string",
                                                                        "const": "agentAsk"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "first"
                                                                    }
                                                                  },
                                                                  "questions": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "User answers ordered by question",
                                                                        "minItems": 1,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "question": {
                                                                              "description": "Question snapshot at prompt time",
                                                                              "type": "string"
                                                                            },
                                                                            "value": {
                                                                              "description": "User answer text (selected option or custom text); empty string means skipped",
                                                                              "type": "string"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "question",
                                                                            "value"
                                                                          ]
                                                                        }
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "last"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "questions"
                                                                ],
                                                                "description": ""
                                                              },
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Confirm plan and start building",
                                                                            "type": "string",
                                                                            "const": "confirm"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Cancel this build",
                                                                            "type": "string",
                                                                            "const": "cancel"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Modify plan",
                                                                            "type": "string",
                                                                            "const": "revise"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "reviseText": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Specific revision feedback for the plan; cannot be empty",
                                                                            "type": "string",
                                                                            "minLength": 1
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action",
                                                                      "reviseText"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "type": "object"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "select"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "image_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "image_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              },
                                                              "detail": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "auto",
                                                                  "low",
                                                                  "high"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "image_url"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "input_audio"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "input_audio": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "data": {
                                                                "type": "string"
                                                              },
                                                              "format": {
                                                                "description": "Known audio format; omit if unknown so the model endpoint infers it",
                                                                "type": "string",
                                                                "enum": [
                                                                  "mp3",
                                                                  "wav",
                                                                  "ogg",
                                                                  "m4a",
                                                                  "amr",
                                                                  "mpga"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "data"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "input_audio"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "video_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "video_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "video_url"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "file"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "file": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "file_data": {
                                                                "type": "string"
                                                              },
                                                              "file_id": {
                                                                "type": "string"
                                                              },
                                                              "filename": {
                                                                "type": "string"
                                                              }
                                                            }
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "file"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "file_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "name": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "url": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "fileType": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "audio",
                                                              "video",
                                                              "document",
                                                              "unknown",
                                                              "file"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "url"
                                                    ],
                                                    "description": ""
                                                  }
                                                ],
                                                "type": "object"
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "assistant"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "description": "Assistant message content",
                                          "example": "Hello, how are you?",
                                          "anyOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "key": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "refusal"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "refusal": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "refusal"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "tool_calls": {
                                      "allOf": [
                                        {
                                          "description": "Tool Call",
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "id": {
                                                "type": "string"
                                              },
                                              "type": {
                                                "type": "string",
                                                "const": "function"
                                              },
                                              "function": {
                                                "type": "object",
                                                "properties": {
                                                  "arguments": {
                                                    "description": "Tool arguments",
                                                    "type": "string"
                                                  },
                                                  "name": {
                                                    "description": "Tool name",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "arguments",
                                                  "name"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "id",
                                              "type",
                                              "function"
                                            ]
                                          }
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "interactive": {
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": true,
                                          "description": "Interactive response (FastGPT extension)"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "audio": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "id"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "function_call": {
                                      "allOf": [
                                        {
                                          "description": "Function call",
                                          "deprecated": true,
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "arguments": {
                                                  "description": "Tool arguments",
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "description": "Tool name",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "arguments",
                                                "name"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "refusal": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "tool"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "image_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "image_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              },
                                                              "detail": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "auto",
                                                                  "low",
                                                                  "high"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "image_url"
                                                    ],
                                                    "description": ""
                                                  }
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "tool_call_id": {
                                      "allOf": [
                                        {
                                          "type": "string"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content",
                                    "tool_call_id"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "function"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "name": {
                                      "allOf": [
                                        {
                                          "type": "string"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content",
                                    "name"
                                  ],
                                  "description": ""
                                }
                              ],
                              "type": "object"
                            }
                          },
                          "stream": {
                            "description": "Whether to stream the response via SSE",
                            "default": false,
                            "type": "boolean"
                          },
                          "variables": {
                            "description": "Global workflow variables or plugin inputs",
                            "default": {},
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "responseChatItemId": {
                            "description": "Custom ID for the assistant response message; auto-generated if omitted",
                            "type": "string"
                          },
                          "detail": {
                            "description": "Whether to include detailed execution metadata such as `responseData`, `reasoning_content`, `tool_calls`, and `newVariables`",
                            "default": false,
                            "type": "boolean"
                          },
                          "retainDatasetCite": {
                            "description": "Whether to retain dataset citations",
                            "default": false,
                            "type": "boolean"
                          },
                          "showSkillReferences": {
                            "description": "Whether to include skill references",
                            "default": false,
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "customUid"
                        ]
                      }
                    ]
                  },
                  {
                    "title": "Share-Link Chat",
                    "description": "Resolves the app via `outLinkAuthData`, scoping the end user by `outLinkUid`. Takes precedence over `appId` and header auth without fallback on failure; protected share links still require login token/cookie and do not support `authProxy`.",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "Share-link auth payload containing `shareId` and `outLinkUid`. Overrides `appId`; protected links still verify login session cookies/tokens.",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "Share link ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "External share user ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "Chat session ID; automatically generated if omitted or empty",
                        "type": "string",
                        "maxLength": 1024
                      },
                      "metadata": {
                        "description": "Metadata",
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "messages": {
                        "description": "Messages list",
                        "default": [],
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "system"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "const": "text"
                                              },
                                              "text": {
                                                "type": "string"
                                              },
                                              "key": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "text"
                                            ]
                                          }
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "developer"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "const": "text"
                                              },
                                              "text": {
                                                "type": "string"
                                              },
                                              "key": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "text"
                                            ]
                                          }
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "user"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "select"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "select": {
                                                    "allOf": [
                                                      {
                                                        "oneOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "description": "Q&A input type",
                                                                    "type": "string",
                                                                    "const": "agentAsk"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "questions": {
                                                                "allOf": [
                                                                  {
                                                                    "description": "User answers ordered by question",
                                                                    "minItems": 1,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "question": {
                                                                          "description": "Question snapshot at prompt time",
                                                                          "type": "string"
                                                                        },
                                                                        "value": {
                                                                          "description": "User answer text (selected option or custom text); empty string means skipped",
                                                                          "type": "string"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "question",
                                                                        "value"
                                                                      ]
                                                                    }
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "questions"
                                                            ],
                                                            "description": ""
                                                          },
                                                          {
                                                            "oneOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "const": "workflowBuilderPreview"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  },
                                                                  "action": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "Confirm plan and start building",
                                                                        "type": "string",
                                                                        "const": "confirm"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "action"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": ""
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "const": "workflowBuilderPreview"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  },
                                                                  "action": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "Cancel this build",
                                                                        "type": "string",
                                                                        "const": "cancel"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "action"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": ""
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "const": "workflowBuilderPreview"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  },
                                                                  "action": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "Modify plan",
                                                                        "type": "string",
                                                                        "const": "revise"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "first"
                                                                    }
                                                                  },
                                                                  "reviseText": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "Specific revision feedback for the plan; cannot be empty",
                                                                        "type": "string",
                                                                        "minLength": 1
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "last"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "action",
                                                                  "reviseText"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": ""
                                                              }
                                                            ],
                                                            "type": "object"
                                                          }
                                                        ],
                                                        "type": "object"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "select"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "text"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "text": {
                                                    "allOf": [
                                                      {
                                                        "type": "string"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "image_url"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "image_url": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "url": {
                                                            "type": "string"
                                                          },
                                                          "detail": {
                                                            "type": "string",
                                                            "enum": [
                                                              "auto",
                                                              "low",
                                                              "high"
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "url"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "image_url"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "input_audio"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "input_audio": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "data": {
                                                            "type": "string"
                                                          },
                                                          "format": {
                                                            "description": "Known audio format; omit if unknown so the model endpoint infers it",
                                                            "type": "string",
                                                            "enum": [
                                                              "mp3",
                                                              "wav",
                                                              "ogg",
                                                              "m4a",
                                                              "amr",
                                                              "mpga"
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "data"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "input_audio"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "video_url"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "video_url": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "url": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "url"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "video_url"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "file"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "file": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "file_data": {
                                                            "type": "string"
                                                          },
                                                          "file_id": {
                                                            "type": "string"
                                                          },
                                                          "filename": {
                                                            "type": "string"
                                                          }
                                                        }
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "file"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "file_url"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "name": {
                                                    "allOf": [
                                                      {
                                                        "type": "string"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "middle"
                                                    }
                                                  },
                                                  "url": {
                                                    "allOf": [
                                                      {
                                                        "type": "string"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "middle"
                                                    }
                                                  },
                                                  "fileType": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "audio",
                                                          "video",
                                                          "document",
                                                          "unknown",
                                                          "file"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "url"
                                                ],
                                                "description": ""
                                              }
                                            ],
                                            "type": "object"
                                          }
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "assistant"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "description": "Assistant message content",
                                      "example": "Hello, how are you?",
                                      "anyOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "key": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "refusal"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "refusal": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "refusal"
                                                    ],
                                                    "description": ""
                                                  }
                                                ],
                                                "type": "object"
                                              }
                                            }
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "tool_calls": {
                                  "allOf": [
                                    {
                                      "description": "Tool Call",
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "type": {
                                            "type": "string",
                                            "const": "function"
                                          },
                                          "function": {
                                            "type": "object",
                                            "properties": {
                                              "arguments": {
                                                "description": "Tool arguments",
                                                "type": "string"
                                              },
                                              "name": {
                                                "description": "Tool name",
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "arguments",
                                              "name"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "type",
                                          "function"
                                        ]
                                      }
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "interactive": {
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": true,
                                      "description": "Interactive response (FastGPT extension)"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "audio": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "function_call": {
                                  "allOf": [
                                    {
                                      "description": "Function call",
                                      "deprecated": true,
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "arguments": {
                                              "description": "Tool arguments",
                                              "type": "string"
                                            },
                                            "name": {
                                              "description": "Tool name",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "arguments",
                                            "name"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "refusal": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "tool"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "text"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "text": {
                                                    "allOf": [
                                                      {
                                                        "type": "string"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "image_url"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "image_url": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "url": {
                                                            "type": "string"
                                                          },
                                                          "detail": {
                                                            "type": "string",
                                                            "enum": [
                                                              "auto",
                                                              "low",
                                                              "high"
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "url"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "image_url"
                                                ],
                                                "description": ""
                                              }
                                            ]
                                          }
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "tool_call_id": {
                                  "allOf": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content",
                                "tool_call_id"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "function"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "name": {
                                  "allOf": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content",
                                "name"
                              ],
                              "description": ""
                            }
                          ],
                          "type": "object"
                        }
                      },
                      "stream": {
                        "description": "Whether to stream the response via SSE",
                        "default": false,
                        "type": "boolean"
                      },
                      "variables": {
                        "description": "Global workflow variables or plugin inputs",
                        "default": {},
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "responseChatItemId": {
                        "description": "Custom ID for the assistant response message; auto-generated if omitted",
                        "type": "string"
                      },
                      "detail": {
                        "description": "Whether to include detailed execution metadata such as `responseData`, `reasoning_content`, `tool_calls`, and `newVariables`",
                        "default": false,
                        "type": "boolean"
                      },
                      "retainDatasetCite": {
                        "description": "Whether to retain dataset citations",
                        "default": false,
                        "type": "boolean"
                      },
                      "showSkillReferences": {
                        "description": "Whether to include skill references",
                        "default": false,
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "outLinkAuthData"
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "Conversation ID (`chatId`)",
                      "type": "string"
                    },
                    "title": {
                      "description": "Auto-generated title returned when naming an untitled conversation",
                      "type": "string"
                    },
                    "model": {
                      "description": "Model name (always empty string in v1)",
                      "type": "string",
                      "const": ""
                    },
                    "usage": {
                      "description": "Token usage summary (placeholder in v1; compute actual tokens from `responseData` when `detail=true`)",
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "description": "Fixed placeholder `1`; compute per-node token usage from `responseData` when `detail=true`",
                          "type": "number",
                          "const": 1
                        },
                        "completion_tokens": {
                          "description": "Fixed placeholder `1`; compute per-node token usage from `responseData` when `detail=true`",
                          "type": "number",
                          "const": 1
                        },
                        "total_tokens": {
                          "description": "Fixed placeholder `1`; compute per-node token usage from `responseData` when `detail=true`",
                          "type": "number",
                          "const": 1
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "completion_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    },
                    "choices": {
                      "description": "Completion choices list",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "message": {
                            "description": "Assistant message",
                            "type": "object",
                            "properties": {
                              "role": {
                                "description": "Message role",
                                "type": "string",
                                "const": "assistant"
                              },
                              "content": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": true
                                    }
                                  }
                                ],
                                "description": "Message content. Plain string for standard replies, or an array of typed blocks (`text`, `interactive`, `tool`, `file`, `reasoning`) when `detail=true` or an interactive node pauses execution. v1 adds an explicit `type` field on each block while v2 omits it; interactive items strip internal runtime fields."
                              },
                              "reasoning_content": {
                                "description": "Reasoning trace content (for reasoning models only)",
                                "type": "string"
                              }
                            },
                            "required": [
                              "role",
                              "content"
                            ],
                            "additionalProperties": false
                          },
                          "finish_reason": {
                            "description": "Completion finish reason, e.g. `stop`",
                            "type": "string"
                          },
                          "index": {
                            "description": "Choice index",
                            "type": "number"
                          }
                        },
                        "required": [
                          "message",
                          "finish_reason",
                          "index"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "responseData": {
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      },
                      "description": "Per-node workflow execution details (returned only when `detail=true`), including `moduleName`, `moduleType`, `runningTime`, `quoteList`, etc.",
                      "type": "array"
                    },
                    "newVariables": {
                      "description": "Workflow variables updated during execution (returned only when `detail=true`)",
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    }
                  },
                  "required": [
                    "id",
                    "model",
                    "usage",
                    "choices"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "detailFalseStreamFalse": {
                    "summary": "Compact JSON",
                    "description": "`detail=false, stream=false`; returns only core reply fields.",
                    "value": {
                      "id": "adsfasf",
                      "title": "Suzume Director",
                      "model": "",
                      "usage": {
                        "prompt_tokens": 1,
                        "completion_tokens": 1,
                        "total_tokens": 1
                      },
                      "choices": [
                        {
                          "message": {
                            "role": "assistant",
                            "content": "Makoto Shinkai directed the film Suzume."
                          },
                          "finish_reason": "stop",
                          "index": 0
                        }
                      ]
                    }
                  },
                  "detailTrueStreamFalse": {
                    "summary": "Detailed JSON",
                    "description": "`detail=true, stream=false`; includes `responseData` and `newVariables`.",
                    "value": {
                      "responseData": [
                        {
                          "moduleName": "Dataset Search",
                          "price": 1.2000000000000002,
                          "model": "Embedding-2",
                          "tokens": 6,
                          "similarity": 0.61,
                          "limit": 3
                        },
                        {
                          "moduleName": "AI Chat",
                          "price": 454.5,
                          "model": "FastAI-4k",
                          "tokens": 303,
                          "question": "Who is the director?",
                          "answer": "Makoto Shinkai directed the film Suzume.",
                          "maxToken": 2050,
                          "quoteList": [
                            {
                              "dataset_id": "646627f4f7b896cfd8910e38",
                              "id": "8099",
                              "q": "Who is the protagonist of this film?",
                              "a": "The protagonist is a young girl named Suzume.",
                              "source": "Manual Edit"
                            },
                            {
                              "dataset_id": "646627f4f7b896cfd8910e38",
                              "id": "19339",
                              "q": "Who directed the film Suzume?",
                              "a": "Makoto Shinkai directed the film Suzume.",
                              "source": "Manual Edit"
                            }
                          ],
                          "completeMessages": [
                            {
                              "obj": "System",
                              "value": "Knowledge base context:\n1. [Who is the protagonist of this film?\nThe protagonist is a young girl named Suzume.]\n2. [Who directed the film Suzume?\nMakoto Shinkai directed the film Suzume.]\n"
                            },
                            {
                              "obj": "Human",
                              "value": "Who is the director?"
                            },
                            {
                              "obj": "AI",
                              "value": "Makoto Shinkai directed the film Suzume."
                            }
                          ]
                        }
                      ],
                      "newVariables": {
                        "uid": "asdfadsfasfd2323",
                        "name": "Alice"
                      },
                      "id": "",
                      "title": "Suzume Director",
                      "model": "",
                      "usage": {
                        "prompt_tokens": 1,
                        "completion_tokens": 1,
                        "total_tokens": 1
                      },
                      "choices": [
                        {
                          "message": {
                            "role": "assistant",
                            "content": "Makoto Shinkai directed the film Suzume."
                          },
                          "finish_reason": "stop",
                          "index": 0
                        }
                      ]
                    }
                  },
                  "interactiveUserSelect": {
                    "summary": "User Selection",
                    "description": "`detail=true`; read the `interactive` display configuration from `choices[].message.content`.",
                    "value": {
                      "id": "chatId",
                      "model": "",
                      "usage": {
                        "prompt_tokens": 1,
                        "completion_tokens": 1,
                        "total_tokens": 1
                      },
                      "choices": [
                        {
                          "message": {
                            "role": "assistant",
                            "content": [
                              {
                                "interactive": {
                                  "type": "userSelect",
                                  "params": {
                                    "description": "Test prompt",
                                    "userSelectOptions": [
                                      {
                                        "value": "Confirm",
                                        "key": "option1"
                                      },
                                      {
                                        "value": "Cancel",
                                        "key": "option2"
                                      }
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "finish_reason": "stop",
                          "index": 0
                        }
                      ]
                    }
                  },
                  "interactiveUserInput": {
                    "summary": "Form Input",
                    "description": "`detail=true`; submit serialized JSON keyed by form field names while keeping the same `chatId`.",
                    "value": {
                      "id": "chatId",
                      "model": "",
                      "usage": {
                        "prompt_tokens": 1,
                        "completion_tokens": 1,
                        "total_tokens": 1
                      },
                      "choices": [
                        {
                          "message": {
                            "role": "assistant",
                            "content": [
                              {
                                "interactive": {
                                  "type": "userInput",
                                  "params": {
                                    "description": "Test prompt",
                                    "inputForm": [
                                      {
                                        "type": "input",
                                        "key": "Test 1",
                                        "label": "Test 1",
                                        "description": "",
                                        "value": "",
                                        "defaultValue": "",
                                        "valueType": "string",
                                        "required": false,
                                        "list": [
                                          {
                                            "label": "",
                                            "value": ""
                                          }
                                        ]
                                      },
                                      {
                                        "type": "numberInput",
                                        "key": "Test 2",
                                        "label": "Test 2",
                                        "description": "",
                                        "value": "",
                                        "defaultValue": "",
                                        "valueType": "number",
                                        "required": false,
                                        "list": [
                                          {
                                            "label": "",
                                            "value": ""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "finish_reason": "stop",
                          "index": 0
                        }
                      ]
                    }
                  }
                }
              },
              "text/event-stream": {
                "schema": {
                  "example": "event: answer\ndata: {\"choices\":[...]}\n\n",
                  "description": "Workflow SSE event stream; when `detail=true`, v2 emits `flowNodeResponse` per node (grouped by `id` and `parentId`) and ends with `[DONE]`.",
                  "type": "string"
                },
                "examples": {
                  "detailFalseStreamTrue": {
                    "summary": "Compact SSE",
                    "description": "`detail=false, stream=true`; standard replies emit only `data:` frames followed by `[DONE]`.",
                    "value": "data: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"index\":0,\"finish_reason\":null}]}\n\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"Makoto Shinkai \"},\"index\":0,\"finish_reason\":null}]}\n\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"directed the film Suzume.\"},\"index\":0,\"finish_reason\":null}]}\n\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":null},\"index\":0,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
                  },
                  "detailTrueStreamTrue": {
                    "summary": "Full Execution Stream",
                    "description": "`detail=true, stream=true`; node details arrive individually via `flowNodeResponse`. Frame ordering is illustrative and `chatTitle` may arrive earlier.",
                    "value": "event: flowNodeStatus\ndata: {\"status\":\"running\",\"name\":\"Dataset Search\"}\n\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"Makoto Shinkai \"},\"index\":0,\"finish_reason\":null}]}\n\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"directed the film Suzume.\"},\"index\":0,\"finish_reason\":null}]}\n\nevent: flowNodeResponse\ndata: {\"id\":\"response-ai-1\",\"nodeId\":\"ai-1\",\"moduleType\":\"chatNode\",\"moduleName\":\"AI Chat\",\"runningTime\":1.86,\"textOutput\":\"Makoto Shinkai directed the film Suzume.\"}\n\nevent: updateVariables\ndata: {\"lastQuestion\":\"Who is the director?\",\"searchCount\":1,\"found\":true,\"movieNames\":[\"Suzume\"],\"director\":{\"name\":\"Makoto Shinkai\"},\"nextPage\":null}\n\nevent: workflowDuration\ndata: {\"durationSeconds\":2.41}\n\nevent: chatTitle\ndata: {\"title\":\"Suzume Director\"}\n\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":null},\"index\":0,\"finish_reason\":\"stop\"}]}\n\nevent: answer\ndata: [DONE]\n\n"
                  },
                  "interactiveUserSelect": {
                    "summary": "User Selection",
                    "description": "`detail=true`; display options upon receiving `interactive`, then submit the chosen value to resume.",
                    "value": "event: interactive\ndata: {\"interactive\":{\"type\":\"userSelect\",\"params\":{\"description\":\"Test prompt\",\"userSelectOptions\":[{\"value\":\"Confirm\",\"key\":\"option1\"},{\"value\":\"Cancel\",\"key\":\"option2\"}]}}}\n\nevent: answer\ndata: [DONE]\n\n"
                  },
                  "interactiveUserInput": {
                    "summary": "Form Input",
                    "description": "`detail=true`; render the form upon receiving `interactive`, then submit a serialized JSON string to resume.",
                    "value": "event: interactive\ndata: {\"interactive\":{\"type\":\"userInput\",\"params\":{\"description\":\"Test prompt\",\"inputForm\":[{\"type\":\"input\",\"key\":\"Test 1\",\"label\":\"Test 1\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"string\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]},{\"type\":\"numberInput\",\"key\":\"Test 2\",\"label\":\"Test 2\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"number\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]}]}}}\n\nevent: answer\ndata: [DONE]\n\n"
                  },
                  "event_answer": {
                    "summary": "answer · Answer Delta",
                    "description": "Includes empty heartbeat deltas, answer text, `reasoning_content` deltas, `stop` finish chunks, and `[DONE]` markers.",
                    "value": ": 1. Empty heartbeat\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"index\":0,\"finish_reason\":null}]}\n\n: 2. Answer text\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"Makoto Shinkai directed the film Suzume.\"},\"index\":0,\"finish_reason\":null}]}\n\n: 3. Reasoning delta\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"reasoning_content\":\"Verify the director of Suzume first.\"},\"index\":0,\"finish_reason\":null}]}\n\n: 4. Stop finish chunk\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":null},\"index\":0,\"finish_reason\":\"stop\"}]}\n\n: 5. End of stream\nevent: answer\ndata: [DONE]\n\n"
                  },
                  "event_fastAnswer": {
                    "summary": "fastAnswer · Specified Reply",
                    "description": "Emitted for immediate outputs such as Specified Reply nodes; includes text deltas and a stop chunk.",
                    "value": ": 1. Specified reply text\nevent: fastAnswer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"Looking up relevant resources.\"},\"index\":0,\"finish_reason\":null}]}\n\n: 2. Specified reply stop chunk\nevent: fastAnswer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":null},\"index\":0,\"finish_reason\":\"stop\"}]}\n\n"
                  },
                  "event_flowNodeStatus": {
                    "summary": "flowNodeStatus · Node Status",
                    "description": "Emitted when a workflow node starts running; governed by `showRunningStatus` on share links.",
                    "value": "event: flowNodeStatus\ndata: {\"status\":\"running\",\"name\":\"Dataset Search\"}\n\n"
                  },
                  "event_flowNodeResponse": {
                    "summary": "flowNodeResponse · Node Response",
                    "description": "Emitted per node in v2 for top-level and child nodes; group by `id` and `parentId` (top-level when `parentId` is omitted).",
                    "value": ": 1. Top-level node\nevent: flowNodeResponse\ndata: {\"id\":\"response-ai-1\",\"nodeId\":\"ai-1\",\"moduleType\":\"chatNode\",\"moduleName\":\"AI Chat\",\"runningTime\":1.86,\"textOutput\":\"Makoto Shinkai directed the film Suzume.\"}\n\n: 2. Nested child node\nevent: flowNodeResponse\ndata: {\"id\":\"response-ai-child-1\",\"nodeId\":\"ai-1\",\"moduleType\":\"chatNode\",\"moduleName\":\"AI Chat\",\"runningTime\":1.86,\"textOutput\":\"Makoto Shinkai directed the film Suzume.\",\"parentId\":\"response-agent-1\"}\n\n"
                  },
                  "event_toolCall": {
                    "summary": "toolCall · Tool Call",
                    "description": "Initializes a tool call card; shows both standard calls and `hideDetails` calls with hidden parameters.",
                    "value": ": 1. Standard tool call\nevent: toolCall\ndata: {\"tool\":{\"id\":\"call-search-1\",\"toolName\":\"Dataset Search\",\"toolAvatar\":\"/imgs/workflow/db.png\",\"functionName\":\"dataset_search\",\"params\":\"{\\\"query\\\":\\\"Suzume director\\\"}\"},\"responseValueId\":\"call-search-1\"}\n\n: 2. Tool call hiding params and response details\nevent: toolCall\ndata: {\"tool\":{\"id\":\"call-search-1\",\"toolName\":\"Dataset Search\",\"toolAvatar\":\"/imgs/workflow/db.png\",\"functionName\":\"dataset_search\",\"params\":\"\",\"hideDetails\":true},\"responseValueId\":\"call-search-1\"}\n\n"
                  },
                  "event_toolParams": {
                    "summary": "toolParams · Tool Params Delta",
                    "description": "Appends or merges tool arguments keyed by `tool.id`; does not indicate execution completion.",
                    "value": "event: toolParams\ndata: {\"tool\":{\"id\":\"call-search-1\",\"params\":\"{\\\"query\\\":\\\"Suzume director\\\"}\"},\"responseValueId\":\"call-search-1\"}\n\n"
                  },
                  "event_toolResponse": {
                    "summary": "toolResponse · Tool Response",
                    "description": "Delivers the tool execution result keyed by `tool.id`; `response` can be a string or `null`.",
                    "value": ": 1. String response\nevent: toolResponse\ndata: {\"tool\":{\"id\":\"call-search-1\",\"response\":\"Director: Makoto Shinkai\"},\"responseValueId\":\"call-search-1\"}\n\n: 2. Empty response\nevent: toolResponse\ndata: {\"tool\":{\"id\":\"call-search-1\",\"response\":null},\"responseValueId\":\"call-search-1\"}\n\n"
                  },
                  "event_updateVariables": {
                    "summary": "updateVariables · Variable Updates",
                    "description": "Updates workflow variables for the current turn; values may be strings, numbers, booleans, arrays, objects, or `null`.",
                    "value": "event: updateVariables\ndata: {\"lastQuestion\":\"Who is the director?\",\"searchCount\":1,\"found\":true,\"movieNames\":[\"Suzume\"],\"director\":{\"name\":\"Makoto Shinkai\"},\"nextPage\":null}\n\n"
                  },
                  "event_workflowDuration": {
                    "summary": "workflowDuration · Workflow Duration",
                    "description": "Total elapsed execution time for the turn, with `durationSeconds` measured in seconds.",
                    "value": "event: workflowDuration\ndata: {\"durationSeconds\":2.41}\n\n"
                  },
                  "event_chatTitle": {
                    "summary": "chatTitle · Chat Title",
                    "description": "Emitted only when `detail=true` and an untitled conversation receives an auto-generated title; never overwrites manual titles.",
                    "value": "event: chatTitle\ndata: {\"title\":\"Suzume Director\"}\n\n"
                  },
                  "event_interactive": {
                    "summary": "interactive · Interactive Prompt",
                    "description": "Demonstrates user selection, form input, agent follow-up questions, billing pause, and sub-workflow wrappers (read inner prompts from `params.childrenResponse`). Internal runtime fields are omitted, and variants are mutually exclusive.",
                    "value": ": 1. User selection: userSelect\nevent: interactive\ndata: {\"interactive\":{\"type\":\"userSelect\",\"params\":{\"description\":\"Test prompt\",\"userSelectOptions\":[{\"value\":\"Confirm\",\"key\":\"option1\"},{\"value\":\"Cancel\",\"key\":\"option2\"}]}}}\n\n: 2. Form input: userInput\nevent: interactive\ndata: {\"interactive\":{\"type\":\"userInput\",\"params\":{\"description\":\"Test prompt\",\"inputForm\":[{\"type\":\"input\",\"key\":\"Test 1\",\"label\":\"Test 1\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"string\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]},{\"type\":\"numberInput\",\"key\":\"Test 2\",\"label\":\"Test 2\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"number\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]}]}}}\n\n: 3. Agent follow-up: agentAsk\nevent: interactive\ndata: {\"interactive\":{\"type\":\"agentAsk\",\"params\":{\"toolCallId\":\"ask-1\",\"arguments\":\"{\\\"reason\\\":\\\"Confirm the search scope to continue.\\\",\\\"blockerType\\\":\\\"user_choice\\\",\\\"questions\\\":[{\\\"question\\\":\\\"Which scope should be queried?\\\",\\\"options\\\":[{\\\"summary\\\":\\\"Current film only\\\",\\\"value\\\":\\\"current_movie\\\"},{\\\"summary\\\":\\\"All works by this director\\\",\\\"value\\\":\\\"all_movies\\\"}]}]}\"}}}\n\n: 4. Payment pause: paymentPause\nevent: interactive\ndata: {\"interactive\":{\"type\":\"paymentPause\",\"params\":{\"description\":\"Insufficient credits. Please top up to continue.\"}}}\n\n: 5. Sub-workflow wrapper: childrenInteractive\nevent: interactive\ndata: {\"interactive\":{\"type\":\"childrenInteractive\",\"params\":{\"childrenResponse\":{\"type\":\"userSelect\",\"params\":{\"description\":\"Test prompt\",\"userSelectOptions\":[{\"value\":\"Confirm\",\"key\":\"option1\"},{\"value\":\"Cancel\",\"key\":\"option2\"}]}}}}}\n\n: 6. Tool sub-workflow wrapper: toolChildrenInteractive\nevent: interactive\ndata: {\"interactive\":{\"type\":\"toolChildrenInteractive\",\"params\":{\"childrenResponse\":{\"type\":\"userInput\",\"params\":{\"description\":\"Test prompt\",\"inputForm\":[{\"type\":\"input\",\"key\":\"Test 1\",\"label\":\"Test 1\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"string\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]},{\"type\":\"numberInput\",\"key\":\"Test 2\",\"label\":\"Test 2\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"number\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]}]}},\"toolCallId\":\"call-search-1\"}}}\n\n: 7. Loop sub-workflow wrapper: loopInteractive\nevent: interactive\ndata: {\"interactive\":{\"type\":\"loopInteractive\",\"params\":{\"childrenResponse\":{\"type\":\"userSelect\",\"params\":{\"description\":\"Test prompt\",\"userSelectOptions\":[{\"value\":\"Confirm\",\"key\":\"option1\"},{\"value\":\"Cancel\",\"key\":\"option2\"}]}},\"currentIndex\":0,\"loopResult\":[]}}}\n\n: 8. Loop run wrapper: loopRunInteractive\nevent: interactive\ndata: {\"interactive\":{\"type\":\"loopRunInteractive\",\"params\":{\"childrenResponse\":{\"type\":\"userInput\",\"params\":{\"description\":\"Test prompt\",\"inputForm\":[{\"type\":\"input\",\"key\":\"Test 1\",\"label\":\"Test 1\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"string\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]},{\"type\":\"numberInput\",\"key\":\"Test 2\",\"label\":\"Test 2\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"number\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]}]}},\"iteration\":1,\"loopHistory\":[]}}}\n\n"
                  },
                  "event_planStatus": {
                    "summary": "planStatus · Plan Generation Status",
                    "description": "Emitted only when planning is enabled; shows `generating` and `updating` statuses.",
                    "value": ": 1. Generating plan\nevent: planStatus\ndata: {\"planStatus\":{\"status\":\"generating\"}}\n\n: 2. Updating plan\nevent: planStatus\ndata: {\"planStatus\":{\"status\":\"updating\"}}\n\n"
                  },
                  "event_plan": {
                    "summary": "plan · Agent Plan",
                    "description": "Identifies the plan with `plan.planId` and each step with `steps[].id`; step statuses update during execution.",
                    "value": "event: plan\ndata: {\"plan\":{\"planId\":\"plan-1\",\"name\":\"Look up director info\",\"steps\":[{\"id\":\"step-1\",\"name\":\"Confirm film title\",\"status\":\"done\"},{\"id\":\"step-2\",\"name\":\"Search film references\",\"status\":\"in_progress\"},{\"id\":\"step-3\",\"name\":\"Compile director details\",\"status\":\"pending\"},{\"id\":\"step-4\",\"name\":\"Verify paid sources\",\"status\":\"blocked\",\"note\":\"Waiting for user authorization\"},{\"id\":\"step-5\",\"name\":\"Add unrelated works\",\"status\":\"skipped\",\"note\":\"Out of scope\"}]}}\n\n"
                  },
                  "event_skillCall": {
                    "summary": "skillCall · Skill Call",
                    "description": "Emitted when loading skill instructions, only when skill capabilities are enabled.",
                    "value": "event: skillCall\ndata: {\"skill\":{\"id\":\"skill-call-1\",\"skillName\":\"Reference Lookup\",\"skillAvatar\":\"/icon/logo.svg\",\"description\":\"Search related reference documents\",\"skillMdPath\":\"/skills/search/SKILL.md\"}}\n\n"
                  },
                  "event_sandboxStatus": {
                    "summary": "sandboxStatus · Sandbox Status",
                    "description": "Shows visible sandbox lifecycle phases (`ready` allows tool execution, `failed` may carry `message`, skill deployment phases may include `skillName`). Phases represent distinct states rather than a fixed sequence.",
                    "value": ": 1. Phase: checkExisting\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"checkExisting\"}\n\n: 2. Phase: connecting\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"connecting\",\"isWarmStart\":true}\n\n: 3. Phase: fetchSkills\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"fetchSkills\"}\n\n: 4. Phase: creatingContainer\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"creatingContainer\"}\n\n: 5. Phase: deployingSkills\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"deployingSkills\",\"skillName\":\"Reference Lookup\"}\n\n: 6. Phase: downloadingPackage\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"downloadingPackage\",\"skillName\":\"Reference Lookup\"}\n\n: 7. Phase: uploadingPackage\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"uploadingPackage\",\"skillName\":\"Reference Lookup\"}\n\n: 8. Phase: extractingPackage\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"extractingPackage\",\"skillName\":\"Reference Lookup\"}\n\n: 9. Phase: lazyInit\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"lazyInit\"}\n\n: 10. Phase: upgrading\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"upgrading\"}\n\n: 11. Phase: ready\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"ready\",\"isWarmStart\":true}\n\n: 12. Phase: failed\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"failed\",\"message\":\"Sandbox initialization failed. Please retry shortly.\"}\n\n"
                  },
                  "event_error": {
                    "summary": "error · Stream Error",
                    "description": "Error emitted after the SSE stream opens, including plain `message` errors or structured business errors with `code`, `statusText`, and `data`. Do not rely on HTTP 200 alone.",
                    "value": ": 1. Generic error\nevent: error\ndata: {\"message\":\"Model request failed. Please retry shortly.\"}\n\n: 2. Business error\nevent: error\ndata: {\"code\":510003,\"statusText\":\"runtimeUpgradeInProgress\",\"message\":\"Sandbox upgrade in progress. Please retry shortly.\",\"data\":null,\"httpStatus\":409}\n\n"
                  }
                }
              }
            }
          },
          "409": {
            "description": "Rejects the request when the conversation already has an active generation without persisting the rejected message. Non-streaming calls return HTTP 409; streaming calls emit the same payload on `event: error`. Use `data.responseChatItemId` to resume the active assistant message (or reuse the latest AI message when `data.reusePreviousAi=true`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "number",
                      "const": 504001
                    },
                    "statusText": {
                      "type": "string",
                      "const": "chatIsGenerating"
                    },
                    "message": {
                      "description": "Localized display error message; use `code` or `statusText` for programmatic handling. Defaults to English when no translation is available.",
                      "example": "common:code_error.chat_error.chat_generating",
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "responseChatItemId": {
                          "description": "Active assistant message ID currently generating on the server; clients should resume tracking this ID",
                          "example": "active-ai-response-id",
                          "type": "string",
                          "minLength": 1
                        },
                        "reusePreviousAi": {
                          "description": "Indicates an interactive resume reusing the latest assistant message; refresh records before resuming",
                          "example": true,
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v2/chat/stop": {
      "post": {
        "summary": "Stop Chat Completion",
        "description": "Writes a stop flag for an active conversation and returns immediately. Clients should abort the open stream upon receiving success.\n  The workflow halts scheduling at the next safe checkpoint; non-interruptible in-flight nodes such as HTTP requests still wait for their current step to finish.",
        "tags": [
          "Chat Completions & Control"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "example": {
                  "chatId": "1234567890",
                  "outLinkAuthData": {
                    "shareId": "1234567890",
                    "outLinkUid": "1234567890"
                  }
                },
                "anyOf": [
                  {
                    "title": "App Chat",
                    "description": "Identify the conversation via `appId`. When both API Key and login session are supported, `Authorization` takes precedence over token/Cookie.",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "Application ID authenticated with the request header credentials allowed by this endpoint.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "Session resource type associated with `appId`. Defaults to `app`; pass the matching `sourceType` for assistant builder sessions.",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "Default Identity",
                            "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "description": "Chat ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            },
                            "required": [
                              "chatId"
                            ]
                          },
                          {
                            "title": "Custom End-User (`customUid`)",
                            "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "Chat ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            },
                            "required": [
                              "chatId",
                              "customUid"
                            ]
                          },
                          {
                            "title": "Proxy Team Member (`authProxy`)",
                            "description": "Act on behalf of another member in the same team via `authProxy`. Available only on personal API keys with `authProxy` enabled; mutually exclusive with `customUid`.",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key proxy caller identity. Available only for personal keys with `authProxy` enabled; specify `tmbId` or `username` (`tmbId` takes precedence without falling back to `username` on invalid ID).",
                                    "anyOf": [
                                      {
                                        "title": "By Team Member ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "Proxied team member ID (`tmbId`), takes precedence over `username`",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "By Username",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "Proxied team member username",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "Chat ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            },
                            "required": [
                              "chatId",
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill Debug Session",
                    "description": "Identify the debug session via `skillId` (takes precedence over `appId` and ignores `sourceType`), authenticated with allowed request header credentials.",
                    "type": "object",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit debug ID authenticated with allowed request header credentials.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "Chat ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      }
                    },
                    "required": [
                      "skillId",
                      "chatId"
                    ]
                  },
                  {
                    "title": "Share-Link Chat",
                    "description": "Resolves the underlying app via `outLinkAuthData`, taking precedence over `skillId` and `appId` (ignoring `sourceType`). Protected links still validate login cookies/tokens and never fall back to standard auth on failure.",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "Share-link auth payload (`shareId` / `outLinkUid`). Overrides `skillId` and `appId`; protected links still validate login session cookies/tokens.",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "Share link ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "External share user ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "Chat ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      }
                    },
                    "required": [
                      "outLinkAuthData",
                      "chatId"
                    ]
                  },
                  {
                    "title": "App API Key (no appId required)",
                    "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                    "anyOf": [
                      {
                        "title": "Default Identity",
                        "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                        "type": "object",
                        "properties": {
                          "chatId": {
                            "description": "Chat ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          }
                        },
                        "required": [
                          "chatId"
                        ]
                      },
                      {
                        "title": "Custom End-User (`customUid`)",
                        "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "description": "Chat ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          }
                        },
                        "required": [
                          "chatId",
                          "customUid"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatId": "1234567890"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully wrote workflow stop flag",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "example": {
                        "success": true,
                        "completed": false,
                        "chatGenerateStatus": 0
                      },
                      "type": "object",
                      "properties": {
                        "success": {
                          "description": "Whether the stop signal was written successfully",
                          "example": true,
                          "type": "boolean"
                        },
                        "completed": {
                          "description": "Whether full workflow teardown is confirmed; the endpoint returns immediately without waiting, so this is always `false`",
                          "example": false,
                          "deprecated": true,
                          "type": "boolean"
                        },
                        "chatGenerateStatus": {
                          "description": "Legacy conservative generating flag for backward compatibility; does not mean new workflow nodes will keep scheduling",
                          "example": 0,
                          "deprecated": true,
                          "type": "number",
                          "enum": [
                            0,
                            1
                          ]
                        }
                      },
                      "required": [
                        "success",
                        "completed"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/completions": {
      "post": {
        "tags": [
          "Chat Completions & Control"
        ],
        "deprecated": true,
        "summary": "Create Chat Completion (v1)",
        "description": "The v1 chat completions endpoint follows the OpenAI Chat Completions format. Standard OpenAI clients can point `baseURL` and `Authorization` to a FastGPT app.\n\n**Important Notes**\n\n- Backend callers can pass `customUid` to identify end users (forwarded to workflow `userId`). It does not change the authenticating member and is mutually exclusive with `authProxy` (max 1024 chars; empty string uses the default member; FastGPT >= 4.18.0).\n- Request parameters such as `model` and `temperature` are ignored because model settings are defined by the published workflow.\n- Standard `usage` tokens are placeholder values; set `detail=true` and sum `tokens` in `responseData` if needed.\n\n**`chatId` Behavior**\n\n- Omitted or empty: Server-side conversation memory is disabled; context comes solely from `messages`.\n- Non-empty string: Loads existing conversation context for `chatId` and reads only the final entry of `messages` as the user prompt (earlier messages are ignored). Ensure `chatId` is unique (max 1024 chars).\n\n**`stream` / `detail` Combinations**\n\n- `detail=false, stream=false`: Returns compact OpenAI-compatible JSON (`choices`, `usage`, `id`).\n- `detail=false, stream=true`: Returns an OpenAI-compatible SSE stream with answer deltas and `[DONE]`.\n- `detail=true, stream=false`: Includes `responseData` and `newVariables` in the JSON payload.\n- `detail=true, stream=true`: Returns a multi-event SSE stream (`answer`, `flowNodeStatus`, `flowResponses`, etc.).\n\n**Interactive Nodes**\n\nIf the workflow includes interactive nodes, set `detail=true`:\n\n- `stream=true`: Read interactive payloads from `event: interactive`.\n- `stream=false`: Read the `interactive` entry inside `choices[].message.content`.\n\nNon-streaming `interactive` payloads unwrap nested `children` / `loop` / `tool` wrappers down to the innermost prompt and strip internal runtime fields (`entryNodeIds`, `memoryEdges`, `nodeOutputs`). SSE frames may preserve wrapper envelopes whose inner payload sits under `params.childrenResponse`.\n\nTo resume execution after rendering the interactive UI, call this endpoint again with the same `chatId`:\n\n- User selection: Pass the selected value directly as the user message `content`.\n- Form input: Serialize the form object as a JSON string in the user message `content`.\n",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "App Chat",
                    "description": "Identify the application via `appId` and authenticate with an API Key or login session. Personal API Key requests may omit `body.appId` when using an `apiKey-appId` header suffix or legacy bound key; login sessions must provide `appId`. App API Keys do not support `authProxy`.",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "Application ID. App API Keys ignore this field and SDK suffixes in favor of the bound app; personal keys resolve in order: `body.appId` > `Authorization` `key-appId` suffix. The suffix is never persisted.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "Default Identity",
                            "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "description": "Chat session ID; automatically generated if omitted or empty",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "metadata": {
                                "description": "Metadata",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "messages": {
                                "description": "Messages list",
                                "default": [],
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "system"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "developer"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "user"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "select"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "select": {
                                                            "allOf": [
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Q&A input type",
                                                                            "type": "string",
                                                                            "const": "agentAsk"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "questions": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "User answers ordered by question",
                                                                            "minItems": 1,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "question": {
                                                                                  "description": "Question snapshot at prompt time",
                                                                                  "type": "string"
                                                                                },
                                                                                "value": {
                                                                                  "description": "User answer text (selected option or custom text); empty string means skipped",
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "question",
                                                                                "value"
                                                                              ]
                                                                            }
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "questions"
                                                                    ],
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "oneOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Confirm plan and start building",
                                                                                "type": "string",
                                                                                "const": "confirm"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Cancel this build",
                                                                                "type": "string",
                                                                                "const": "cancel"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Modify plan",
                                                                                "type": "string",
                                                                                "const": "revise"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "first"
                                                                            }
                                                                          },
                                                                          "reviseText": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Specific revision feedback for the plan; cannot be empty",
                                                                                "type": "string",
                                                                                "minLength": 1
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "last"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action",
                                                                          "reviseText"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      }
                                                                    ],
                                                                    "type": "object"
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "select"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "input_audio"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "input_audio": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  },
                                                                  "format": {
                                                                    "description": "Known audio format; omit if unknown so the model endpoint infers it",
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "mp3",
                                                                      "wav",
                                                                      "ogg",
                                                                      "m4a",
                                                                      "amr",
                                                                      "mpga"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "input_audio"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "video_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "video_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "video_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "file": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "file_data": {
                                                                    "type": "string"
                                                                  },
                                                                  "file_id": {
                                                                    "type": "string"
                                                                  },
                                                                  "filename": {
                                                                    "type": "string"
                                                                  }
                                                                }
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "file"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "name": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "url": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "fileType": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "audio",
                                                                  "video",
                                                                  "document",
                                                                  "unknown",
                                                                  "file"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "assistant"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "description": "Assistant message content",
                                              "example": "Hello, how are you?",
                                              "anyOf": [
                                                {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "oneOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "text"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "text": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "middle"
                                                                }
                                                              },
                                                              "key": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "refusal"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "refusal": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "refusal"
                                                            ],
                                                            "description": ""
                                                          }
                                                        ],
                                                        "type": "object"
                                                      }
                                                    }
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_calls": {
                                          "allOf": [
                                            {
                                              "description": "Tool Call",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "id": {
                                                    "type": "string"
                                                  },
                                                  "type": {
                                                    "type": "string",
                                                    "const": "function"
                                                  },
                                                  "function": {
                                                    "type": "object",
                                                    "properties": {
                                                      "arguments": {
                                                        "description": "Tool arguments",
                                                        "type": "string"
                                                      },
                                                      "name": {
                                                        "description": "Tool name",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "arguments",
                                                      "name"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "type",
                                                  "function"
                                                ]
                                              }
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "interactive": {
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "Interactive response (FastGPT extension)"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "audio": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "function_call": {
                                          "allOf": [
                                            {
                                              "description": "Function call",
                                              "deprecated": true,
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "description": "Tool arguments",
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "description": "Tool name",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "refusal": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "tool"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_call_id": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "tool_call_id"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "function"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "name": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "name"
                                      ],
                                      "description": ""
                                    }
                                  ],
                                  "type": "object"
                                }
                              },
                              "stream": {
                                "description": "Whether to stream the response via SSE",
                                "default": false,
                                "type": "boolean"
                              },
                              "variables": {
                                "description": "Global workflow variables or plugin inputs",
                                "default": {},
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "responseChatItemId": {
                                "description": "Custom ID for the assistant response message; auto-generated if omitted",
                                "type": "string"
                              },
                              "detail": {
                                "description": "Whether to include detailed execution metadata such as `responseData`, `reasoning_content`, `tool_calls`, and `newVariables`",
                                "default": false,
                                "type": "boolean"
                              },
                              "retainDatasetCite": {
                                "description": "Whether to retain dataset citations",
                                "default": false,
                                "type": "boolean"
                              },
                              "showSkillReferences": {
                                "description": "Whether to include skill references",
                                "default": false,
                                "type": "boolean"
                              }
                            },
                            "required": []
                          },
                          {
                            "title": "Custom End-User (`customUid`)",
                            "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "End-user ID supplied by your backend during API Key calls (FastGPT >= 4.18.0, max 1024 chars); does not alter member permissions and is mutually exclusive with `authProxy`. New chats treat empty string as default user; existing chats bound to a `customUid` reject missing, empty, or mismatched values. Share-link calls use `outLinkAuthData.outLinkUid` instead.",
                                    "type": "string",
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "Chat session ID; automatically generated if omitted or empty",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "metadata": {
                                "description": "Metadata",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "messages": {
                                "description": "Messages list",
                                "default": [],
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "system"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "developer"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "user"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "select"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "select": {
                                                            "allOf": [
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Q&A input type",
                                                                            "type": "string",
                                                                            "const": "agentAsk"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "questions": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "User answers ordered by question",
                                                                            "minItems": 1,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "question": {
                                                                                  "description": "Question snapshot at prompt time",
                                                                                  "type": "string"
                                                                                },
                                                                                "value": {
                                                                                  "description": "User answer text (selected option or custom text); empty string means skipped",
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "question",
                                                                                "value"
                                                                              ]
                                                                            }
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "questions"
                                                                    ],
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "oneOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Confirm plan and start building",
                                                                                "type": "string",
                                                                                "const": "confirm"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Cancel this build",
                                                                                "type": "string",
                                                                                "const": "cancel"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Modify plan",
                                                                                "type": "string",
                                                                                "const": "revise"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "first"
                                                                            }
                                                                          },
                                                                          "reviseText": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Specific revision feedback for the plan; cannot be empty",
                                                                                "type": "string",
                                                                                "minLength": 1
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "last"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action",
                                                                          "reviseText"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      }
                                                                    ],
                                                                    "type": "object"
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "select"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "input_audio"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "input_audio": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  },
                                                                  "format": {
                                                                    "description": "Known audio format; omit if unknown so the model endpoint infers it",
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "mp3",
                                                                      "wav",
                                                                      "ogg",
                                                                      "m4a",
                                                                      "amr",
                                                                      "mpga"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "input_audio"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "video_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "video_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "video_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "file": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "file_data": {
                                                                    "type": "string"
                                                                  },
                                                                  "file_id": {
                                                                    "type": "string"
                                                                  },
                                                                  "filename": {
                                                                    "type": "string"
                                                                  }
                                                                }
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "file"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "name": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "url": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "fileType": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "audio",
                                                                  "video",
                                                                  "document",
                                                                  "unknown",
                                                                  "file"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "assistant"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "description": "Assistant message content",
                                              "example": "Hello, how are you?",
                                              "anyOf": [
                                                {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "oneOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "text"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "text": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "middle"
                                                                }
                                                              },
                                                              "key": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "refusal"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "refusal": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "refusal"
                                                            ],
                                                            "description": ""
                                                          }
                                                        ],
                                                        "type": "object"
                                                      }
                                                    }
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_calls": {
                                          "allOf": [
                                            {
                                              "description": "Tool Call",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "id": {
                                                    "type": "string"
                                                  },
                                                  "type": {
                                                    "type": "string",
                                                    "const": "function"
                                                  },
                                                  "function": {
                                                    "type": "object",
                                                    "properties": {
                                                      "arguments": {
                                                        "description": "Tool arguments",
                                                        "type": "string"
                                                      },
                                                      "name": {
                                                        "description": "Tool name",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "arguments",
                                                      "name"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "type",
                                                  "function"
                                                ]
                                              }
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "interactive": {
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "Interactive response (FastGPT extension)"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "audio": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "function_call": {
                                          "allOf": [
                                            {
                                              "description": "Function call",
                                              "deprecated": true,
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "description": "Tool arguments",
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "description": "Tool name",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "refusal": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "tool"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_call_id": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "tool_call_id"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "function"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "name": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "name"
                                      ],
                                      "description": ""
                                    }
                                  ],
                                  "type": "object"
                                }
                              },
                              "stream": {
                                "description": "Whether to stream the response via SSE",
                                "default": false,
                                "type": "boolean"
                              },
                              "variables": {
                                "description": "Global workflow variables or plugin inputs",
                                "default": {},
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "responseChatItemId": {
                                "description": "Custom ID for the assistant response message; auto-generated if omitted",
                                "type": "string"
                              },
                              "detail": {
                                "description": "Whether to include detailed execution metadata such as `responseData`, `reasoning_content`, `tool_calls`, and `newVariables`",
                                "default": false,
                                "type": "boolean"
                              },
                              "retainDatasetCite": {
                                "description": "Whether to retain dataset citations",
                                "default": false,
                                "type": "boolean"
                              },
                              "showSkillReferences": {
                                "description": "Whether to include skill references",
                                "default": false,
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "customUid"
                            ]
                          },
                          {
                            "title": "Proxy Team Member (`authProxy`)",
                            "description": "Act on behalf of another member in the same team via `authProxy`. Available only on personal API keys with `authProxy` enabled; mutually exclusive with `customUid`.",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "description": "Team member identity to proxy via API Key (mutually exclusive with `customUid`; unsupported on share-link chats). Specify `tmbId` or `username`; if both are sent, `tmbId` takes precedence without falling back to `username` on invalid ID.",
                                    "type": "object",
                                    "anyOf": [
                                      {
                                        "title": "By Team Member ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "Proxied team member ID (`tmbId`), takes precedence over `username`",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "By Username",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "Proxied team member username",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "Chat session ID; automatically generated if omitted or empty",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "metadata": {
                                "description": "Metadata",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "messages": {
                                "description": "Messages list",
                                "default": [],
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "system"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "developer"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "user"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "select"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "select": {
                                                            "allOf": [
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Q&A input type",
                                                                            "type": "string",
                                                                            "const": "agentAsk"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "questions": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "User answers ordered by question",
                                                                            "minItems": 1,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "question": {
                                                                                  "description": "Question snapshot at prompt time",
                                                                                  "type": "string"
                                                                                },
                                                                                "value": {
                                                                                  "description": "User answer text (selected option or custom text); empty string means skipped",
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "question",
                                                                                "value"
                                                                              ]
                                                                            }
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "questions"
                                                                    ],
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "oneOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Confirm plan and start building",
                                                                                "type": "string",
                                                                                "const": "confirm"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Cancel this build",
                                                                                "type": "string",
                                                                                "const": "cancel"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Modify plan",
                                                                                "type": "string",
                                                                                "const": "revise"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "first"
                                                                            }
                                                                          },
                                                                          "reviseText": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Specific revision feedback for the plan; cannot be empty",
                                                                                "type": "string",
                                                                                "minLength": 1
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "last"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action",
                                                                          "reviseText"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      }
                                                                    ],
                                                                    "type": "object"
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "select"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "input_audio"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "input_audio": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  },
                                                                  "format": {
                                                                    "description": "Known audio format; omit if unknown so the model endpoint infers it",
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "mp3",
                                                                      "wav",
                                                                      "ogg",
                                                                      "m4a",
                                                                      "amr",
                                                                      "mpga"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "input_audio"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "video_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "video_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "video_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "file": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "file_data": {
                                                                    "type": "string"
                                                                  },
                                                                  "file_id": {
                                                                    "type": "string"
                                                                  },
                                                                  "filename": {
                                                                    "type": "string"
                                                                  }
                                                                }
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "file"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "name": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "url": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "fileType": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "audio",
                                                                  "video",
                                                                  "document",
                                                                  "unknown",
                                                                  "file"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "assistant"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "description": "Assistant message content",
                                              "example": "Hello, how are you?",
                                              "anyOf": [
                                                {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "oneOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "text"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "text": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "middle"
                                                                }
                                                              },
                                                              "key": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "refusal"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "refusal": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "refusal"
                                                            ],
                                                            "description": ""
                                                          }
                                                        ],
                                                        "type": "object"
                                                      }
                                                    }
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_calls": {
                                          "allOf": [
                                            {
                                              "description": "Tool Call",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "id": {
                                                    "type": "string"
                                                  },
                                                  "type": {
                                                    "type": "string",
                                                    "const": "function"
                                                  },
                                                  "function": {
                                                    "type": "object",
                                                    "properties": {
                                                      "arguments": {
                                                        "description": "Tool arguments",
                                                        "type": "string"
                                                      },
                                                      "name": {
                                                        "description": "Tool name",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "arguments",
                                                      "name"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "type",
                                                  "function"
                                                ]
                                              }
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "interactive": {
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "Interactive response (FastGPT extension)"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "audio": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "function_call": {
                                          "allOf": [
                                            {
                                              "description": "Function call",
                                              "deprecated": true,
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "description": "Tool arguments",
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "description": "Tool name",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "refusal": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "tool"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_call_id": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "tool_call_id"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "function"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "name": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "name"
                                      ],
                                      "description": ""
                                    }
                                  ],
                                  "type": "object"
                                }
                              },
                              "stream": {
                                "description": "Whether to stream the response via SSE",
                                "default": false,
                                "type": "boolean"
                              },
                              "variables": {
                                "description": "Global workflow variables or plugin inputs",
                                "default": {},
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "responseChatItemId": {
                                "description": "Custom ID for the assistant response message; auto-generated if omitted",
                                "type": "string"
                              },
                              "detail": {
                                "description": "Whether to include detailed execution metadata such as `responseData`, `reasoning_content`, `tool_calls`, and `newVariables`",
                                "default": false,
                                "type": "boolean"
                              },
                              "retainDatasetCite": {
                                "description": "Whether to retain dataset citations",
                                "default": false,
                                "type": "boolean"
                              },
                              "showSkillReferences": {
                                "description": "Whether to include skill references",
                                "default": false,
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "App API Key (no appId required)",
                    "description": "When using an app-bound App API Key, `appId` is omitted and resolved from the key binding; supports default identity or `customUid` (not `authProxy`). Compatible with personal key `key-appId` SDK suffixes (which follow App Chat proxy rules); regular personal keys and login sessions require `appId`.",
                    "anyOf": [
                      {
                        "title": "Default Identity",
                        "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                        "type": "object",
                        "properties": {
                          "chatId": {
                            "description": "Chat session ID; automatically generated if omitted or empty",
                            "type": "string",
                            "maxLength": 1024
                          },
                          "metadata": {
                            "description": "Metadata",
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "messages": {
                            "description": "Messages list",
                            "default": [],
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "system"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "text"
                                                  },
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "developer"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "text"
                                                  },
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "user"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "select"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "select": {
                                                        "allOf": [
                                                          {
                                                            "oneOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "Q&A input type",
                                                                        "type": "string",
                                                                        "const": "agentAsk"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "first"
                                                                    }
                                                                  },
                                                                  "questions": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "User answers ordered by question",
                                                                        "minItems": 1,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "question": {
                                                                              "description": "Question snapshot at prompt time",
                                                                              "type": "string"
                                                                            },
                                                                            "value": {
                                                                              "description": "User answer text (selected option or custom text); empty string means skipped",
                                                                              "type": "string"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "question",
                                                                            "value"
                                                                          ]
                                                                        }
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "last"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "questions"
                                                                ],
                                                                "description": ""
                                                              },
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Confirm plan and start building",
                                                                            "type": "string",
                                                                            "const": "confirm"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Cancel this build",
                                                                            "type": "string",
                                                                            "const": "cancel"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Modify plan",
                                                                            "type": "string",
                                                                            "const": "revise"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "reviseText": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Specific revision feedback for the plan; cannot be empty",
                                                                            "type": "string",
                                                                            "minLength": 1
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action",
                                                                      "reviseText"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "type": "object"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "select"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "image_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "image_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              },
                                                              "detail": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "auto",
                                                                  "low",
                                                                  "high"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "image_url"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "input_audio"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "input_audio": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "data": {
                                                                "type": "string"
                                                              },
                                                              "format": {
                                                                "description": "Known audio format; omit if unknown so the model endpoint infers it",
                                                                "type": "string",
                                                                "enum": [
                                                                  "mp3",
                                                                  "wav",
                                                                  "ogg",
                                                                  "m4a",
                                                                  "amr",
                                                                  "mpga"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "data"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "input_audio"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "video_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "video_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "video_url"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "file"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "file": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "file_data": {
                                                                "type": "string"
                                                              },
                                                              "file_id": {
                                                                "type": "string"
                                                              },
                                                              "filename": {
                                                                "type": "string"
                                                              }
                                                            }
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "file"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "file_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "name": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "url": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "fileType": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "audio",
                                                              "video",
                                                              "document",
                                                              "unknown",
                                                              "file"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "url"
                                                    ],
                                                    "description": ""
                                                  }
                                                ],
                                                "type": "object"
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "assistant"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "description": "Assistant message content",
                                          "example": "Hello, how are you?",
                                          "anyOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "key": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "refusal"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "refusal": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "refusal"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "tool_calls": {
                                      "allOf": [
                                        {
                                          "description": "Tool Call",
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "id": {
                                                "type": "string"
                                              },
                                              "type": {
                                                "type": "string",
                                                "const": "function"
                                              },
                                              "function": {
                                                "type": "object",
                                                "properties": {
                                                  "arguments": {
                                                    "description": "Tool arguments",
                                                    "type": "string"
                                                  },
                                                  "name": {
                                                    "description": "Tool name",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "arguments",
                                                  "name"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "id",
                                              "type",
                                              "function"
                                            ]
                                          }
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "interactive": {
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": true,
                                          "description": "Interactive response (FastGPT extension)"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "audio": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "id"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "function_call": {
                                      "allOf": [
                                        {
                                          "description": "Function call",
                                          "deprecated": true,
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "arguments": {
                                                  "description": "Tool arguments",
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "description": "Tool name",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "arguments",
                                                "name"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "refusal": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "tool"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "image_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "image_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              },
                                                              "detail": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "auto",
                                                                  "low",
                                                                  "high"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "image_url"
                                                    ],
                                                    "description": ""
                                                  }
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "tool_call_id": {
                                      "allOf": [
                                        {
                                          "type": "string"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content",
                                    "tool_call_id"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "function"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "name": {
                                      "allOf": [
                                        {
                                          "type": "string"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content",
                                    "name"
                                  ],
                                  "description": ""
                                }
                              ],
                              "type": "object"
                            }
                          },
                          "stream": {
                            "description": "Whether to stream the response via SSE",
                            "default": false,
                            "type": "boolean"
                          },
                          "variables": {
                            "description": "Global workflow variables or plugin inputs",
                            "default": {},
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "responseChatItemId": {
                            "description": "Custom ID for the assistant response message; auto-generated if omitted",
                            "type": "string"
                          },
                          "detail": {
                            "description": "Whether to include detailed execution metadata such as `responseData`, `reasoning_content`, `tool_calls`, and `newVariables`",
                            "default": false,
                            "type": "boolean"
                          },
                          "retainDatasetCite": {
                            "description": "Whether to retain dataset citations",
                            "default": false,
                            "type": "boolean"
                          },
                          "showSkillReferences": {
                            "description": "Whether to include skill references",
                            "default": false,
                            "type": "boolean"
                          }
                        },
                        "required": []
                      },
                      {
                        "title": "Custom End-User (`customUid`)",
                        "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "End-user ID supplied by your backend during API Key calls (FastGPT >= 4.18.0, max 1024 chars); does not alter member permissions and is mutually exclusive with `authProxy`. New chats treat empty string as default user; existing chats bound to a `customUid` reject missing, empty, or mismatched values. Share-link calls use `outLinkAuthData.outLinkUid` instead.",
                                "type": "string",
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "description": "Chat session ID; automatically generated if omitted or empty",
                            "type": "string",
                            "maxLength": 1024
                          },
                          "metadata": {
                            "description": "Metadata",
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "messages": {
                            "description": "Messages list",
                            "default": [],
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "system"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "text"
                                                  },
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "developer"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "text"
                                                  },
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "user"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "select"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "select": {
                                                        "allOf": [
                                                          {
                                                            "oneOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "Q&A input type",
                                                                        "type": "string",
                                                                        "const": "agentAsk"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "first"
                                                                    }
                                                                  },
                                                                  "questions": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "User answers ordered by question",
                                                                        "minItems": 1,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "question": {
                                                                              "description": "Question snapshot at prompt time",
                                                                              "type": "string"
                                                                            },
                                                                            "value": {
                                                                              "description": "User answer text (selected option or custom text); empty string means skipped",
                                                                              "type": "string"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "question",
                                                                            "value"
                                                                          ]
                                                                        }
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "last"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "questions"
                                                                ],
                                                                "description": ""
                                                              },
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Confirm plan and start building",
                                                                            "type": "string",
                                                                            "const": "confirm"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Cancel this build",
                                                                            "type": "string",
                                                                            "const": "cancel"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Modify plan",
                                                                            "type": "string",
                                                                            "const": "revise"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "reviseText": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "Specific revision feedback for the plan; cannot be empty",
                                                                            "type": "string",
                                                                            "minLength": 1
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action",
                                                                      "reviseText"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "type": "object"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "select"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "image_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "image_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              },
                                                              "detail": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "auto",
                                                                  "low",
                                                                  "high"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "image_url"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "input_audio"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "input_audio": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "data": {
                                                                "type": "string"
                                                              },
                                                              "format": {
                                                                "description": "Known audio format; omit if unknown so the model endpoint infers it",
                                                                "type": "string",
                                                                "enum": [
                                                                  "mp3",
                                                                  "wav",
                                                                  "ogg",
                                                                  "m4a",
                                                                  "amr",
                                                                  "mpga"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "data"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "input_audio"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "video_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "video_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "video_url"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "file"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "file": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "file_data": {
                                                                "type": "string"
                                                              },
                                                              "file_id": {
                                                                "type": "string"
                                                              },
                                                              "filename": {
                                                                "type": "string"
                                                              }
                                                            }
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "file"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "file_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "name": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "url": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "fileType": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "audio",
                                                              "video",
                                                              "document",
                                                              "unknown",
                                                              "file"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "url"
                                                    ],
                                                    "description": ""
                                                  }
                                                ],
                                                "type": "object"
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "assistant"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "description": "Assistant message content",
                                          "example": "Hello, how are you?",
                                          "anyOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "key": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "refusal"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "refusal": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "refusal"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "tool_calls": {
                                      "allOf": [
                                        {
                                          "description": "Tool Call",
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "id": {
                                                "type": "string"
                                              },
                                              "type": {
                                                "type": "string",
                                                "const": "function"
                                              },
                                              "function": {
                                                "type": "object",
                                                "properties": {
                                                  "arguments": {
                                                    "description": "Tool arguments",
                                                    "type": "string"
                                                  },
                                                  "name": {
                                                    "description": "Tool name",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "arguments",
                                                  "name"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "id",
                                              "type",
                                              "function"
                                            ]
                                          }
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "interactive": {
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": true,
                                          "description": "Interactive response (FastGPT extension)"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "audio": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "id"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "function_call": {
                                      "allOf": [
                                        {
                                          "description": "Function call",
                                          "deprecated": true,
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "arguments": {
                                                  "description": "Tool arguments",
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "description": "Tool name",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "arguments",
                                                "name"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "refusal": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "tool"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "image_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "image_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              },
                                                              "detail": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "auto",
                                                                  "low",
                                                                  "high"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "image_url"
                                                    ],
                                                    "description": ""
                                                  }
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "tool_call_id": {
                                      "allOf": [
                                        {
                                          "type": "string"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content",
                                    "tool_call_id"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "function"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "name": {
                                      "allOf": [
                                        {
                                          "type": "string"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content",
                                    "name"
                                  ],
                                  "description": ""
                                }
                              ],
                              "type": "object"
                            }
                          },
                          "stream": {
                            "description": "Whether to stream the response via SSE",
                            "default": false,
                            "type": "boolean"
                          },
                          "variables": {
                            "description": "Global workflow variables or plugin inputs",
                            "default": {},
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "responseChatItemId": {
                            "description": "Custom ID for the assistant response message; auto-generated if omitted",
                            "type": "string"
                          },
                          "detail": {
                            "description": "Whether to include detailed execution metadata such as `responseData`, `reasoning_content`, `tool_calls`, and `newVariables`",
                            "default": false,
                            "type": "boolean"
                          },
                          "retainDatasetCite": {
                            "description": "Whether to retain dataset citations",
                            "default": false,
                            "type": "boolean"
                          },
                          "showSkillReferences": {
                            "description": "Whether to include skill references",
                            "default": false,
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "customUid"
                        ]
                      }
                    ]
                  },
                  {
                    "title": "Share-Link Chat",
                    "description": "Resolves the app via `outLinkAuthData`, scoping the end user by `outLinkUid`. Takes precedence over `appId` and header auth without fallback on failure; protected share links still require login token/cookie and do not support `authProxy`.",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "Share-link auth payload containing `shareId` and `outLinkUid`. Overrides `appId`; protected links still verify login session cookies/tokens.",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "Share link ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "External share user ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "Chat session ID; automatically generated if omitted or empty",
                        "type": "string",
                        "maxLength": 1024
                      },
                      "metadata": {
                        "description": "Metadata",
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "messages": {
                        "description": "Messages list",
                        "default": [],
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "system"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "const": "text"
                                              },
                                              "text": {
                                                "type": "string"
                                              },
                                              "key": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "text"
                                            ]
                                          }
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "developer"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "const": "text"
                                              },
                                              "text": {
                                                "type": "string"
                                              },
                                              "key": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "text"
                                            ]
                                          }
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "user"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "select"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "select": {
                                                    "allOf": [
                                                      {
                                                        "oneOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "description": "Q&A input type",
                                                                    "type": "string",
                                                                    "const": "agentAsk"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "questions": {
                                                                "allOf": [
                                                                  {
                                                                    "description": "User answers ordered by question",
                                                                    "minItems": 1,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "question": {
                                                                          "description": "Question snapshot at prompt time",
                                                                          "type": "string"
                                                                        },
                                                                        "value": {
                                                                          "description": "User answer text (selected option or custom text); empty string means skipped",
                                                                          "type": "string"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "question",
                                                                        "value"
                                                                      ]
                                                                    }
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "questions"
                                                            ],
                                                            "description": ""
                                                          },
                                                          {
                                                            "oneOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "const": "workflowBuilderPreview"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  },
                                                                  "action": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "Confirm plan and start building",
                                                                        "type": "string",
                                                                        "const": "confirm"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "action"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": ""
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "const": "workflowBuilderPreview"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  },
                                                                  "action": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "Cancel this build",
                                                                        "type": "string",
                                                                        "const": "cancel"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "action"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": ""
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "const": "workflowBuilderPreview"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  },
                                                                  "action": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "Modify plan",
                                                                        "type": "string",
                                                                        "const": "revise"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "first"
                                                                    }
                                                                  },
                                                                  "reviseText": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "Specific revision feedback for the plan; cannot be empty",
                                                                        "type": "string",
                                                                        "minLength": 1
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "last"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "action",
                                                                  "reviseText"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": ""
                                                              }
                                                            ],
                                                            "type": "object"
                                                          }
                                                        ],
                                                        "type": "object"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "select"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "text"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "text": {
                                                    "allOf": [
                                                      {
                                                        "type": "string"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "image_url"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "image_url": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "url": {
                                                            "type": "string"
                                                          },
                                                          "detail": {
                                                            "type": "string",
                                                            "enum": [
                                                              "auto",
                                                              "low",
                                                              "high"
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "url"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "image_url"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "input_audio"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "input_audio": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "data": {
                                                            "type": "string"
                                                          },
                                                          "format": {
                                                            "description": "Known audio format; omit if unknown so the model endpoint infers it",
                                                            "type": "string",
                                                            "enum": [
                                                              "mp3",
                                                              "wav",
                                                              "ogg",
                                                              "m4a",
                                                              "amr",
                                                              "mpga"
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "data"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "input_audio"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "video_url"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "video_url": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "url": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "url"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "video_url"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "file"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "file": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "file_data": {
                                                            "type": "string"
                                                          },
                                                          "file_id": {
                                                            "type": "string"
                                                          },
                                                          "filename": {
                                                            "type": "string"
                                                          }
                                                        }
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "file"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "file_url"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "name": {
                                                    "allOf": [
                                                      {
                                                        "type": "string"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "middle"
                                                    }
                                                  },
                                                  "url": {
                                                    "allOf": [
                                                      {
                                                        "type": "string"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "middle"
                                                    }
                                                  },
                                                  "fileType": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "audio",
                                                          "video",
                                                          "document",
                                                          "unknown",
                                                          "file"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "url"
                                                ],
                                                "description": ""
                                              }
                                            ],
                                            "type": "object"
                                          }
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "assistant"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "description": "Assistant message content",
                                      "example": "Hello, how are you?",
                                      "anyOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "key": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "refusal"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "refusal": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "refusal"
                                                    ],
                                                    "description": ""
                                                  }
                                                ],
                                                "type": "object"
                                              }
                                            }
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "tool_calls": {
                                  "allOf": [
                                    {
                                      "description": "Tool Call",
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "type": {
                                            "type": "string",
                                            "const": "function"
                                          },
                                          "function": {
                                            "type": "object",
                                            "properties": {
                                              "arguments": {
                                                "description": "Tool arguments",
                                                "type": "string"
                                              },
                                              "name": {
                                                "description": "Tool name",
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "arguments",
                                              "name"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "type",
                                          "function"
                                        ]
                                      }
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "interactive": {
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": true,
                                      "description": "Interactive response (FastGPT extension)"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "audio": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "function_call": {
                                  "allOf": [
                                    {
                                      "description": "Function call",
                                      "deprecated": true,
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "arguments": {
                                              "description": "Tool arguments",
                                              "type": "string"
                                            },
                                            "name": {
                                              "description": "Tool name",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "arguments",
                                            "name"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "refusal": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "tool"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "text"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "text": {
                                                    "allOf": [
                                                      {
                                                        "type": "string"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "image_url"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "image_url": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "url": {
                                                            "type": "string"
                                                          },
                                                          "detail": {
                                                            "type": "string",
                                                            "enum": [
                                                              "auto",
                                                              "low",
                                                              "high"
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "url"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "image_url"
                                                ],
                                                "description": ""
                                              }
                                            ]
                                          }
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "tool_call_id": {
                                  "allOf": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content",
                                "tool_call_id"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "function"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "name": {
                                  "allOf": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content",
                                "name"
                              ],
                              "description": ""
                            }
                          ],
                          "type": "object"
                        }
                      },
                      "stream": {
                        "description": "Whether to stream the response via SSE",
                        "default": false,
                        "type": "boolean"
                      },
                      "variables": {
                        "description": "Global workflow variables or plugin inputs",
                        "default": {},
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "responseChatItemId": {
                        "description": "Custom ID for the assistant response message; auto-generated if omitted",
                        "type": "string"
                      },
                      "detail": {
                        "description": "Whether to include detailed execution metadata such as `responseData`, `reasoning_content`, `tool_calls`, and `newVariables`",
                        "default": false,
                        "type": "boolean"
                      },
                      "retainDatasetCite": {
                        "description": "Whether to retain dataset citations",
                        "default": false,
                        "type": "boolean"
                      },
                      "showSkillReferences": {
                        "description": "Whether to include skill references",
                        "default": false,
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "outLinkAuthData"
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "Conversation ID (`chatId`)",
                      "type": "string"
                    },
                    "title": {
                      "description": "Auto-generated title returned when naming an untitled conversation",
                      "type": "string"
                    },
                    "model": {
                      "description": "Model name (always empty string in v1)",
                      "type": "string",
                      "const": ""
                    },
                    "usage": {
                      "description": "Token usage summary (placeholder in v1; compute actual tokens from `responseData` when `detail=true`)",
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "description": "Fixed placeholder `1`; compute per-node token usage from `responseData` when `detail=true`",
                          "type": "number",
                          "const": 1
                        },
                        "completion_tokens": {
                          "description": "Fixed placeholder `1`; compute per-node token usage from `responseData` when `detail=true`",
                          "type": "number",
                          "const": 1
                        },
                        "total_tokens": {
                          "description": "Fixed placeholder `1`; compute per-node token usage from `responseData` when `detail=true`",
                          "type": "number",
                          "const": 1
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "completion_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    },
                    "choices": {
                      "description": "Completion choices list",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "message": {
                            "description": "Assistant message",
                            "type": "object",
                            "properties": {
                              "role": {
                                "description": "Message role",
                                "type": "string",
                                "const": "assistant"
                              },
                              "content": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": true
                                    }
                                  }
                                ],
                                "description": "Message content. Plain string for standard replies, or an array of typed blocks (`text`, `interactive`, `tool`, `file`, `reasoning`) when `detail=true` or an interactive node pauses execution. v1 adds an explicit `type` field on each block while v2 omits it; interactive items strip internal runtime fields."
                              },
                              "reasoning_content": {
                                "description": "Reasoning trace content (for reasoning models only)",
                                "type": "string"
                              }
                            },
                            "required": [
                              "role",
                              "content"
                            ],
                            "additionalProperties": false
                          },
                          "finish_reason": {
                            "description": "Completion finish reason, e.g. `stop`",
                            "type": "string"
                          },
                          "index": {
                            "description": "Choice index",
                            "type": "number"
                          }
                        },
                        "required": [
                          "message",
                          "finish_reason",
                          "index"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "responseData": {
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      },
                      "description": "Per-node workflow execution details (returned only when `detail=true`), including `moduleName`, `moduleType`, `runningTime`, `quoteList`, etc.",
                      "type": "array"
                    },
                    "newVariables": {
                      "description": "Workflow variables updated during execution (returned only when `detail=true`)",
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    }
                  },
                  "required": [
                    "id",
                    "model",
                    "usage",
                    "choices"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "detailFalseStreamFalse": {
                    "summary": "Compact JSON",
                    "description": "`detail=false, stream=false`; returns only core reply fields.",
                    "value": {
                      "id": "adsfasf",
                      "title": "Suzume Director",
                      "model": "",
                      "usage": {
                        "prompt_tokens": 1,
                        "completion_tokens": 1,
                        "total_tokens": 1
                      },
                      "choices": [
                        {
                          "message": {
                            "role": "assistant",
                            "content": "Makoto Shinkai directed the film Suzume."
                          },
                          "finish_reason": "stop",
                          "index": 0
                        }
                      ]
                    }
                  },
                  "detailTrueStreamFalse": {
                    "summary": "Detailed JSON",
                    "description": "`detail=true, stream=false`; includes `responseData` and `newVariables`.",
                    "value": {
                      "responseData": [
                        {
                          "moduleName": "Dataset Search",
                          "price": 1.2000000000000002,
                          "model": "Embedding-2",
                          "tokens": 6,
                          "similarity": 0.61,
                          "limit": 3
                        },
                        {
                          "moduleName": "AI Chat",
                          "price": 454.5,
                          "model": "FastAI-4k",
                          "tokens": 303,
                          "question": "Who is the director?",
                          "answer": "Makoto Shinkai directed the film Suzume.",
                          "maxToken": 2050,
                          "quoteList": [
                            {
                              "dataset_id": "646627f4f7b896cfd8910e38",
                              "id": "8099",
                              "q": "Who is the protagonist of this film?",
                              "a": "The protagonist is a young girl named Suzume.",
                              "source": "Manual Edit"
                            },
                            {
                              "dataset_id": "646627f4f7b896cfd8910e38",
                              "id": "19339",
                              "q": "Who directed the film Suzume?",
                              "a": "Makoto Shinkai directed the film Suzume.",
                              "source": "Manual Edit"
                            }
                          ],
                          "completeMessages": [
                            {
                              "obj": "System",
                              "value": "Knowledge base context:\n1. [Who is the protagonist of this film?\nThe protagonist is a young girl named Suzume.]\n2. [Who directed the film Suzume?\nMakoto Shinkai directed the film Suzume.]\n"
                            },
                            {
                              "obj": "Human",
                              "value": "Who is the director?"
                            },
                            {
                              "obj": "AI",
                              "value": "Makoto Shinkai directed the film Suzume."
                            }
                          ]
                        }
                      ],
                      "newVariables": {
                        "uid": "asdfadsfasfd2323",
                        "name": "Alice"
                      },
                      "id": "",
                      "title": "Suzume Director",
                      "model": "",
                      "usage": {
                        "prompt_tokens": 1,
                        "completion_tokens": 1,
                        "total_tokens": 1
                      },
                      "choices": [
                        {
                          "message": {
                            "role": "assistant",
                            "content": "Makoto Shinkai directed the film Suzume."
                          },
                          "finish_reason": "stop",
                          "index": 0
                        }
                      ]
                    }
                  },
                  "interactiveUserSelect": {
                    "summary": "User Selection",
                    "description": "`detail=true`; read the `interactive` display configuration from `choices[].message.content`.",
                    "value": {
                      "id": "chatId",
                      "model": "",
                      "usage": {
                        "prompt_tokens": 1,
                        "completion_tokens": 1,
                        "total_tokens": 1
                      },
                      "choices": [
                        {
                          "message": {
                            "role": "assistant",
                            "content": [
                              {
                                "type": "interactive",
                                "interactive": {
                                  "type": "userSelect",
                                  "params": {
                                    "description": "Test prompt",
                                    "userSelectOptions": [
                                      {
                                        "value": "Confirm",
                                        "key": "option1"
                                      },
                                      {
                                        "value": "Cancel",
                                        "key": "option2"
                                      }
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "finish_reason": "stop",
                          "index": 0
                        }
                      ]
                    }
                  },
                  "interactiveUserInput": {
                    "summary": "Form Input",
                    "description": "`detail=true`; submit serialized JSON keyed by form field names while keeping the same `chatId`.",
                    "value": {
                      "id": "chatId",
                      "model": "",
                      "usage": {
                        "prompt_tokens": 1,
                        "completion_tokens": 1,
                        "total_tokens": 1
                      },
                      "choices": [
                        {
                          "message": {
                            "role": "assistant",
                            "content": [
                              {
                                "type": "interactive",
                                "interactive": {
                                  "type": "userInput",
                                  "params": {
                                    "description": "Test prompt",
                                    "inputForm": [
                                      {
                                        "type": "input",
                                        "key": "Test 1",
                                        "label": "Test 1",
                                        "description": "",
                                        "value": "",
                                        "defaultValue": "",
                                        "valueType": "string",
                                        "required": false,
                                        "list": [
                                          {
                                            "label": "",
                                            "value": ""
                                          }
                                        ]
                                      },
                                      {
                                        "type": "numberInput",
                                        "key": "Test 2",
                                        "label": "Test 2",
                                        "description": "",
                                        "value": "",
                                        "defaultValue": "",
                                        "valueType": "number",
                                        "required": false,
                                        "list": [
                                          {
                                            "label": "",
                                            "value": ""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "finish_reason": "stop",
                          "index": 0
                        }
                      ]
                    }
                  }
                }
              },
              "text/event-stream": {
                "schema": {
                  "example": "event: answer\ndata: {\"choices\":[...]}\n\n",
                  "description": "Workflow SSE event stream; when `detail=true`, v1 emits aggregated node responses via `flowResponses` before `[DONE]`.",
                  "type": "string"
                },
                "examples": {
                  "detailFalseStreamTrue": {
                    "summary": "Compact SSE",
                    "description": "`detail=false, stream=true`; standard replies emit only `data:` frames followed by `[DONE]`.",
                    "value": "data: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"index\":0,\"finish_reason\":null}]}\n\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"Makoto Shinkai \"},\"index\":0,\"finish_reason\":null}]}\n\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"directed the film Suzume.\"},\"index\":0,\"finish_reason\":null}]}\n\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":null},\"index\":0,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
                  },
                  "detailTrueStreamTrue": {
                    "summary": "Full Execution Stream",
                    "description": "`detail=true, stream=true`; node details are summarized in `flowResponses`. Frame ordering is illustrative and `chatTitle` may arrive earlier.",
                    "value": "event: flowNodeStatus\ndata: {\"status\":\"running\",\"name\":\"Dataset Search\"}\n\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"Makoto Shinkai \"},\"index\":0,\"finish_reason\":null}]}\n\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"directed the film Suzume.\"},\"index\":0,\"finish_reason\":null}]}\n\nevent: updateVariables\ndata: {\"lastQuestion\":\"Who is the director?\",\"searchCount\":1,\"found\":true,\"movieNames\":[\"Suzume\"],\"director\":{\"name\":\"Makoto Shinkai\"},\"nextPage\":null}\n\nevent: workflowDuration\ndata: {\"durationSeconds\":2.41}\n\nevent: chatTitle\ndata: {\"title\":\"Suzume Director\"}\n\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":null},\"index\":0,\"finish_reason\":\"stop\"}]}\n\nevent: flowResponses\ndata: [{\"id\":\"response-ai-1\",\"nodeId\":\"ai-1\",\"moduleType\":\"chatNode\",\"moduleName\":\"AI Chat\",\"runningTime\":1.86,\"textOutput\":\"Makoto Shinkai directed the film Suzume.\"}]\n\nevent: answer\ndata: [DONE]\n\n"
                  },
                  "interactiveUserSelect": {
                    "summary": "User Selection",
                    "description": "`detail=true`; display options upon receiving `interactive`, then submit the chosen value to resume.",
                    "value": "event: interactive\ndata: {\"interactive\":{\"type\":\"userSelect\",\"params\":{\"description\":\"Test prompt\",\"userSelectOptions\":[{\"value\":\"Confirm\",\"key\":\"option1\"},{\"value\":\"Cancel\",\"key\":\"option2\"}]}}}\n\nevent: answer\ndata: [DONE]\n\n"
                  },
                  "interactiveUserInput": {
                    "summary": "Form Input",
                    "description": "`detail=true`; render the form upon receiving `interactive`, then submit a serialized JSON string to resume.",
                    "value": "event: interactive\ndata: {\"interactive\":{\"type\":\"userInput\",\"params\":{\"description\":\"Test prompt\",\"inputForm\":[{\"type\":\"input\",\"key\":\"Test 1\",\"label\":\"Test 1\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"string\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]},{\"type\":\"numberInput\",\"key\":\"Test 2\",\"label\":\"Test 2\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"number\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]}]}}}\n\nevent: answer\ndata: [DONE]\n\n"
                  },
                  "event_answer": {
                    "summary": "answer · Answer Delta",
                    "description": "Includes empty heartbeat deltas, answer text, `reasoning_content` deltas, `stop` finish chunks, and `[DONE]` markers.",
                    "value": ": 1. Empty heartbeat\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"index\":0,\"finish_reason\":null}]}\n\n: 2. Answer text\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"Makoto Shinkai directed the film Suzume.\"},\"index\":0,\"finish_reason\":null}]}\n\n: 3. Reasoning delta\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"reasoning_content\":\"Verify the director of Suzume first.\"},\"index\":0,\"finish_reason\":null}]}\n\n: 4. Stop finish chunk\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":null},\"index\":0,\"finish_reason\":\"stop\"}]}\n\n: 5. End of stream\nevent: answer\ndata: [DONE]\n\n"
                  },
                  "event_fastAnswer": {
                    "summary": "fastAnswer · Specified Reply",
                    "description": "Emitted for immediate outputs such as Specified Reply nodes; includes text deltas and a stop chunk.",
                    "value": ": 1. Specified reply text\nevent: fastAnswer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"Looking up relevant resources.\"},\"index\":0,\"finish_reason\":null}]}\n\n: 2. Specified reply stop chunk\nevent: fastAnswer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":null},\"index\":0,\"finish_reason\":\"stop\"}]}\n\n"
                  },
                  "event_flowNodeStatus": {
                    "summary": "flowNodeStatus · Node Status",
                    "description": "Emitted when a workflow node starts running; governed by `showRunningStatus` on share links.",
                    "value": "event: flowNodeStatus\ndata: {\"status\":\"running\",\"name\":\"Dataset Search\"}\n\n"
                  },
                  "event_flowResponses": {
                    "summary": "flowResponses · Node Responses Summary",
                    "description": "Emitted by v1 at the end of the turn before `[DONE]` as an array of node responses.",
                    "value": "event: flowResponses\ndata: [{\"id\":\"response-ai-1\",\"nodeId\":\"ai-1\",\"moduleType\":\"chatNode\",\"moduleName\":\"AI Chat\",\"runningTime\":1.86,\"textOutput\":\"Makoto Shinkai directed the film Suzume.\"}]\n\n"
                  },
                  "event_toolCall": {
                    "summary": "toolCall · Tool Call",
                    "description": "Initializes a tool call card; shows both standard calls and `hideDetails` calls with hidden parameters.",
                    "value": ": 1. Standard tool call\nevent: toolCall\ndata: {\"tool\":{\"id\":\"call-search-1\",\"toolName\":\"Dataset Search\",\"toolAvatar\":\"/imgs/workflow/db.png\",\"functionName\":\"dataset_search\",\"params\":\"{\\\"query\\\":\\\"Suzume director\\\"}\"},\"responseValueId\":\"call-search-1\"}\n\n: 2. Tool call hiding params and response details\nevent: toolCall\ndata: {\"tool\":{\"id\":\"call-search-1\",\"toolName\":\"Dataset Search\",\"toolAvatar\":\"/imgs/workflow/db.png\",\"functionName\":\"dataset_search\",\"params\":\"\",\"hideDetails\":true},\"responseValueId\":\"call-search-1\"}\n\n"
                  },
                  "event_toolParams": {
                    "summary": "toolParams · Tool Params Delta",
                    "description": "Appends or merges tool arguments keyed by `tool.id`; does not indicate execution completion.",
                    "value": "event: toolParams\ndata: {\"tool\":{\"id\":\"call-search-1\",\"params\":\"{\\\"query\\\":\\\"Suzume director\\\"}\"},\"responseValueId\":\"call-search-1\"}\n\n"
                  },
                  "event_toolResponse": {
                    "summary": "toolResponse · Tool Response",
                    "description": "Delivers the tool execution result keyed by `tool.id`; `response` can be a string or `null`.",
                    "value": ": 1. String response\nevent: toolResponse\ndata: {\"tool\":{\"id\":\"call-search-1\",\"response\":\"Director: Makoto Shinkai\"},\"responseValueId\":\"call-search-1\"}\n\n: 2. Empty response\nevent: toolResponse\ndata: {\"tool\":{\"id\":\"call-search-1\",\"response\":null},\"responseValueId\":\"call-search-1\"}\n\n"
                  },
                  "event_updateVariables": {
                    "summary": "updateVariables · Variable Updates",
                    "description": "Updates workflow variables for the current turn; values may be strings, numbers, booleans, arrays, objects, or `null`.",
                    "value": "event: updateVariables\ndata: {\"lastQuestion\":\"Who is the director?\",\"searchCount\":1,\"found\":true,\"movieNames\":[\"Suzume\"],\"director\":{\"name\":\"Makoto Shinkai\"},\"nextPage\":null}\n\n"
                  },
                  "event_workflowDuration": {
                    "summary": "workflowDuration · Workflow Duration",
                    "description": "Total elapsed execution time for the turn, with `durationSeconds` measured in seconds.",
                    "value": "event: workflowDuration\ndata: {\"durationSeconds\":2.41}\n\n"
                  },
                  "event_chatTitle": {
                    "summary": "chatTitle · Chat Title",
                    "description": "Emitted only when `detail=true` and an untitled conversation receives an auto-generated title; never overwrites manual titles.",
                    "value": "event: chatTitle\ndata: {\"title\":\"Suzume Director\"}\n\n"
                  },
                  "event_interactive": {
                    "summary": "interactive · Interactive Prompt",
                    "description": "Demonstrates user selection, form input, agent follow-up questions, billing pause, and sub-workflow wrappers (read inner prompts from `params.childrenResponse`). Internal runtime fields are omitted, and variants are mutually exclusive.",
                    "value": ": 1. User selection: userSelect\nevent: interactive\ndata: {\"interactive\":{\"type\":\"userSelect\",\"params\":{\"description\":\"Test prompt\",\"userSelectOptions\":[{\"value\":\"Confirm\",\"key\":\"option1\"},{\"value\":\"Cancel\",\"key\":\"option2\"}]}}}\n\n: 2. Form input: userInput\nevent: interactive\ndata: {\"interactive\":{\"type\":\"userInput\",\"params\":{\"description\":\"Test prompt\",\"inputForm\":[{\"type\":\"input\",\"key\":\"Test 1\",\"label\":\"Test 1\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"string\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]},{\"type\":\"numberInput\",\"key\":\"Test 2\",\"label\":\"Test 2\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"number\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]}]}}}\n\n: 3. Agent follow-up: agentAsk\nevent: interactive\ndata: {\"interactive\":{\"type\":\"agentAsk\",\"params\":{\"toolCallId\":\"ask-1\",\"arguments\":\"{\\\"reason\\\":\\\"Confirm the search scope to continue.\\\",\\\"blockerType\\\":\\\"user_choice\\\",\\\"questions\\\":[{\\\"question\\\":\\\"Which scope should be queried?\\\",\\\"options\\\":[{\\\"summary\\\":\\\"Current film only\\\",\\\"value\\\":\\\"current_movie\\\"},{\\\"summary\\\":\\\"All works by this director\\\",\\\"value\\\":\\\"all_movies\\\"}]}]}\"}}}\n\n: 4. Payment pause: paymentPause\nevent: interactive\ndata: {\"interactive\":{\"type\":\"paymentPause\",\"params\":{\"description\":\"Insufficient credits. Please top up to continue.\"}}}\n\n: 5. Sub-workflow wrapper: childrenInteractive\nevent: interactive\ndata: {\"interactive\":{\"type\":\"childrenInteractive\",\"params\":{\"childrenResponse\":{\"type\":\"userSelect\",\"params\":{\"description\":\"Test prompt\",\"userSelectOptions\":[{\"value\":\"Confirm\",\"key\":\"option1\"},{\"value\":\"Cancel\",\"key\":\"option2\"}]}}}}}\n\n: 6. Tool sub-workflow wrapper: toolChildrenInteractive\nevent: interactive\ndata: {\"interactive\":{\"type\":\"toolChildrenInteractive\",\"params\":{\"childrenResponse\":{\"type\":\"userInput\",\"params\":{\"description\":\"Test prompt\",\"inputForm\":[{\"type\":\"input\",\"key\":\"Test 1\",\"label\":\"Test 1\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"string\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]},{\"type\":\"numberInput\",\"key\":\"Test 2\",\"label\":\"Test 2\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"number\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]}]}},\"toolCallId\":\"call-search-1\"}}}\n\n: 7. Loop sub-workflow wrapper: loopInteractive\nevent: interactive\ndata: {\"interactive\":{\"type\":\"loopInteractive\",\"params\":{\"childrenResponse\":{\"type\":\"userSelect\",\"params\":{\"description\":\"Test prompt\",\"userSelectOptions\":[{\"value\":\"Confirm\",\"key\":\"option1\"},{\"value\":\"Cancel\",\"key\":\"option2\"}]}},\"currentIndex\":0,\"loopResult\":[]}}}\n\n: 8. Loop run wrapper: loopRunInteractive\nevent: interactive\ndata: {\"interactive\":{\"type\":\"loopRunInteractive\",\"params\":{\"childrenResponse\":{\"type\":\"userInput\",\"params\":{\"description\":\"Test prompt\",\"inputForm\":[{\"type\":\"input\",\"key\":\"Test 1\",\"label\":\"Test 1\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"string\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]},{\"type\":\"numberInput\",\"key\":\"Test 2\",\"label\":\"Test 2\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"number\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]}]}},\"iteration\":1,\"loopHistory\":[]}}}\n\n"
                  },
                  "event_planStatus": {
                    "summary": "planStatus · Plan Generation Status",
                    "description": "Emitted only when planning is enabled; shows `generating` and `updating` statuses.",
                    "value": ": 1. Generating plan\nevent: planStatus\ndata: {\"planStatus\":{\"status\":\"generating\"}}\n\n: 2. Updating plan\nevent: planStatus\ndata: {\"planStatus\":{\"status\":\"updating\"}}\n\n"
                  },
                  "event_plan": {
                    "summary": "plan · Agent Plan",
                    "description": "Identifies the plan with `plan.planId` and each step with `steps[].id`; step statuses update during execution.",
                    "value": "event: plan\ndata: {\"plan\":{\"planId\":\"plan-1\",\"name\":\"Look up director info\",\"steps\":[{\"id\":\"step-1\",\"name\":\"Confirm film title\",\"status\":\"done\"},{\"id\":\"step-2\",\"name\":\"Search film references\",\"status\":\"in_progress\"},{\"id\":\"step-3\",\"name\":\"Compile director details\",\"status\":\"pending\"},{\"id\":\"step-4\",\"name\":\"Verify paid sources\",\"status\":\"blocked\",\"note\":\"Waiting for user authorization\"},{\"id\":\"step-5\",\"name\":\"Add unrelated works\",\"status\":\"skipped\",\"note\":\"Out of scope\"}]}}\n\n"
                  },
                  "event_skillCall": {
                    "summary": "skillCall · Skill Call",
                    "description": "Emitted when loading skill instructions, only when skill capabilities are enabled.",
                    "value": "event: skillCall\ndata: {\"skill\":{\"id\":\"skill-call-1\",\"skillName\":\"Reference Lookup\",\"skillAvatar\":\"/icon/logo.svg\",\"description\":\"Search related reference documents\",\"skillMdPath\":\"/skills/search/SKILL.md\"}}\n\n"
                  },
                  "event_sandboxStatus": {
                    "summary": "sandboxStatus · Sandbox Status",
                    "description": "Shows visible sandbox lifecycle phases (`ready` allows tool execution, `failed` may carry `message`, skill deployment phases may include `skillName`). Phases represent distinct states rather than a fixed sequence.",
                    "value": ": 1. Phase: checkExisting\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"checkExisting\"}\n\n: 2. Phase: connecting\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"connecting\",\"isWarmStart\":true}\n\n: 3. Phase: fetchSkills\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"fetchSkills\"}\n\n: 4. Phase: creatingContainer\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"creatingContainer\"}\n\n: 5. Phase: deployingSkills\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"deployingSkills\",\"skillName\":\"Reference Lookup\"}\n\n: 6. Phase: downloadingPackage\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"downloadingPackage\",\"skillName\":\"Reference Lookup\"}\n\n: 7. Phase: uploadingPackage\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"uploadingPackage\",\"skillName\":\"Reference Lookup\"}\n\n: 8. Phase: extractingPackage\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"extractingPackage\",\"skillName\":\"Reference Lookup\"}\n\n: 9. Phase: lazyInit\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"lazyInit\"}\n\n: 10. Phase: upgrading\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"upgrading\"}\n\n: 11. Phase: ready\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"ready\",\"isWarmStart\":true}\n\n: 12. Phase: failed\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"failed\",\"message\":\"Sandbox initialization failed. Please retry shortly.\"}\n\n"
                  },
                  "event_error": {
                    "summary": "error · Stream Error",
                    "description": "Error emitted after the SSE stream opens, including plain `message` errors or structured business errors with `code`, `statusText`, and `data`. Do not rely on HTTP 200 alone.",
                    "value": ": 1. Generic error\nevent: error\ndata: {\"message\":\"Model request failed. Please retry shortly.\"}\n\n: 2. Business error\nevent: error\ndata: {\"code\":510003,\"statusText\":\"runtimeUpgradeInProgress\",\"message\":\"Sandbox upgrade in progress. Please retry shortly.\",\"data\":null,\"httpStatus\":409}\n\n"
                  }
                }
              }
            }
          },
          "409": {
            "description": "Rejects the request when the conversation already has an active generation without persisting the rejected message. Non-streaming calls return HTTP 409; streaming calls emit the same payload on `event: error`. Use `data.responseChatItemId` to resume the active assistant message (or reuse the latest AI message when `data.reusePreviousAi=true`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "number",
                      "const": 504001
                    },
                    "statusText": {
                      "type": "string",
                      "const": "chatIsGenerating"
                    },
                    "message": {
                      "description": "Localized display error message; use `code` or `statusText` for programmatic handling. Defaults to English when no translation is available.",
                      "example": "common:code_error.chat_error.chat_generating",
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "responseChatItemId": {
                          "description": "Active assistant message ID currently generating on the server; clients should resume tracking this ID",
                          "example": "active-ai-response-id",
                          "type": "string",
                          "minLength": 1
                        },
                        "reusePreviousAi": {
                          "description": "Indicates an interactive resume reusing the latest assistant message; refresh records before resuming",
                          "example": true,
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/feedback/updateUserFeedback": {
      "post": {
        "summary": "Update User Chat Feedback",
        "description": "Add, update, or clear positive or negative user feedback on a chat message.",
        "tags": [
          "Chat Feedback"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "App Chat",
                    "description": "Identify the conversation via `appId`. When both API Key and login session are supported, `Authorization` takes precedence over token/Cookie.",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "Application ID authenticated with the request header credentials allowed by this endpoint.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "Session resource type associated with `appId`. Defaults to `app`; pass the matching `sourceType` for assistant builder sessions.",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "Default Identity",
                            "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "example": "chat123",
                                "description": "Chat ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "dataId": {
                                "example": "data123",
                                "description": "Message data ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "userGoodFeedback": {
                                "example": "Great answer",
                                "description": "Positive user feedback text",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "userBadFeedback": {
                                "example": "Inaccurate answer",
                                "description": "Negative user feedback text",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "chatId",
                              "dataId"
                            ]
                          },
                          {
                            "title": "Custom End-User (`customUid`)",
                            "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "example": "chat123",
                                "description": "Chat ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "dataId": {
                                "example": "data123",
                                "description": "Message data ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "userGoodFeedback": {
                                "example": "Great answer",
                                "description": "Positive user feedback text",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "userBadFeedback": {
                                "example": "Inaccurate answer",
                                "description": "Negative user feedback text",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "chatId",
                              "dataId",
                              "customUid"
                            ]
                          },
                          {
                            "title": "Proxy Team Member (`authProxy`)",
                            "description": "Act on behalf of another member in the same team via `authProxy`. Available only on personal API keys with `authProxy` enabled; mutually exclusive with `customUid`.",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key proxy caller identity. Available only for personal keys with `authProxy` enabled; specify `tmbId` or `username` (`tmbId` takes precedence without falling back to `username` on invalid ID).",
                                    "anyOf": [
                                      {
                                        "title": "By Team Member ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "Proxied team member ID (`tmbId`), takes precedence over `username`",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "By Username",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "Proxied team member username",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "example": "chat123",
                                "description": "Chat ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "dataId": {
                                "example": "data123",
                                "description": "Message data ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "userGoodFeedback": {
                                "example": "Great answer",
                                "description": "Positive user feedback text",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "userBadFeedback": {
                                "example": "Inaccurate answer",
                                "description": "Negative user feedback text",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "chatId",
                              "dataId",
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill Debug Session",
                    "description": "Identify the debug session via `skillId` (takes precedence over `appId` and ignores `sourceType`), authenticated with allowed request header credentials.",
                    "type": "object",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit debug ID authenticated with allowed request header credentials.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "example": "chat123",
                        "description": "Chat ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      },
                      "dataId": {
                        "example": "data123",
                        "description": "Message data ID",
                        "type": "string",
                        "minLength": 1
                      },
                      "userGoodFeedback": {
                        "example": "Great answer",
                        "description": "Positive user feedback text",
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "userBadFeedback": {
                        "example": "Inaccurate answer",
                        "description": "Negative user feedback text",
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "skillId",
                      "chatId",
                      "dataId"
                    ]
                  },
                  {
                    "title": "Share-Link Chat",
                    "description": "Resolves the underlying app via `outLinkAuthData`, taking precedence over `skillId` and `appId` (ignoring `sourceType`). Protected links still validate login cookies/tokens and never fall back to standard auth on failure.",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "Share-link auth payload (`shareId` / `outLinkUid`). Overrides `skillId` and `appId`; protected links still validate login session cookies/tokens.",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "Share link ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "External share user ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "example": "chat123",
                        "description": "Chat ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      },
                      "dataId": {
                        "example": "data123",
                        "description": "Message data ID",
                        "type": "string",
                        "minLength": 1
                      },
                      "userGoodFeedback": {
                        "example": "Great answer",
                        "description": "Positive user feedback text",
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "userBadFeedback": {
                        "example": "Inaccurate answer",
                        "description": "Negative user feedback text",
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "outLinkAuthData",
                      "chatId",
                      "dataId"
                    ]
                  },
                  {
                    "title": "App API Key (no appId required)",
                    "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                    "anyOf": [
                      {
                        "title": "Default Identity",
                        "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                        "type": "object",
                        "properties": {
                          "chatId": {
                            "example": "chat123",
                            "description": "Chat ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          },
                          "dataId": {
                            "example": "data123",
                            "description": "Message data ID",
                            "type": "string",
                            "minLength": 1
                          },
                          "userGoodFeedback": {
                            "example": "Great answer",
                            "description": "Positive user feedback text",
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "userBadFeedback": {
                            "example": "Inaccurate answer",
                            "description": "Negative user feedback text",
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "chatId",
                          "dataId"
                        ]
                      },
                      {
                        "title": "Custom End-User (`customUid`)",
                        "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "example": "chat123",
                            "description": "Chat ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          },
                          "dataId": {
                            "example": "data123",
                            "description": "Message data ID",
                            "type": "string",
                            "minLength": 1
                          },
                          "userGoodFeedback": {
                            "example": "Great answer",
                            "description": "Positive user feedback text",
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "userBadFeedback": {
                            "example": "Inaccurate answer",
                            "description": "Negative user feedback text",
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "chatId",
                          "dataId",
                          "customUid"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatId": "chat123",
                "dataId": "data123"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully updated user feedback",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Updated successfully",
                      "not": {}
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/history/getHistories": {
      "post": {
        "summary": "List Chat Histories",
        "description": "Retrieve paginated chat conversation histories.",
        "tags": [
          "Chat History"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "App Chat",
                    "description": "Identify the conversation via `appId`. When both API Key and login session are supported, `Authorization` takes precedence over token/Cookie.",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "Application ID authenticated with the request header credentials allowed by this endpoint.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "Session resource type associated with `appId`. Defaults to `app`; pass the matching `sourceType` for assistant builder sessions.",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "middle"
                        }
                      },
                      "source": {
                        "allOf": [
                          {
                            "description": "Chat source filter; App API Key requests automatically query the `api` source and ignore this field",
                            "type": "string",
                            "enum": [
                              "test",
                              "online",
                              "share",
                              "api",
                              "cronJob",
                              "feishu",
                              "official_account",
                              "wecom",
                              "wechat",
                              "mcp",
                              "dingtalk",
                              "unknown"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "Default Identity",
                            "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                            "anyOf": [
                              {
                                "title": "Offset Pagination",
                                "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                                "type": "object",
                                "properties": {
                                  "offset": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "first"
                                    },
                                    "example": 0,
                                    "description": "0-based offset",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "example": 20,
                                        "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "last"
                                    }
                                  },
                                  "startCreateTime": {
                                    "description": "Creation time range start",
                                    "type": "string"
                                  },
                                  "endCreateTime": {
                                    "description": "Creation time range end",
                                    "type": "string"
                                  },
                                  "startUpdateTime": {
                                    "description": "Update time range start",
                                    "type": "string"
                                  },
                                  "endUpdateTime": {
                                    "description": "Update time range end",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "offset"
                                ]
                              },
                              {
                                "title": "Page-Number Pagination",
                                "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                                "type": "object",
                                "properties": {
                                  "pageNum": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "first"
                                    },
                                    "example": 1,
                                    "description": "1-based page number; ignored when `offset` is provided",
                                    "default": 1,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "example": 20,
                                        "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "last"
                                    }
                                  },
                                  "startCreateTime": {
                                    "description": "Creation time range start",
                                    "type": "string"
                                  },
                                  "endCreateTime": {
                                    "description": "Creation time range end",
                                    "type": "string"
                                  },
                                  "startUpdateTime": {
                                    "description": "Update time range start",
                                    "type": "string"
                                  },
                                  "endUpdateTime": {
                                    "description": "Update time range end",
                                    "type": "string"
                                  }
                                },
                                "required": []
                              }
                            ]
                          },
                          {
                            "title": "Custom End-User (`customUid`)",
                            "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              }
                            },
                            "required": [
                              "customUid"
                            ],
                            "allOf": [
                              {
                                "anyOf": [
                                  {
                                    "title": "Offset Pagination",
                                    "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                                    "type": "object",
                                    "properties": {
                                      "offset": {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "x-fastgpt-union-parameter": {
                                          "label": "Pagination Parameters",
                                          "position": "first"
                                        },
                                        "example": 0,
                                        "description": "0-based offset",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "pageSize": {
                                        "allOf": [
                                          {
                                            "x-fastgpt-union-group": {
                                              "id": "pagination",
                                              "label": "Pagination Parameters"
                                            },
                                            "example": 20,
                                            "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                            "default": 20,
                                            "type": "integer",
                                            "exclusiveMinimum": 0,
                                            "maximum": 500
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "Pagination Parameters",
                                          "position": "last"
                                        }
                                      },
                                      "startCreateTime": {
                                        "description": "Creation time range start",
                                        "type": "string"
                                      },
                                      "endCreateTime": {
                                        "description": "Creation time range end",
                                        "type": "string"
                                      },
                                      "startUpdateTime": {
                                        "description": "Update time range start",
                                        "type": "string"
                                      },
                                      "endUpdateTime": {
                                        "description": "Update time range end",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "offset"
                                    ]
                                  },
                                  {
                                    "title": "Page-Number Pagination",
                                    "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                                    "type": "object",
                                    "properties": {
                                      "pageNum": {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "x-fastgpt-union-parameter": {
                                          "label": "Pagination Parameters",
                                          "position": "first"
                                        },
                                        "example": 1,
                                        "description": "1-based page number; ignored when `offset` is provided",
                                        "default": 1,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "pageSize": {
                                        "allOf": [
                                          {
                                            "x-fastgpt-union-group": {
                                              "id": "pagination",
                                              "label": "Pagination Parameters"
                                            },
                                            "example": 20,
                                            "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                            "default": 20,
                                            "type": "integer",
                                            "exclusiveMinimum": 0,
                                            "maximum": 500
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "Pagination Parameters",
                                          "position": "last"
                                        }
                                      },
                                      "startCreateTime": {
                                        "description": "Creation time range start",
                                        "type": "string"
                                      },
                                      "endCreateTime": {
                                        "description": "Creation time range end",
                                        "type": "string"
                                      },
                                      "startUpdateTime": {
                                        "description": "Update time range start",
                                        "type": "string"
                                      },
                                      "endUpdateTime": {
                                        "description": "Update time range end",
                                        "type": "string"
                                      }
                                    },
                                    "required": []
                                  }
                                ]
                              },
                              {}
                            ],
                            "x-fastgpt-union-layout": true
                          },
                          {
                            "title": "Proxy Team Member (`authProxy`)",
                            "description": "Act on behalf of another member in the same team via `authProxy`. Available only on personal API keys with `authProxy` enabled; mutually exclusive with `customUid`.",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key proxy caller identity. Available only for personal keys with `authProxy` enabled; specify `tmbId` or `username` (`tmbId` takes precedence without falling back to `username` on invalid ID).",
                                    "anyOf": [
                                      {
                                        "title": "By Team Member ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "Proxied team member ID (`tmbId`), takes precedence over `username`",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "By Username",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "Proxied team member username",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              }
                            },
                            "required": [
                              "authProxy"
                            ],
                            "allOf": [
                              {
                                "anyOf": [
                                  {
                                    "title": "Offset Pagination",
                                    "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                                    "type": "object",
                                    "properties": {
                                      "offset": {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "x-fastgpt-union-parameter": {
                                          "label": "Pagination Parameters",
                                          "position": "first"
                                        },
                                        "example": 0,
                                        "description": "0-based offset",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "pageSize": {
                                        "allOf": [
                                          {
                                            "x-fastgpt-union-group": {
                                              "id": "pagination",
                                              "label": "Pagination Parameters"
                                            },
                                            "example": 20,
                                            "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                            "default": 20,
                                            "type": "integer",
                                            "exclusiveMinimum": 0,
                                            "maximum": 500
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "Pagination Parameters",
                                          "position": "last"
                                        }
                                      },
                                      "startCreateTime": {
                                        "description": "Creation time range start",
                                        "type": "string"
                                      },
                                      "endCreateTime": {
                                        "description": "Creation time range end",
                                        "type": "string"
                                      },
                                      "startUpdateTime": {
                                        "description": "Update time range start",
                                        "type": "string"
                                      },
                                      "endUpdateTime": {
                                        "description": "Update time range end",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "offset"
                                    ]
                                  },
                                  {
                                    "title": "Page-Number Pagination",
                                    "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                                    "type": "object",
                                    "properties": {
                                      "pageNum": {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "x-fastgpt-union-parameter": {
                                          "label": "Pagination Parameters",
                                          "position": "first"
                                        },
                                        "example": 1,
                                        "description": "1-based page number; ignored when `offset` is provided",
                                        "default": 1,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "pageSize": {
                                        "allOf": [
                                          {
                                            "x-fastgpt-union-group": {
                                              "id": "pagination",
                                              "label": "Pagination Parameters"
                                            },
                                            "example": 20,
                                            "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                            "default": 20,
                                            "type": "integer",
                                            "exclusiveMinimum": 0,
                                            "maximum": 500
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "Pagination Parameters",
                                          "position": "last"
                                        }
                                      },
                                      "startCreateTime": {
                                        "description": "Creation time range start",
                                        "type": "string"
                                      },
                                      "endCreateTime": {
                                        "description": "Creation time range end",
                                        "type": "string"
                                      },
                                      "startUpdateTime": {
                                        "description": "Update time range start",
                                        "type": "string"
                                      },
                                      "endUpdateTime": {
                                        "description": "Update time range end",
                                        "type": "string"
                                      }
                                    },
                                    "required": []
                                  }
                                ]
                              },
                              {}
                            ],
                            "x-fastgpt-union-layout": true
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill Debug Session",
                    "description": "Identify the debug session via `skillId` (takes precedence over `appId` and ignores `sourceType`), authenticated with allowed request header credentials.",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit debug ID authenticated with allowed request header credentials.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "source": {
                        "allOf": [
                          {
                            "description": "Chat source filter; App API Key requests automatically query the `api` source and ignore this field",
                            "type": "string",
                            "enum": [
                              "test",
                              "online",
                              "share",
                              "api",
                              "cronJob",
                              "feishu",
                              "official_account",
                              "wecom",
                              "wechat",
                              "mcp",
                              "dingtalk",
                              "unknown"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "skillId"
                    ],
                    "allOf": [
                      {
                        "allOf": [
                          {
                            "title": "Skill Debug Session",
                            "description": "Identify the debug session via `skillId` (takes precedence over `appId` and ignores `sourceType`), authenticated with allowed request header credentials.",
                            "type": "object",
                            "properties": {},
                            "required": []
                          },
                          {
                            "anyOf": [
                              {
                                "title": "Offset Pagination",
                                "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                                "type": "object",
                                "properties": {
                                  "offset": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "first"
                                    },
                                    "example": 0,
                                    "description": "0-based offset",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "example": 20,
                                        "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "last"
                                    }
                                  },
                                  "startCreateTime": {
                                    "description": "Creation time range start",
                                    "type": "string"
                                  },
                                  "endCreateTime": {
                                    "description": "Creation time range end",
                                    "type": "string"
                                  },
                                  "startUpdateTime": {
                                    "description": "Update time range start",
                                    "type": "string"
                                  },
                                  "endUpdateTime": {
                                    "description": "Update time range end",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "offset"
                                ]
                              },
                              {
                                "title": "Page-Number Pagination",
                                "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                                "type": "object",
                                "properties": {
                                  "pageNum": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "first"
                                    },
                                    "example": 1,
                                    "description": "1-based page number; ignored when `offset` is provided",
                                    "default": 1,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "example": 20,
                                        "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "last"
                                    }
                                  },
                                  "startCreateTime": {
                                    "description": "Creation time range start",
                                    "type": "string"
                                  },
                                  "endCreateTime": {
                                    "description": "Creation time range end",
                                    "type": "string"
                                  },
                                  "startUpdateTime": {
                                    "description": "Update time range start",
                                    "type": "string"
                                  },
                                  "endUpdateTime": {
                                    "description": "Update time range end",
                                    "type": "string"
                                  }
                                }
                              }
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Share-Link Chat",
                    "description": "Resolves the underlying app via `outLinkAuthData`, taking precedence over `skillId` and `appId` (ignoring `sourceType`). Protected links still validate login cookies/tokens and never fall back to standard auth on failure.",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "Share-link auth payload (`shareId` / `outLinkUid`). Overrides `skillId` and `appId`; protected links still validate login session cookies/tokens.",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "Share link ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "External share user ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "source": {
                        "allOf": [
                          {
                            "description": "Chat source filter; App API Key requests automatically query the `api` source and ignore this field",
                            "type": "string",
                            "enum": [
                              "test",
                              "online",
                              "share",
                              "api",
                              "cronJob",
                              "feishu",
                              "official_account",
                              "wecom",
                              "wechat",
                              "mcp",
                              "dingtalk",
                              "unknown"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "outLinkAuthData"
                    ],
                    "allOf": [
                      {
                        "allOf": [
                          {
                            "title": "Share-Link Chat",
                            "description": "Resolves the underlying app via `outLinkAuthData`, taking precedence over `skillId` and `appId` (ignoring `sourceType`). Protected links still validate login cookies/tokens and never fall back to standard auth on failure.",
                            "type": "object",
                            "properties": {},
                            "required": []
                          },
                          {
                            "anyOf": [
                              {
                                "title": "Offset Pagination",
                                "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                                "type": "object",
                                "properties": {
                                  "offset": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "first"
                                    },
                                    "example": 0,
                                    "description": "0-based offset",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "example": 20,
                                        "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "last"
                                    }
                                  },
                                  "startCreateTime": {
                                    "description": "Creation time range start",
                                    "type": "string"
                                  },
                                  "endCreateTime": {
                                    "description": "Creation time range end",
                                    "type": "string"
                                  },
                                  "startUpdateTime": {
                                    "description": "Update time range start",
                                    "type": "string"
                                  },
                                  "endUpdateTime": {
                                    "description": "Update time range end",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "offset"
                                ]
                              },
                              {
                                "title": "Page-Number Pagination",
                                "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                                "type": "object",
                                "properties": {
                                  "pageNum": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "first"
                                    },
                                    "example": 1,
                                    "description": "1-based page number; ignored when `offset` is provided",
                                    "default": 1,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "example": 20,
                                        "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "last"
                                    }
                                  },
                                  "startCreateTime": {
                                    "description": "Creation time range start",
                                    "type": "string"
                                  },
                                  "endCreateTime": {
                                    "description": "Creation time range end",
                                    "type": "string"
                                  },
                                  "startUpdateTime": {
                                    "description": "Update time range start",
                                    "type": "string"
                                  },
                                  "endUpdateTime": {
                                    "description": "Update time range end",
                                    "type": "string"
                                  }
                                }
                              }
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "App API Key (no appId required)",
                    "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                    "anyOf": [
                      {
                        "title": "Default Identity",
                        "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                        "anyOf": [
                          {
                            "title": "Offset Pagination",
                            "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                            "type": "object",
                            "properties": {
                              "offset": {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "Pagination Parameters"
                                },
                                "x-fastgpt-union-parameter": {
                                  "label": "Pagination Parameters",
                                  "position": "first"
                                },
                                "example": 0,
                                "description": "0-based offset",
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "pageSize": {
                                "allOf": [
                                  {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "example": 20,
                                    "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                    "default": 20,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 500
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "Pagination Parameters",
                                  "position": "last"
                                }
                              },
                              "startCreateTime": {
                                "description": "Creation time range start",
                                "type": "string"
                              },
                              "endCreateTime": {
                                "description": "Creation time range end",
                                "type": "string"
                              },
                              "startUpdateTime": {
                                "description": "Update time range start",
                                "type": "string"
                              },
                              "endUpdateTime": {
                                "description": "Update time range end",
                                "type": "string"
                              }
                            },
                            "required": [
                              "offset"
                            ]
                          },
                          {
                            "title": "Page-Number Pagination",
                            "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                            "type": "object",
                            "properties": {
                              "pageNum": {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "Pagination Parameters"
                                },
                                "x-fastgpt-union-parameter": {
                                  "label": "Pagination Parameters",
                                  "position": "first"
                                },
                                "example": 1,
                                "description": "1-based page number; ignored when `offset` is provided",
                                "default": 1,
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              "pageSize": {
                                "allOf": [
                                  {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "example": 20,
                                    "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                    "default": 20,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 500
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "Pagination Parameters",
                                  "position": "last"
                                }
                              },
                              "startCreateTime": {
                                "description": "Creation time range start",
                                "type": "string"
                              },
                              "endCreateTime": {
                                "description": "Creation time range end",
                                "type": "string"
                              },
                              "startUpdateTime": {
                                "description": "Update time range start",
                                "type": "string"
                              },
                              "endUpdateTime": {
                                "description": "Update time range end",
                                "type": "string"
                              }
                            },
                            "required": []
                          }
                        ]
                      },
                      {
                        "title": "Custom End-User (`customUid`)",
                        "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          }
                        },
                        "required": [
                          "customUid"
                        ],
                        "allOf": [
                          {
                            "anyOf": [
                              {
                                "title": "Offset Pagination",
                                "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                                "type": "object",
                                "properties": {
                                  "offset": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "first"
                                    },
                                    "example": 0,
                                    "description": "0-based offset",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "example": 20,
                                        "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "last"
                                    }
                                  },
                                  "startCreateTime": {
                                    "description": "Creation time range start",
                                    "type": "string"
                                  },
                                  "endCreateTime": {
                                    "description": "Creation time range end",
                                    "type": "string"
                                  },
                                  "startUpdateTime": {
                                    "description": "Update time range start",
                                    "type": "string"
                                  },
                                  "endUpdateTime": {
                                    "description": "Update time range end",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "offset"
                                ]
                              },
                              {
                                "title": "Page-Number Pagination",
                                "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                                "type": "object",
                                "properties": {
                                  "pageNum": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "first"
                                    },
                                    "example": 1,
                                    "description": "1-based page number; ignored when `offset` is provided",
                                    "default": 1,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "example": 20,
                                        "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "last"
                                    }
                                  },
                                  "startCreateTime": {
                                    "description": "Creation time range start",
                                    "type": "string"
                                  },
                                  "endCreateTime": {
                                    "description": "Creation time range end",
                                    "type": "string"
                                  },
                                  "startUpdateTime": {
                                    "description": "Update time range start",
                                    "type": "string"
                                  },
                                  "endUpdateTime": {
                                    "description": "Update time range end",
                                    "type": "string"
                                  }
                                },
                                "required": []
                              }
                            ]
                          },
                          {}
                        ],
                        "x-fastgpt-union-layout": true
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "offset": 0
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully retrieved chat history list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "default": 0,
                          "type": "number"
                        },
                        "list": {
                          "default": [],
                          "type": "array",
                          "items": {
                            "allOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "chatId": {
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "updateTime": {
                                    "type": "string"
                                  },
                                  "customTitle": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "type": "string"
                                  },
                                  "top": {
                                    "type": "boolean"
                                  },
                                  "chatGenerateStatus": {
                                    "description": "Live generation status from Redis lease: `0` (`generating`), `1` (`done` / idle)",
                                    "type": "number",
                                    "enum": [
                                      0,
                                      1
                                    ]
                                  },
                                  "hasBeenRead": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "chatId",
                                  "updateTime",
                                  "title"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "appId": {
                                        "allOf": [
                                          {
                                            "description": "Application ID; returned only for workflow builder assistant sessions",
                                            "example": "68ee0bd23d17260b7829b137",
                                            "type": "string",
                                            "pattern": "^[0-9a-fA-F]{24}$"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "first"
                                        }
                                      },
                                      "skillId": {
                                        "allOf": [
                                          {
                                            "not": {}
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "middle"
                                        }
                                      },
                                      "sourceType": {
                                        "allOf": [
                                          {
                                            "description": "Resource type for workflow builder sessions",
                                            "type": "string",
                                            "const": "workflowBuilder"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "last"
                                        }
                                      }
                                    },
                                    "required": [
                                      "appId",
                                      "sourceType"
                                    ],
                                    "additionalProperties": false,
                                    "description": ""
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "appId": {
                                        "allOf": [
                                          {
                                            "description": "Application ID; returned only for `chatAgentHelper` sessions",
                                            "example": "68ee0bd23d17260b7829b137",
                                            "type": "string",
                                            "pattern": "^[0-9a-fA-F]{24}$"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "first"
                                        }
                                      },
                                      "skillId": {
                                        "allOf": [
                                          {
                                            "not": {}
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "middle"
                                        }
                                      },
                                      "sourceType": {
                                        "allOf": [
                                          {
                                            "description": "Resource type for `chatAgentHelper` sessions",
                                            "type": "string",
                                            "const": "chatAgentHelper"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "last"
                                        }
                                      }
                                    },
                                    "required": [
                                      "appId",
                                      "sourceType"
                                    ],
                                    "additionalProperties": false,
                                    "description": ""
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "appId": {
                                        "allOf": [
                                          {
                                            "description": "Application ID; returned only for standard app chat sessions",
                                            "example": "68ee0bd23d17260b7829b137",
                                            "type": "string",
                                            "pattern": "^[0-9a-fA-F]{24}$"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "first"
                                        }
                                      },
                                      "skillId": {
                                        "allOf": [
                                          {
                                            "not": {}
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "last"
                                        }
                                      }
                                    },
                                    "required": [
                                      "appId"
                                    ],
                                    "additionalProperties": false,
                                    "description": ""
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "appId": {
                                        "allOf": [
                                          {
                                            "not": {}
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "first"
                                        }
                                      },
                                      "skillId": {
                                        "allOf": [
                                          {
                                            "description": "Skill Edit debug ID; returned only for Skill Edit sessions",
                                            "example": "68ee0bd23d17260b7829b137",
                                            "type": "string",
                                            "pattern": "^[0-9a-fA-F]{24}$"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "last"
                                        }
                                      }
                                    },
                                    "required": [
                                      "skillId"
                                    ],
                                    "additionalProperties": false,
                                    "description": ""
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "total",
                        "list"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/history/getHistoryStatus": {
      "post": {
        "summary": "Batch Get Chat History Status",
        "description": "Batch reads Redis generation lease state, `hasBeenRead`, and `updateTime` by `chatId` for lightweight sidebar polling. Returns an error on read failure so callers can retain prior state and retry.",
        "tags": [
          "Chat History"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "App Chat",
                    "description": "Identify the conversation via `appId`. When both API Key and login session are supported, `Authorization` takes precedence over token/Cookie.",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "Application ID authenticated with the request header credentials allowed by this endpoint.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "Session resource type associated with `appId`. Defaults to `app`; pass the matching `sourceType` for assistant builder sessions.",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "Default Identity",
                            "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                            "type": "object",
                            "properties": {
                              "chatIds": {
                                "description": "List of chat IDs to check status for",
                                "minItems": 1,
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                }
                              }
                            },
                            "required": [
                              "chatIds"
                            ]
                          },
                          {
                            "title": "Custom End-User (`customUid`)",
                            "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatIds": {
                                "description": "List of chat IDs to check status for",
                                "minItems": 1,
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                }
                              }
                            },
                            "required": [
                              "chatIds",
                              "customUid"
                            ]
                          },
                          {
                            "title": "Proxy Team Member (`authProxy`)",
                            "description": "Act on behalf of another member in the same team via `authProxy`. Available only on personal API keys with `authProxy` enabled; mutually exclusive with `customUid`.",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key proxy caller identity. Available only for personal keys with `authProxy` enabled; specify `tmbId` or `username` (`tmbId` takes precedence without falling back to `username` on invalid ID).",
                                    "anyOf": [
                                      {
                                        "title": "By Team Member ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "Proxied team member ID (`tmbId`), takes precedence over `username`",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "By Username",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "Proxied team member username",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatIds": {
                                "description": "List of chat IDs to check status for",
                                "minItems": 1,
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                }
                              }
                            },
                            "required": [
                              "chatIds",
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill Debug Session",
                    "description": "Identify the debug session via `skillId` (takes precedence over `appId` and ignores `sourceType`), authenticated with allowed request header credentials.",
                    "type": "object",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit debug ID authenticated with allowed request header credentials.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatIds": {
                        "description": "List of chat IDs to check status for",
                        "minItems": 1,
                        "maxItems": 200,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        }
                      }
                    },
                    "required": [
                      "skillId",
                      "chatIds"
                    ]
                  },
                  {
                    "title": "Share-Link Chat",
                    "description": "Resolves the underlying app via `outLinkAuthData`, taking precedence over `skillId` and `appId` (ignoring `sourceType`). Protected links still validate login cookies/tokens and never fall back to standard auth on failure.",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "Share-link auth payload (`shareId` / `outLinkUid`). Overrides `skillId` and `appId`; protected links still validate login session cookies/tokens.",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "Share link ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "External share user ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatIds": {
                        "description": "List of chat IDs to check status for",
                        "minItems": 1,
                        "maxItems": 200,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        }
                      }
                    },
                    "required": [
                      "outLinkAuthData",
                      "chatIds"
                    ]
                  },
                  {
                    "title": "App API Key (no appId required)",
                    "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                    "anyOf": [
                      {
                        "title": "Default Identity",
                        "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                        "type": "object",
                        "properties": {
                          "chatIds": {
                            "description": "List of chat IDs to check status for",
                            "minItems": 1,
                            "maxItems": 200,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            }
                          }
                        },
                        "required": [
                          "chatIds"
                        ]
                      },
                      {
                        "title": "Custom End-User (`customUid`)",
                        "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatIds": {
                            "description": "List of chat IDs to check status for",
                            "minItems": 1,
                            "maxItems": 200,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            }
                          }
                        },
                        "required": [
                          "chatIds",
                          "customUid"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatIds": [
                  "string"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "type": "string",
                                "maxLength": 1024
                              },
                              "updateTime": {
                                "type": "string"
                              },
                              "chatGenerateStatus": {
                                "description": "Live generation status from Redis lease: `0` (`generating`), `1` (`done` / idle)",
                                "type": "number",
                                "enum": [
                                  0,
                                  1
                                ]
                              },
                              "hasBeenRead": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "chatId",
                              "updateTime"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "list"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/history/markRead": {
      "post": {
        "summary": "Mark Chat History Read",
        "description": "Called after the user finishes reading replies to sync `hasBeenRead` in MongoDB. App sessions require app read permission while other sources require resource write permission, along with session scope checks.",
        "tags": [
          "Chat History"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "App Chat",
                    "description": "Identify the conversation via `appId`. When both API Key and login session are supported, `Authorization` takes precedence over token/Cookie.",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "Application ID authenticated with the request header credentials allowed by this endpoint.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "Session resource type associated with `appId`. Defaults to `app`; pass the matching `sourceType` for assistant builder sessions.",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "Default Identity",
                            "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "description": "Chat ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            },
                            "required": [
                              "chatId"
                            ]
                          },
                          {
                            "title": "Custom End-User (`customUid`)",
                            "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "Chat ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            },
                            "required": [
                              "chatId",
                              "customUid"
                            ]
                          },
                          {
                            "title": "Proxy Team Member (`authProxy`)",
                            "description": "Act on behalf of another member in the same team via `authProxy`. Available only on personal API keys with `authProxy` enabled; mutually exclusive with `customUid`.",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key proxy caller identity. Available only for personal keys with `authProxy` enabled; specify `tmbId` or `username` (`tmbId` takes precedence without falling back to `username` on invalid ID).",
                                    "anyOf": [
                                      {
                                        "title": "By Team Member ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "Proxied team member ID (`tmbId`), takes precedence over `username`",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "By Username",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "Proxied team member username",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "Chat ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            },
                            "required": [
                              "chatId",
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill Debug Session",
                    "description": "Identify the debug session via `skillId` (takes precedence over `appId` and ignores `sourceType`), authenticated with allowed request header credentials.",
                    "type": "object",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit debug ID authenticated with allowed request header credentials.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "Chat ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      }
                    },
                    "required": [
                      "skillId",
                      "chatId"
                    ]
                  },
                  {
                    "title": "Share-Link Chat",
                    "description": "Resolves the underlying app via `outLinkAuthData`, taking precedence over `skillId` and `appId` (ignoring `sourceType`). Protected links still validate login cookies/tokens and never fall back to standard auth on failure.",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "Share-link auth payload (`shareId` / `outLinkUid`). Overrides `skillId` and `appId`; protected links still validate login session cookies/tokens.",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "Share link ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "External share user ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "Chat ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      }
                    },
                    "required": [
                      "outLinkAuthData",
                      "chatId"
                    ]
                  },
                  {
                    "title": "App API Key (no appId required)",
                    "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                    "anyOf": [
                      {
                        "title": "Default Identity",
                        "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                        "type": "object",
                        "properties": {
                          "chatId": {
                            "description": "Chat ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          }
                        },
                        "required": [
                          "chatId"
                        ]
                      },
                      {
                        "title": "Custom End-User (`customUid`)",
                        "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "description": "Chat ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          }
                        },
                        "required": [
                          "chatId",
                          "customUid"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatId": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/history/updateHistory": {
      "put": {
        "summary": "Update Chat History",
        "description": "Update the title, custom title, or pinned status of a chat session.",
        "tags": [
          "Chat History"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "App Chat",
                    "description": "Identify the conversation via `appId`. When both API Key and login session are supported, `Authorization` takes precedence over token/Cookie.",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "Application ID authenticated with the request header credentials allowed by this endpoint.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "Session resource type associated with `appId`. Defaults to `app`; pass the matching `sourceType` for assistant builder sessions.",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "Default Identity",
                            "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "description": "Chat ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "title": {
                                "description": "Title",
                                "type": "string"
                              },
                              "customTitle": {
                                "description": "Custom Title",
                                "type": "string"
                              },
                              "top": {
                                "description": "Whether the conversation is pinned",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "chatId"
                            ]
                          },
                          {
                            "title": "Custom End-User (`customUid`)",
                            "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "Chat ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "title": {
                                "description": "Title",
                                "type": "string"
                              },
                              "customTitle": {
                                "description": "Custom Title",
                                "type": "string"
                              },
                              "top": {
                                "description": "Whether the conversation is pinned",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "chatId",
                              "customUid"
                            ]
                          },
                          {
                            "title": "Proxy Team Member (`authProxy`)",
                            "description": "Act on behalf of another member in the same team via `authProxy`. Available only on personal API keys with `authProxy` enabled; mutually exclusive with `customUid`.",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key proxy caller identity. Available only for personal keys with `authProxy` enabled; specify `tmbId` or `username` (`tmbId` takes precedence without falling back to `username` on invalid ID).",
                                    "anyOf": [
                                      {
                                        "title": "By Team Member ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "Proxied team member ID (`tmbId`), takes precedence over `username`",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "By Username",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "Proxied team member username",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "Chat ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "title": {
                                "description": "Title",
                                "type": "string"
                              },
                              "customTitle": {
                                "description": "Custom Title",
                                "type": "string"
                              },
                              "top": {
                                "description": "Whether the conversation is pinned",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "chatId",
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill Debug Session",
                    "description": "Identify the debug session via `skillId` (takes precedence over `appId` and ignores `sourceType`), authenticated with allowed request header credentials.",
                    "type": "object",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit debug ID authenticated with allowed request header credentials.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "Chat ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      },
                      "title": {
                        "description": "Title",
                        "type": "string"
                      },
                      "customTitle": {
                        "description": "Custom Title",
                        "type": "string"
                      },
                      "top": {
                        "description": "Whether the conversation is pinned",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "skillId",
                      "chatId"
                    ]
                  },
                  {
                    "title": "Share-Link Chat",
                    "description": "Resolves the underlying app via `outLinkAuthData`, taking precedence over `skillId` and `appId` (ignoring `sourceType`). Protected links still validate login cookies/tokens and never fall back to standard auth on failure.",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "Share-link auth payload (`shareId` / `outLinkUid`). Overrides `skillId` and `appId`; protected links still validate login session cookies/tokens.",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "Share link ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "External share user ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "Chat ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      },
                      "title": {
                        "description": "Title",
                        "type": "string"
                      },
                      "customTitle": {
                        "description": "Custom Title",
                        "type": "string"
                      },
                      "top": {
                        "description": "Whether the conversation is pinned",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "outLinkAuthData",
                      "chatId"
                    ]
                  },
                  {
                    "title": "App API Key (no appId required)",
                    "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                    "anyOf": [
                      {
                        "title": "Default Identity",
                        "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                        "type": "object",
                        "properties": {
                          "chatId": {
                            "description": "Chat ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          },
                          "title": {
                            "description": "Title",
                            "type": "string"
                          },
                          "customTitle": {
                            "description": "Custom Title",
                            "type": "string"
                          },
                          "top": {
                            "description": "Whether the conversation is pinned",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "chatId"
                        ]
                      },
                      {
                        "title": "Custom End-User (`customUid`)",
                        "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "description": "Chat ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          },
                          "title": {
                            "description": "Title",
                            "type": "string"
                          },
                          "customTitle": {
                            "description": "Custom Title",
                            "type": "string"
                          },
                          "top": {
                            "description": "Whether the conversation is pinned",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "chatId",
                          "customUid"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatId": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully updated chat history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/history/delHistory": {
      "delete": {
        "summary": "Delete Chat History",
        "description": "Soft-deletes a single chat session without immediately removing underlying data.",
        "tags": [
          "Chat History"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "schema": {
              "anyOf": [
                {
                  "title": "App Chat",
                  "description": "Identify the conversation via `appId`. When both API Key and login session are supported, `Authorization` takes precedence over token/Cookie.",
                  "properties": {
                    "appId": {
                      "allOf": [
                        {
                          "example": "68ad85a7463006c963799a05",
                          "description": "Application ID authenticated with the request header credentials allowed by this endpoint.",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "first"
                      }
                    },
                    "sourceType": {
                      "allOf": [
                        {
                          "example": "chatAgentHelper",
                          "description": "Session resource type associated with `appId`. Defaults to `app`; pass the matching `sourceType` for assistant builder sessions.",
                          "type": "string",
                          "enum": [
                            "app",
                            "chatAgentHelper",
                            "workflowBuilder"
                          ]
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "last"
                      }
                    }
                  },
                  "required": [
                    "appId"
                  ],
                  "allOf": [
                    {
                      "anyOf": [
                        {
                          "title": "Default Identity",
                          "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                          "type": "object",
                          "properties": {
                            "chatId": {
                              "description": "Chat ID",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            }
                          },
                          "required": [
                            "chatId"
                          ]
                        },
                        {
                          "title": "Custom End-User (`customUid`)",
                          "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                          "type": "object",
                          "properties": {
                            "customUid": {
                              "allOf": [
                                {
                                  "example": "customer-42",
                                  "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                }
                              ],
                              "x-fastgpt-union-parameter": {
                                "label": "",
                                "position": "only"
                              }
                            },
                            "chatId": {
                              "description": "Chat ID",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            }
                          },
                          "required": [
                            "chatId",
                            "customUid"
                          ]
                        },
                        {
                          "title": "Proxy Team Member (`authProxy`)",
                          "description": "Act on behalf of another member in the same team via `authProxy`. Available only on personal API keys with `authProxy` enabled; mutually exclusive with `customUid`.",
                          "type": "object",
                          "properties": {
                            "authProxy": {
                              "allOf": [
                                {
                                  "example": "{\"tmbId\":\"68ad85a7463006c963799a06\"}",
                                  "description": "JSON-serialized proxy identity, e.g. `{\"tmbId\":\"member-id\"}` or `{\"username\":\"alice\"}`",
                                  "type": "string"
                                }
                              ],
                              "x-fastgpt-union-parameter": {
                                "label": "",
                                "position": "only"
                              }
                            },
                            "chatId": {
                              "description": "Chat ID",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            }
                          },
                          "required": [
                            "chatId",
                            "authProxy"
                          ]
                        }
                      ]
                    },
                    {}
                  ],
                  "x-fastgpt-union-layout": true
                },
                {
                  "title": "Skill Debug Session",
                  "description": "Identify the debug session via `skillId` (takes precedence over `appId` and ignores `sourceType`), authenticated with allowed request header credentials.",
                  "type": "object",
                  "properties": {
                    "skillId": {
                      "allOf": [
                        {
                          "example": "68ad85a7463006c963799a06",
                          "description": "Skill Edit debug ID authenticated with allowed request header credentials.",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "only"
                      }
                    },
                    "chatId": {
                      "description": "Chat ID",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  "required": [
                    "skillId",
                    "chatId"
                  ]
                },
                {
                  "title": "Share-Link Chat",
                  "description": "Resolves the underlying app via `outLinkAuthData`, taking precedence over `skillId` and `appId` (ignoring `sourceType`). Protected links still validate login cookies/tokens and never fall back to standard auth on failure.",
                  "type": "object",
                  "properties": {
                    "outLinkAuthData": {
                      "allOf": [
                        {
                          "example": "{\"shareId\":\"share-id\",\"outLinkUid\":\"outlink-user-id\"}",
                          "description": "JSON-serialized share-link auth payload containing `shareId` and `outLinkUid`. Overrides `skillId` and `appId`; protected links still check login session cookies/tokens.",
                          "type": "string"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "only"
                      }
                    },
                    "chatId": {
                      "description": "Chat ID",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  "required": [
                    "outLinkAuthData",
                    "chatId"
                  ]
                },
                {
                  "title": "App API Key (no appId required)",
                  "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                  "anyOf": [
                    {
                      "title": "Default Identity",
                      "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                      "type": "object",
                      "properties": {
                        "chatId": {
                          "description": "Chat ID",
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        }
                      },
                      "required": [
                        "chatId"
                      ]
                    },
                    {
                      "title": "Custom End-User (`customUid`)",
                      "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                      "type": "object",
                      "properties": {
                        "customUid": {
                          "allOf": [
                            {
                              "example": "customer-42",
                              "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            }
                          ],
                          "x-fastgpt-union-parameter": {
                            "label": "",
                            "position": "only"
                          }
                        },
                        "chatId": {
                          "description": "Chat ID",
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        }
                      },
                      "required": [
                        "chatId",
                        "customUid"
                      ]
                    }
                  ]
                }
              ]
            },
            "required": true,
            "style": "form",
            "explode": true,
            "examples": {
              "default": {
                "value": {
                  "appId": "68ad85a7463006c963799a05",
                  "chatId": "string"
                },
                "x-disabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully deleted chat session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/history/clearHistories": {
      "delete": {
        "summary": "Clear Chat Histories",
        "description": "Soft-deletes all chat sessions under the target context.",
        "tags": [
          "Chat History"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "schema": {
              "anyOf": [
                {
                  "title": "App Chat",
                  "description": "Identify the conversation via `appId`. When both API Key and login session are supported, `Authorization` takes precedence over token/Cookie.",
                  "properties": {
                    "appId": {
                      "allOf": [
                        {
                          "example": "68ad85a7463006c963799a05",
                          "description": "Application ID authenticated with the request header credentials allowed by this endpoint.",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "first"
                      }
                    },
                    "sourceType": {
                      "allOf": [
                        {
                          "example": "chatAgentHelper",
                          "description": "Session resource type associated with `appId`. Defaults to `app`; pass the matching `sourceType` for assistant builder sessions.",
                          "type": "string",
                          "enum": [
                            "app",
                            "chatAgentHelper",
                            "workflowBuilder"
                          ]
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "last"
                      }
                    }
                  },
                  "required": [
                    "appId"
                  ],
                  "allOf": [
                    {
                      "anyOf": [
                        {
                          "title": "Default Identity",
                          "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                          "type": "object",
                          "properties": {},
                          "required": []
                        },
                        {
                          "title": "Custom End-User (`customUid`)",
                          "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                          "type": "object",
                          "properties": {
                            "customUid": {
                              "allOf": [
                                {
                                  "example": "customer-42",
                                  "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                }
                              ],
                              "x-fastgpt-union-parameter": {
                                "label": "",
                                "position": "only"
                              }
                            }
                          },
                          "required": [
                            "customUid"
                          ]
                        },
                        {
                          "title": "Proxy Team Member (`authProxy`)",
                          "description": "Act on behalf of another member in the same team via `authProxy`. Available only on personal API keys with `authProxy` enabled; mutually exclusive with `customUid`.",
                          "type": "object",
                          "properties": {
                            "authProxy": {
                              "allOf": [
                                {
                                  "example": "{\"tmbId\":\"68ad85a7463006c963799a06\"}",
                                  "description": "JSON-serialized proxy identity, e.g. `{\"tmbId\":\"member-id\"}` or `{\"username\":\"alice\"}`",
                                  "type": "string"
                                }
                              ],
                              "x-fastgpt-union-parameter": {
                                "label": "",
                                "position": "only"
                              }
                            }
                          },
                          "required": [
                            "authProxy"
                          ]
                        }
                      ]
                    },
                    {}
                  ],
                  "x-fastgpt-union-layout": true
                },
                {
                  "title": "Skill Debug Session",
                  "description": "Identify the debug session via `skillId` (takes precedence over `appId` and ignores `sourceType`), authenticated with allowed request header credentials.",
                  "type": "object",
                  "properties": {
                    "skillId": {
                      "allOf": [
                        {
                          "example": "68ad85a7463006c963799a06",
                          "description": "Skill Edit debug ID authenticated with allowed request header credentials.",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "only"
                      }
                    }
                  },
                  "required": [
                    "skillId"
                  ]
                },
                {
                  "title": "Share-Link Chat",
                  "description": "Resolves the underlying app via `outLinkAuthData`, taking precedence over `skillId` and `appId` (ignoring `sourceType`). Protected links still validate login cookies/tokens and never fall back to standard auth on failure.",
                  "type": "object",
                  "properties": {
                    "outLinkAuthData": {
                      "allOf": [
                        {
                          "example": "{\"shareId\":\"share-id\",\"outLinkUid\":\"outlink-user-id\"}",
                          "description": "JSON-serialized share-link auth payload containing `shareId` and `outLinkUid`. Overrides `skillId` and `appId`; protected links still check login session cookies/tokens.",
                          "type": "string"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "only"
                      }
                    }
                  },
                  "required": [
                    "outLinkAuthData"
                  ]
                },
                {
                  "title": "App API Key (no appId required)",
                  "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                  "anyOf": [
                    {
                      "title": "Default Identity",
                      "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                      "type": "object",
                      "properties": {},
                      "required": []
                    },
                    {
                      "title": "Custom End-User (`customUid`)",
                      "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                      "type": "object",
                      "properties": {
                        "customUid": {
                          "allOf": [
                            {
                              "example": "customer-42",
                              "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            }
                          ],
                          "x-fastgpt-union-parameter": {
                            "label": "",
                            "position": "only"
                          }
                        }
                      },
                      "required": [
                        "customUid"
                      ]
                    }
                  ]
                }
              ]
            },
            "required": false,
            "style": "form",
            "explode": true,
            "examples": {
              "default": {
                "value": {
                  "appId": "68ad85a7463006c963799a05"
                },
                "x-disabled": true
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully cleared chat histories",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/history/batchDelete": {
      "post": {
        "summary": "Batch Delete Chat Histories",
        "description": "Permanently deletes selected chat sessions along with their messages, response logs, and uploaded chat files (requires log management permission).",
        "tags": [
          "Chat History"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "App Chat",
                    "description": "Identify the conversation via `appId`. When both API Key and login session are supported, `Authorization` takes precedence over token/Cookie.",
                    "type": "object",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "Application ID authenticated with the request header credentials allowed by this endpoint.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "Session resource type associated with `appId`. Defaults to `app`; pass the matching `sourceType` for assistant builder sessions.",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      },
                      "chatIds": {
                        "description": "List of chat IDs",
                        "example": [
                          "chat_123456",
                          "chat_789012"
                        ],
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        }
                      }
                    },
                    "required": [
                      "appId",
                      "chatIds"
                    ]
                  },
                  {
                    "title": "Skill Debug Session",
                    "description": "Identify the debug session via `skillId` (takes precedence over `appId` and ignores `sourceType`), authenticated with allowed request header credentials.",
                    "type": "object",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit debug ID authenticated with allowed request header credentials.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatIds": {
                        "description": "List of chat IDs",
                        "example": [
                          "chat_123456",
                          "chat_789012"
                        ],
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        }
                      }
                    },
                    "required": [
                      "skillId",
                      "chatIds"
                    ]
                  },
                  {
                    "title": "App API Key (no appId required)",
                    "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                    "type": "object",
                    "properties": {
                      "chatIds": {
                        "description": "List of chat IDs",
                        "example": [
                          "chat_123456",
                          "chat_789012"
                        ],
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        }
                      }
                    },
                    "required": [
                      "chatIds"
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatIds": [
                  "chat_123456",
                  "chat_789012"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully deleted chat session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/init": {
      "get": {
        "summary": "Initialize Chat Session",
        "description": "Initializes an application chat session or a Skill Edit debug session, returning chat configuration, variables, and existing conversation state.\n\nPass either `appId` (app chat) or `skillId` (skill debug) together with `chatId` in Query parameters (`skillId` takes precedence if both are provided).\n\nFor builder assistant sessions, pass `appId` with `sourceType` (`chatAgentHelper` or `workflowBuilder`); omit `sourceType` for regular app chats.\n\nShare-link sessions use `GET /api/core/chat/outLink/init` with JSON-serialized `outLinkAuthData`. Starting or resuming a skill runtime sandbox uses `POST /api/core/ai/skill/runtime/init`.",
        "tags": [
          "Chat History"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "schema": {
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatId": "1234567890",
                "loadCustomFeedbacks": true
              },
              "anyOf": [
                {
                  "title": "App Chat",
                  "description": "Identify the conversation via `appId`. When both API Key and login session are supported, `Authorization` takes precedence over token/Cookie.",
                  "properties": {
                    "appId": {
                      "allOf": [
                        {
                          "example": "68ad85a7463006c963799a05",
                          "description": "Application ID authenticated with the request header credentials allowed by this endpoint.",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "first"
                      }
                    },
                    "sourceType": {
                      "allOf": [
                        {
                          "example": "chatAgentHelper",
                          "description": "Session resource type associated with `appId`. Defaults to `app`; pass the matching `sourceType` for assistant builder sessions.",
                          "type": "string",
                          "enum": [
                            "app",
                            "chatAgentHelper",
                            "workflowBuilder"
                          ]
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "last"
                      }
                    }
                  },
                  "required": [
                    "appId"
                  ],
                  "allOf": [
                    {
                      "anyOf": [
                        {
                          "title": "Default Identity",
                          "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                          "type": "object",
                          "properties": {
                            "chatId": {
                              "description": "Chat ID",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            },
                            "loadCustomFeedbacks": {
                              "description": "Whether to load custom feedback items",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "chatId"
                          ]
                        },
                        {
                          "title": "Custom End-User (`customUid`)",
                          "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                          "type": "object",
                          "properties": {
                            "customUid": {
                              "allOf": [
                                {
                                  "example": "customer-42",
                                  "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                }
                              ],
                              "x-fastgpt-union-parameter": {
                                "label": "",
                                "position": "only"
                              }
                            },
                            "chatId": {
                              "description": "Chat ID",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            },
                            "loadCustomFeedbacks": {
                              "description": "Whether to load custom feedback items",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "chatId",
                            "customUid"
                          ]
                        },
                        {
                          "title": "Proxy Team Member (`authProxy`)",
                          "description": "Act on behalf of another member in the same team via `authProxy`. Available only on personal API keys with `authProxy` enabled; mutually exclusive with `customUid`.",
                          "type": "object",
                          "properties": {
                            "authProxy": {
                              "allOf": [
                                {
                                  "example": "{\"tmbId\":\"68ad85a7463006c963799a06\"}",
                                  "description": "JSON-serialized proxy identity, e.g. `{\"tmbId\":\"member-id\"}` or `{\"username\":\"alice\"}`",
                                  "type": "string"
                                }
                              ],
                              "x-fastgpt-union-parameter": {
                                "label": "",
                                "position": "only"
                              }
                            },
                            "chatId": {
                              "description": "Chat ID",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            },
                            "loadCustomFeedbacks": {
                              "description": "Whether to load custom feedback items",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "chatId",
                            "authProxy"
                          ]
                        }
                      ]
                    },
                    {}
                  ],
                  "x-fastgpt-union-layout": true
                },
                {
                  "title": "Skill Debug Session",
                  "description": "Identify the debug session via `skillId` (takes precedence over `appId` and ignores `sourceType`), authenticated with allowed request header credentials.",
                  "type": "object",
                  "properties": {
                    "skillId": {
                      "allOf": [
                        {
                          "example": "68ad85a7463006c963799a06",
                          "description": "Skill Edit debug ID authenticated with allowed request header credentials.",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "only"
                      }
                    },
                    "chatId": {
                      "description": "Chat ID",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    },
                    "loadCustomFeedbacks": {
                      "description": "Whether to load custom feedback items",
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "skillId",
                    "chatId"
                  ]
                },
                {
                  "title": "App API Key (no appId required)",
                  "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                  "anyOf": [
                    {
                      "title": "Default Identity",
                      "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                      "type": "object",
                      "properties": {
                        "chatId": {
                          "description": "Chat ID",
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        },
                        "loadCustomFeedbacks": {
                          "description": "Whether to load custom feedback items",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "chatId"
                      ]
                    },
                    {
                      "title": "Custom End-User (`customUid`)",
                      "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                      "type": "object",
                      "properties": {
                        "customUid": {
                          "allOf": [
                            {
                              "example": "customer-42",
                              "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            }
                          ],
                          "x-fastgpt-union-parameter": {
                            "label": "",
                            "position": "only"
                          }
                        },
                        "chatId": {
                          "description": "Chat ID",
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        },
                        "loadCustomFeedbacks": {
                          "description": "Whether to load custom feedback items",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "chatId",
                        "customUid"
                      ]
                    }
                  ]
                }
              ]
            },
            "required": true,
            "style": "form",
            "explode": true,
            "examples": {
              "default": {
                "value": {
                  "appId": "68ad85a7463006c963799a05",
                  "chatId": "1234567890"
                },
                "x-disabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully returned chat initialization data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "chatId": {
                              "description": "Chat ID",
                              "type": "string",
                              "maxLength": 1024
                            },
                            "userAvatar": {
                              "description": "User avatar URL",
                              "type": "string"
                            },
                            "title": {
                              "description": "Chat title",
                              "type": "string"
                            },
                            "variables": {
                              "description": "Global variable values",
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            "chatGenerateStatus": {
                              "description": "Live generation status from Redis lease: `0` (`generating`), `1` (`done` / idle)",
                              "type": "number",
                              "enum": [
                                0,
                                1
                              ]
                            },
                            "hasBeenRead": {
                              "description": "Whether the conversation has been read",
                              "type": "boolean"
                            },
                            "app": {
                              "description": "Application configuration",
                              "type": "object",
                              "properties": {
                                "chatConfig": {
                                  "description": "Chat configuration",
                                  "type": "object",
                                  "properties": {
                                    "welcomeText": {
                                      "description": "Welcome message displayed when starting a new conversation",
                                      "type": "string"
                                    },
                                    "welcomeConfig": {
                                      "description": "Opening prompt configuration",
                                      "type": "object",
                                      "properties": {
                                        "welcomeText": {
                                          "description": "Welcome message displayed when starting a new conversation",
                                          "type": "string"
                                        },
                                        "welcomeQuestions": {
                                          "description": "Suggested starter questions shown below the welcome text",
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        }
                                      },
                                      "additionalProperties": false
                                    },
                                    "variables": {
                                      "description": "List of variables users fill in before starting a conversation",
                                      "type": "array",
                                      "items": {
                                        "description": "Application chat variable definition",
                                        "type": "object",
                                        "properties": {
                                          "maxFiles": {
                                            "description": "Maximum number of files allowed for this variable",
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          },
                                          "canSelectFile": {
                                            "description": "Whether regular document files are allowed for this variable",
                                            "type": "boolean"
                                          },
                                          "customPdfParse": {
                                            "description": "Whether custom PDF parsing is enabled",
                                            "type": "boolean"
                                          },
                                          "canSelectImg": {
                                            "description": "Whether images are allowed for this variable",
                                            "type": "boolean"
                                          },
                                          "canSelectVideo": {
                                            "description": "Whether videos are allowed for this variable",
                                            "type": "boolean"
                                          },
                                          "canSelectAudio": {
                                            "description": "Whether audio files are allowed for this variable",
                                            "type": "boolean"
                                          },
                                          "canSelectCustomFileExtension": {
                                            "description": "Whether custom file extensions are allowed for this variable",
                                            "type": "boolean"
                                          },
                                          "customFileExtensionList": {
                                            "description": "List of allowed custom file extensions for this variable",
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "key": {
                                            "description": "Variable key used in prompts and workflow references",
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "welcomeText",
                                                  "welcomeQuestions",
                                                  "switch",
                                                  "history",
                                                  "text",
                                                  "questionGuide",
                                                  "tts",
                                                  "whisper",
                                                  "variables",
                                                  "scheduleTrigger",
                                                  "chatInputGuide",
                                                  "autoExecute",
                                                  "entryPoints",
                                                  "instruction",
                                                  "userChatInput",
                                                  "inputFiles",
                                                  "agents",
                                                  "modelId",
                                                  "model",
                                                  "systemPrompt",
                                                  "description",
                                                  "system_anyInput",
                                                  "system_textareaInput",
                                                  "system_addInputParam",
                                                  "system_forbid_stream",
                                                  "system_header_secret",
                                                  "system_input_config",
                                                  "maxContext",
                                                  "temperature",
                                                  "maxToken",
                                                  "aiSettings",
                                                  "isResponseAnswerText",
                                                  "aiChatQuoteRole",
                                                  "quoteTemplate",
                                                  "quotePrompt",
                                                  "quoteQA",
                                                  "aiChatVision",
                                                  "aiChatAudio",
                                                  "aiChatVideo",
                                                  "aiChatExtractFiles",
                                                  "stringQuoteText",
                                                  "aiChatReasoning",
                                                  "aiChatReasoningEffort",
                                                  "aiChatTopP",
                                                  "aiChatStopSign",
                                                  "aiChatResponseFormat",
                                                  "aiChatJsonSchema",
                                                  "agent_selectedTools",
                                                  "agent_datasetParams",
                                                  "skills",
                                                  "useAgentSandbox",
                                                  "sandboxEntrypoint",
                                                  "editSkillId",
                                                  "datasets",
                                                  "similarity",
                                                  "limit",
                                                  "searchMode",
                                                  "embeddingWeight",
                                                  "usingReRank",
                                                  "rerankWeight",
                                                  "rerankCandidateNum",
                                                  "rerankModelId",
                                                  "rerankModel",
                                                  "datasetSearchUsingExtensionQuery",
                                                  "datasetSearchExtensionModelId",
                                                  "datasetSearchExtensionModel",
                                                  "datasetSearchExtensionBg",
                                                  "datasetSearchInput",
                                                  "collectionFilterVersion",
                                                  "collectionFilterMatch",
                                                  "authTmbId",
                                                  "system_datasetQuoteList",
                                                  "content",
                                                  "extractKeys",
                                                  "system_httpReqUrl",
                                                  "system_httpHeader",
                                                  "system_httpMethod",
                                                  "system_httpParams",
                                                  "system_httpJsonBody",
                                                  "system_httpFormBody",
                                                  "system_httpContentType",
                                                  "system_httpTimeout",
                                                  "url",
                                                  "app",
                                                  "pluginId",
                                                  "pluginStart",
                                                  "condition",
                                                  "ifElseList",
                                                  "updateList",
                                                  "code",
                                                  "codeType",
                                                  "fileUrlList",
                                                  "userSelectOptions",
                                                  "loopInputArray",
                                                  "childrenNodeIdList",
                                                  "nodeWidth",
                                                  "nodeHeight",
                                                  "loopNodeInputHeight",
                                                  "loopStartInput",
                                                  "loopStartIndex",
                                                  "loopEndInput",
                                                  "parallelRunMaxConcurrency",
                                                  "parallelRunMaxRetryTimes",
                                                  "loopRunMode",
                                                  "loopRunInputArray",
                                                  "loopCustomOutputs",
                                                  "userInputForms",
                                                  "commentText",
                                                  "commentSize",
                                                  "system_toolData",
                                                  "system_toolSetData"
                                                ]
                                              },
                                              {
                                                "type": "string"
                                              }
                                            ]
                                          },
                                          "label": {
                                            "description": "Variable display label",
                                            "type": "string"
                                          },
                                          "valueType": {
                                            "description": "Variable value data type",
                                            "type": "string",
                                            "enum": [
                                              "string",
                                              "number",
                                              "boolean",
                                              "object",
                                              "arrayString",
                                              "arrayNumber",
                                              "arrayBoolean",
                                              "arrayObject",
                                              "arrayAny",
                                              "any",
                                              "chatHistory",
                                              "datasetQuote",
                                              "dynamic",
                                              "selectDataset",
                                              "selectApp"
                                            ]
                                          },
                                          "required": {
                                            "description": "Whether this variable is required",
                                            "type": "boolean"
                                          },
                                          "defaultValue": {
                                            "description": "Default value for the variable",
                                            "type": [
                                              "object",
                                              "array",
                                              "string",
                                              "number",
                                              "boolean",
                                              "null"
                                            ]
                                          },
                                          "referencePlaceholder": {
                                            "description": "Placeholder text displayed when referencing the variable",
                                            "type": "string"
                                          },
                                          "isRichText": {
                                            "description": "Whether rich-text input is enabled",
                                            "type": "boolean"
                                          },
                                          "placeholder": {
                                            "description": "Input field placeholder text",
                                            "type": "string"
                                          },
                                          "maxLength": {
                                            "description": "Maximum input character length for text variables",
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          },
                                          "minLength": {
                                            "description": "Minimum input character length for text variables",
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          },
                                          "markList": {
                                            "description": "Scale tick marks for numeric slider variables",
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "label": {
                                                  "description": "Tick label",
                                                  "type": "string"
                                                },
                                                "value": {
                                                  "description": "Tick numeric value",
                                                  "type": "number"
                                                }
                                              },
                                              "required": [
                                                "label",
                                                "value"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "step": {
                                            "description": "Numeric step increment",
                                            "type": "number"
                                          },
                                          "max": {
                                            "description": "Maximum numeric value",
                                            "type": "number"
                                          },
                                          "min": {
                                            "description": "Minimum numeric value",
                                            "type": "number"
                                          },
                                          "precision": {
                                            "description": "Decimal precision for numeric variables",
                                            "type": "number"
                                          },
                                          "canLocalUpload": {
                                            "description": "Whether local file upload is allowed for this variable",
                                            "type": "boolean"
                                          },
                                          "canUrlUpload": {
                                            "description": "Whether importing files by URL is allowed for this variable",
                                            "type": "boolean"
                                          },
                                          "timeGranularity": {
                                            "description": "Granularity of time selection",
                                            "type": "string",
                                            "enum": [
                                              "day",
                                              "hour",
                                              "minute",
                                              "second"
                                            ]
                                          },
                                          "timeRangeStart": {
                                            "description": "Start timestamp of the time range variable",
                                            "type": "string"
                                          },
                                          "timeRangeEnd": {
                                            "description": "End timestamp of the time range variable",
                                            "type": "string"
                                          },
                                          "datasetOptions": {
                                            "description": "Selectable datasets for dataset-picker variables",
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "datasetId": {
                                                  "description": "Selectable dataset ID",
                                                  "type": "string"
                                                },
                                                "avatar": {
                                                  "description": "Selectable dataset icon URL",
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "description": "Selectable dataset name",
                                                  "type": "string"
                                                },
                                                "vectorModel": {
                                                  "type": "object",
                                                  "properties": {
                                                    "modelId": {
                                                      "description": "Embedding model ID bound to the dataset",
                                                      "type": "string"
                                                    },
                                                    "model": {
                                                      "description": "Embedding model identifier (legacy compatibility)",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "model"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "error": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "datasetId",
                                                "avatar",
                                                "name",
                                                "vectorModel"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "customInputConfig": {
                                            "description": "Custom input configuration in the workflow editor",
                                            "type": "object",
                                            "properties": {
                                              "selectValueTypeList": {
                                                "description": "Allowed value types for custom variable input",
                                                "type": "array",
                                                "items": {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "object",
                                                    "arrayString",
                                                    "arrayNumber",
                                                    "arrayBoolean",
                                                    "arrayObject",
                                                    "arrayAny",
                                                    "any",
                                                    "chatHistory",
                                                    "datasetQuote",
                                                    "dynamic",
                                                    "selectDataset",
                                                    "selectApp"
                                                  ]
                                                }
                                              },
                                              "showDefaultValue": {
                                                "description": "Whether to show default value settings in the editor",
                                                "type": "boolean"
                                              },
                                              "showDescription": {
                                                "description": "Whether to show field description settings in the editor",
                                                "type": "boolean"
                                              },
                                              "hideBottomDivider": {
                                                "description": "Whether to hide the bottom divider in variable editing",
                                                "type": "boolean"
                                              }
                                            },
                                            "additionalProperties": false
                                          },
                                          "type": {
                                            "description": "Variable input component type",
                                            "type": "string",
                                            "enum": [
                                              "input",
                                              "textarea",
                                              "numberInput",
                                              "select",
                                              "multipleSelect",
                                              "timePointSelect",
                                              "timeRangeSelect",
                                              "switch",
                                              "password",
                                              "file",
                                              "llmSelect",
                                              "datasetSelect",
                                              "custom",
                                              "internal"
                                            ]
                                          },
                                          "description": {
                                            "description": "Description of the variable purpose",
                                            "type": "string"
                                          },
                                          "list": {
                                            "description": "Options for select-type variables",
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "label": {
                                                  "description": "Option display label",
                                                  "type": "string"
                                                },
                                                "value": {
                                                  "description": "Option underlying value",
                                                  "type": "string"
                                                },
                                                "icon": {
                                                  "description": "Option icon",
                                                  "type": "string"
                                                },
                                                "description": {
                                                  "description": "Option description",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "label",
                                                "value"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "enums": {
                                            "description": "Deprecated: legacy enum options",
                                            "deprecated": true,
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "value": {
                                                  "description": "Enum option value",
                                                  "type": "string"
                                                },
                                                "label": {
                                                  "description": "Enum option display label",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "value",
                                                "label"
                                              ],
                                              "additionalProperties": false
                                            }
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "label",
                                          "type",
                                          "description"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "autoExecute": {
                                      "description": "Auto-execute configuration",
                                      "type": "object",
                                      "properties": {
                                        "open": {
                                          "description": "Whether to trigger execution automatically when opening a chat",
                                          "type": "boolean"
                                        },
                                        "defaultPrompt": {
                                          "description": "Default prompt injected during auto-execution",
                                          "default": "",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "open",
                                        "defaultPrompt"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "questionGuide": {
                                      "description": "Follow-up question suggestion configuration",
                                      "type": "object",
                                      "properties": {
                                        "open": {
                                          "description": "Whether follow-up question suggestions are enabled",
                                          "type": "boolean"
                                        },
                                        "modelId": {
                                          "description": "Model ID used to generate follow-up question suggestions",
                                          "type": "string"
                                        },
                                        "model": {
                                          "description": "Legacy model identifier for follow-up suggestions",
                                          "deprecated": true,
                                          "type": "string"
                                        },
                                        "customPrompt": {
                                          "description": "Custom prompt appended for follow-up suggestions",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "open"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "ttsConfig": {
                                      "description": "Text-to-speech (TTS) configuration",
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "description": "TTS output mode: disabled, browser TTS, or model TTS",
                                          "type": "string",
                                          "enum": [
                                            "none",
                                            "web",
                                            "model"
                                          ]
                                        },
                                        "modelId": {
                                          "description": "TTS model ID used for speech synthesis",
                                          "type": "string"
                                        },
                                        "model": {
                                          "description": "TTS model name used for speech synthesis",
                                          "deprecated": true,
                                          "type": "string"
                                        },
                                        "voice": {
                                          "description": "TTS voice identifier",
                                          "type": "string"
                                        },
                                        "speed": {
                                          "description": "TTS playback speed",
                                          "type": "number"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "whisperConfig": {
                                      "description": "Speech-to-text (STT) input configuration",
                                      "type": "object",
                                      "properties": {
                                        "open": {
                                          "description": "Whether voice input transcription is enabled",
                                          "type": "boolean"
                                        },
                                        "autoSend": {
                                          "default": false,
                                          "description": "Whether to auto-send after voice transcription completes",
                                          "type": "boolean"
                                        },
                                        "autoTTSResponse": {
                                          "default": false,
                                          "description": "Whether to auto-play TTS replies after voice input",
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "open",
                                        "autoSend",
                                        "autoTTSResponse"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "scheduledTriggerConfig": {
                                      "description": "Scheduled trigger configuration",
                                      "type": "object",
                                      "properties": {
                                        "cronString": {
                                          "description": "Cron schedule expression",
                                          "type": "string"
                                        },
                                        "timezone": {
                                          "description": "Timezone used by the schedule",
                                          "type": "string"
                                        },
                                        "defaultPrompt": {
                                          "description": "Default prompt injected on scheduled runs",
                                          "default": "",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "cronString",
                                        "timezone",
                                        "defaultPrompt"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "chatInputGuide": {
                                      "description": "Chat input guide configuration",
                                      "type": "object",
                                      "properties": {
                                        "open": {
                                          "description": "Whether chat input guidance is enabled",
                                          "type": "boolean"
                                        },
                                        "customUrl": {
                                          "description": "Custom input guide page URL",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "open",
                                        "customUrl"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "fileSelectConfig": {
                                      "description": "Chat file upload configuration",
                                      "type": "object",
                                      "properties": {
                                        "maxFiles": {
                                          "description": "Maximum files allowed per chat turn",
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "canSelectFile": {
                                          "description": "Whether document files can be uploaded in chat",
                                          "type": "boolean"
                                        },
                                        "customPdfParse": {
                                          "description": "Whether custom PDF parsing is enabled",
                                          "type": "boolean"
                                        },
                                        "canSelectImg": {
                                          "description": "Whether images can be uploaded in chat",
                                          "type": "boolean"
                                        },
                                        "canSelectVideo": {
                                          "description": "Whether videos can be uploaded in chat",
                                          "type": "boolean"
                                        },
                                        "canSelectAudio": {
                                          "description": "Whether audio files can be uploaded in chat",
                                          "type": "boolean"
                                        },
                                        "canSelectCustomFileExtension": {
                                          "description": "Whether custom file extensions are allowed in chat",
                                          "type": "boolean"
                                        },
                                        "customFileExtensionList": {
                                          "description": "List of allowed custom file extensions in chat",
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        }
                                      },
                                      "additionalProperties": false
                                    },
                                    "entryPoints": {
                                      "description": "Feature menu entries shown on the chat page",
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "icon": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "name"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "instruction": {
                                      "description": "Usage instructions shown to users on the chat page",
                                      "type": "string"
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "chatModels": {
                                  "description": "Chat model",
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "name": {
                                  "description": "Application name",
                                  "type": "string",
                                  "minLength": 1
                                },
                                "avatar": {
                                  "description": "Application avatar URL",
                                  "type": "string"
                                },
                                "intro": {
                                  "description": "Application introduction",
                                  "type": "string"
                                },
                                "canUse": {
                                  "description": "Whether the resource is available",
                                  "type": "boolean"
                                },
                                "type": {
                                  "description": "Application type",
                                  "type": "string",
                                  "enum": [
                                    "folder",
                                    "toolFolder",
                                    "simple",
                                    "chatAgent",
                                    "advanced",
                                    "plugin",
                                    "toolSet",
                                    "httpToolSet",
                                    "hidden",
                                    "tool",
                                    "httpPlugin"
                                  ]
                                },
                                "pluginInputs": {
                                  "description": "Plugin input",
                                  "type": "array",
                                  "items": {
                                    "description": "Workflow node input definition",
                                    "type": "object",
                                    "properties": {
                                      "key": {
                                        "description": "Variable key used in prompts and workflow references",
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "welcomeText",
                                              "welcomeQuestions",
                                              "switch",
                                              "history",
                                              "text",
                                              "questionGuide",
                                              "tts",
                                              "whisper",
                                              "variables",
                                              "scheduleTrigger",
                                              "chatInputGuide",
                                              "autoExecute",
                                              "entryPoints",
                                              "instruction",
                                              "userChatInput",
                                              "inputFiles",
                                              "agents",
                                              "modelId",
                                              "model",
                                              "systemPrompt",
                                              "description",
                                              "system_anyInput",
                                              "system_textareaInput",
                                              "system_addInputParam",
                                              "system_forbid_stream",
                                              "system_header_secret",
                                              "system_input_config",
                                              "maxContext",
                                              "temperature",
                                              "maxToken",
                                              "aiSettings",
                                              "isResponseAnswerText",
                                              "aiChatQuoteRole",
                                              "quoteTemplate",
                                              "quotePrompt",
                                              "quoteQA",
                                              "aiChatVision",
                                              "aiChatAudio",
                                              "aiChatVideo",
                                              "aiChatExtractFiles",
                                              "stringQuoteText",
                                              "aiChatReasoning",
                                              "aiChatReasoningEffort",
                                              "aiChatTopP",
                                              "aiChatStopSign",
                                              "aiChatResponseFormat",
                                              "aiChatJsonSchema",
                                              "agent_selectedTools",
                                              "agent_datasetParams",
                                              "skills",
                                              "useAgentSandbox",
                                              "sandboxEntrypoint",
                                              "editSkillId",
                                              "datasets",
                                              "similarity",
                                              "limit",
                                              "searchMode",
                                              "embeddingWeight",
                                              "usingReRank",
                                              "rerankWeight",
                                              "rerankCandidateNum",
                                              "rerankModelId",
                                              "rerankModel",
                                              "datasetSearchUsingExtensionQuery",
                                              "datasetSearchExtensionModelId",
                                              "datasetSearchExtensionModel",
                                              "datasetSearchExtensionBg",
                                              "datasetSearchInput",
                                              "collectionFilterVersion",
                                              "collectionFilterMatch",
                                              "authTmbId",
                                              "system_datasetQuoteList",
                                              "content",
                                              "extractKeys",
                                              "system_httpReqUrl",
                                              "system_httpHeader",
                                              "system_httpMethod",
                                              "system_httpParams",
                                              "system_httpJsonBody",
                                              "system_httpFormBody",
                                              "system_httpContentType",
                                              "system_httpTimeout",
                                              "url",
                                              "app",
                                              "pluginId",
                                              "pluginStart",
                                              "condition",
                                              "ifElseList",
                                              "updateList",
                                              "code",
                                              "codeType",
                                              "fileUrlList",
                                              "userSelectOptions",
                                              "loopInputArray",
                                              "childrenNodeIdList",
                                              "nodeWidth",
                                              "nodeHeight",
                                              "loopNodeInputHeight",
                                              "loopStartInput",
                                              "loopStartIndex",
                                              "loopEndInput",
                                              "parallelRunMaxConcurrency",
                                              "parallelRunMaxRetryTimes",
                                              "loopRunMode",
                                              "loopRunInputArray",
                                              "loopCustomOutputs",
                                              "userInputForms",
                                              "commentText",
                                              "commentSize",
                                              "system_toolData",
                                              "system_toolSetData"
                                            ]
                                          },
                                          {
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "label": {
                                        "description": "Variable display label",
                                        "type": "string"
                                      },
                                      "valueType": {
                                        "description": "Variable value data type",
                                        "type": "string",
                                        "enum": [
                                          "string",
                                          "number",
                                          "boolean",
                                          "object",
                                          "arrayString",
                                          "arrayNumber",
                                          "arrayBoolean",
                                          "arrayObject",
                                          "arrayAny",
                                          "any",
                                          "chatHistory",
                                          "datasetQuote",
                                          "dynamic",
                                          "selectDataset",
                                          "selectApp"
                                        ]
                                      },
                                      "required": {
                                        "description": "Whether this variable is required",
                                        "type": "boolean"
                                      },
                                      "defaultValue": {
                                        "description": "Default value for the variable",
                                        "type": [
                                          "object",
                                          "array",
                                          "string",
                                          "number",
                                          "boolean",
                                          "null"
                                        ]
                                      },
                                      "referencePlaceholder": {
                                        "description": "Placeholder text displayed when referencing the variable",
                                        "type": "string"
                                      },
                                      "isRichText": {
                                        "description": "Whether rich-text input is enabled",
                                        "type": "boolean"
                                      },
                                      "placeholder": {
                                        "description": "Input field placeholder text",
                                        "type": "string"
                                      },
                                      "maxLength": {
                                        "description": "Maximum input character length for text variables",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "minLength": {
                                        "description": "Minimum input character length for text variables",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "markList": {
                                        "description": "Scale tick marks for numeric slider variables",
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "label": {
                                              "description": "Tick label",
                                              "type": "string"
                                            },
                                            "value": {
                                              "description": "Tick numeric value",
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "label",
                                            "value"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "step": {
                                        "description": "Numeric step increment",
                                        "type": "number"
                                      },
                                      "max": {
                                        "description": "Maximum numeric value",
                                        "type": "number"
                                      },
                                      "min": {
                                        "description": "Minimum numeric value",
                                        "type": "number"
                                      },
                                      "precision": {
                                        "description": "Decimal precision for numeric variables",
                                        "type": "number"
                                      },
                                      "canSelectFile": {
                                        "description": "Whether regular document files are allowed for this variable",
                                        "type": "boolean"
                                      },
                                      "canSelectImg": {
                                        "description": "Whether images are allowed for this variable",
                                        "type": "boolean"
                                      },
                                      "canSelectVideo": {
                                        "description": "Whether videos are allowed for this variable",
                                        "type": "boolean"
                                      },
                                      "canSelectAudio": {
                                        "description": "Whether audio files are allowed for this variable",
                                        "type": "boolean"
                                      },
                                      "canSelectCustomFileExtension": {
                                        "description": "Whether custom file extensions are allowed for this variable",
                                        "type": "boolean"
                                      },
                                      "customFileExtensionList": {
                                        "description": "List of allowed custom file extensions for this variable",
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "canLocalUpload": {
                                        "description": "Whether local file upload is allowed for this variable",
                                        "type": "boolean"
                                      },
                                      "canUrlUpload": {
                                        "description": "Whether importing files by URL is allowed for this variable",
                                        "type": "boolean"
                                      },
                                      "maxFiles": {
                                        "description": "Maximum number of files allowed for this variable",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "timeGranularity": {
                                        "description": "Granularity of time selection",
                                        "type": "string",
                                        "enum": [
                                          "day",
                                          "hour",
                                          "minute",
                                          "second"
                                        ]
                                      },
                                      "timeRangeStart": {
                                        "description": "Start timestamp of the time range variable",
                                        "type": "string"
                                      },
                                      "timeRangeEnd": {
                                        "description": "End timestamp of the time range variable",
                                        "type": "string"
                                      },
                                      "datasetOptions": {
                                        "description": "Selectable datasets for dataset-picker variables",
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "datasetId": {
                                              "description": "Selectable dataset ID",
                                              "type": "string"
                                            },
                                            "avatar": {
                                              "description": "Selectable dataset icon URL",
                                              "type": "string"
                                            },
                                            "name": {
                                              "description": "Selectable dataset name",
                                              "type": "string"
                                            },
                                            "vectorModel": {
                                              "type": "object",
                                              "properties": {
                                                "modelId": {
                                                  "description": "Embedding model ID bound to the dataset",
                                                  "type": "string"
                                                },
                                                "model": {
                                                  "description": "Embedding model identifier (legacy compatibility)",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "model"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "error": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "datasetId",
                                            "avatar",
                                            "name",
                                            "vectorModel"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "customInputConfig": {
                                        "description": "Custom input configuration in the workflow editor",
                                        "type": "object",
                                        "properties": {
                                          "selectValueTypeList": {
                                            "description": "Allowed value types for custom variable input",
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "string",
                                                "number",
                                                "boolean",
                                                "object",
                                                "arrayString",
                                                "arrayNumber",
                                                "arrayBoolean",
                                                "arrayObject",
                                                "arrayAny",
                                                "any",
                                                "chatHistory",
                                                "datasetQuote",
                                                "dynamic",
                                                "selectDataset",
                                                "selectApp"
                                              ]
                                            }
                                          },
                                          "showDefaultValue": {
                                            "description": "Whether to show default value settings in the editor",
                                            "type": "boolean"
                                          },
                                          "showDescription": {
                                            "description": "Whether to show field description settings in the editor",
                                            "type": "boolean"
                                          },
                                          "hideBottomDivider": {
                                            "description": "Whether to hide the bottom divider in variable editing",
                                            "type": "boolean"
                                          }
                                        },
                                        "additionalProperties": false
                                      },
                                      "selectedType": {
                                        "description": "Active UI render type for multi-type inputs",
                                        "type": "string",
                                        "enum": [
                                          "reference",
                                          "input",
                                          "textarea",
                                          "numberInput",
                                          "switch",
                                          "select",
                                          "multipleSelect",
                                          "JSONEditor",
                                          "addInputParam",
                                          "customVariable",
                                          "selectApp",
                                          "selectLLMModel",
                                          "settingLLMModel",
                                          "selectDataset",
                                          "selectDatasetParamsModal",
                                          "settingDatasetQuotePrompt",
                                          "hidden",
                                          "custom",
                                          "selectSkill",
                                          "selectTool",
                                          "fileSelect",
                                          "timePointSelect",
                                          "timeRangeSelect",
                                          "password",
                                          "datasetTagFilter",
                                          "off",
                                          "agentGenerated"
                                        ]
                                      },
                                      "renderTypeList": {
                                        "description": "Allowed UI render types in the workflow editor",
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "reference",
                                            "input",
                                            "textarea",
                                            "numberInput",
                                            "switch",
                                            "select",
                                            "multipleSelect",
                                            "JSONEditor",
                                            "addInputParam",
                                            "customVariable",
                                            "selectApp",
                                            "selectLLMModel",
                                            "settingLLMModel",
                                            "selectDataset",
                                            "selectDatasetParamsModal",
                                            "settingDatasetQuotePrompt",
                                            "hidden",
                                            "custom",
                                            "selectSkill",
                                            "selectTool",
                                            "fileSelect",
                                            "timePointSelect",
                                            "timeRangeSelect",
                                            "password",
                                            "datasetTagFilter",
                                            "off",
                                            "agentGenerated"
                                          ]
                                        }
                                      },
                                      "valueDesc": {
                                        "description": "Human-readable description of the input value",
                                        "type": "string"
                                      },
                                      "value": {
                                        "description": "Current node input value",
                                        "type": [
                                          "object",
                                          "array",
                                          "string",
                                          "number",
                                          "boolean",
                                          "null"
                                        ]
                                      },
                                      "debugLabel": {
                                        "description": "Input label shown in debug mode",
                                        "type": "string"
                                      },
                                      "description": {
                                        "description": "Node input description",
                                        "type": "string"
                                      },
                                      "toolDescription": {
                                        "description": "Semantic description when exposed as a tool parameter",
                                        "type": "string"
                                      },
                                      "defaultToAgentGenerated": {
                                        "description": "Whether the Agent populates this parameter by default when unset",
                                        "type": "boolean"
                                      },
                                      "canAgentGenerated": {
                                        "description": "Whether Agent auto-generation is allowed for this input",
                                        "type": "boolean"
                                      },
                                      "customJsonSchema": {
                                        "description": "Custom JSON Schema property definition for tool parameters",
                                        "type": "object",
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "additionalProperties": {}
                                      },
                                      "enum": {
                                        "description": "Deprecated: legacy enum configuration",
                                        "type": "string"
                                      },
                                      "inputList": {
                                        "description": "List of system input definitions",
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "key": {
                                              "description": "Input key name",
                                              "type": "string"
                                            },
                                            "label": {
                                              "description": "Input display label",
                                              "type": "string"
                                            },
                                            "description": {
                                              "description": "Input description",
                                              "type": "string"
                                            },
                                            "placeholder": {
                                              "description": "Input placeholder text",
                                              "type": "string"
                                            },
                                            "required": {
                                              "description": "Whether this input is required",
                                              "type": "boolean"
                                            },
                                            "inputType": {
                                              "description": "Input render component type",
                                              "type": "string",
                                              "enum": [
                                                "input",
                                                "numberInput",
                                                "secret",
                                                "switch",
                                                "select"
                                              ]
                                            },
                                            "value": {
                                              "description": "Default value or secret configuration",
                                              "anyOf": [
                                                {
                                                  "description": "Secret value type: `value` (plaintext), `secret` (encrypted), or `ref` (workflow variable reference).",
                                                  "example": {
                                                    "secret": "encrypted-value"
                                                  },
                                                  "anyOf": [
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "value": {
                                                              "allOf": [
                                                                {
                                                                  "description": "Plaintext secret value; encrypted into `secret` upon server save",
                                                                  "type": "string"
                                                                }
                                                              ],
                                                              "x-fastgpt-union-parameter": {
                                                                "label": "",
                                                                "position": "only"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "value"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": ""
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "secret": {
                                                              "allOf": [
                                                                {
                                                                  "description": "Encrypted or masked secret value",
                                                                  "type": "string"
                                                                }
                                                              ],
                                                              "x-fastgpt-union-parameter": {
                                                                "label": "",
                                                                "position": "only"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "secret"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": ""
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "ref": {
                                                          "allOf": [
                                                            {
                                                              "description": "Workflow variable reference resolved at runtime and validated against target constraints (headers must resolve to strings, system tool params to scalars).",
                                                              "anyOf": [
                                                                {
                                                                  "type": "array",
                                                                  "prefixItems": [
                                                                    {
                                                                      "type": "string",
                                                                      "minLength": 1
                                                                    },
                                                                    {
                                                                      "type": "string",
                                                                      "minLength": 1
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "minItems": 1,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                      {
                                                                        "type": "string",
                                                                        "minLength": 1
                                                                      },
                                                                      {
                                                                        "type": "string",
                                                                        "minLength": 1
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              ]
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "only"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "ref"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    }
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            "list": {
                                              "description": "Options for select-type system inputs",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "label": {
                                                    "description": "Option display label",
                                                    "type": "string"
                                                  },
                                                  "value": {
                                                    "description": "Option value",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "label",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "key",
                                            "label",
                                            "inputType"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "canEdit": {
                                        "description": "Whether this input can be edited in the editor",
                                        "type": "boolean"
                                      },
                                      "isPro": {
                                        "description": "Whether this input requires a commercial edition",
                                        "type": "boolean"
                                      },
                                      "isToolOutput": {
                                        "description": "Whether this input originates from a tool output",
                                        "type": "boolean"
                                      },
                                      "deprecated": {
                                        "description": "Whether this input is deprecated",
                                        "type": "boolean"
                                      },
                                      "list": {
                                        "description": "Options for select-type variables",
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "label": {
                                              "description": "Option display label",
                                              "type": "string"
                                            },
                                            "value": {
                                              "description": "Option underlying value",
                                              "type": "string"
                                            },
                                            "icon": {
                                              "description": "Option icon",
                                              "type": "string"
                                            },
                                            "description": {
                                              "description": "Option description",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "label",
                                            "value"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "enums": {
                                        "description": "Deprecated: legacy enum options",
                                        "deprecated": true,
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "value": {
                                              "description": "Enum option value",
                                              "type": "string"
                                            },
                                            "label": {
                                              "description": "Enum option display label",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "value",
                                            "label"
                                          ],
                                          "additionalProperties": false
                                        }
                                      }
                                    },
                                    "required": [
                                      "key",
                                      "label",
                                      "renderTypeList"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "useAgentSandbox": {
                                  "description": "Whether VM execution is enabled",
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "name",
                                "avatar",
                                "intro",
                                "type",
                                "pluginInputs"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "title",
                            "app"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "appId": {
                                  "allOf": [
                                    {
                                      "description": "Application ID; returned only for workflow builder assistant sessions",
                                      "example": "68ee0bd23d17260b7829b137",
                                      "type": "string",
                                      "pattern": "^[0-9a-fA-F]{24}$"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "skillId": {
                                  "allOf": [
                                    {
                                      "not": {}
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "sourceType": {
                                  "allOf": [
                                    {
                                      "description": "Resource type for workflow builder sessions",
                                      "type": "string",
                                      "const": "workflowBuilder"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                }
                              },
                              "required": [
                                "appId",
                                "sourceType"
                              ],
                              "additionalProperties": false,
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "appId": {
                                  "allOf": [
                                    {
                                      "description": "Application ID; returned only for `chatAgentHelper` sessions",
                                      "example": "68ee0bd23d17260b7829b137",
                                      "type": "string",
                                      "pattern": "^[0-9a-fA-F]{24}$"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "skillId": {
                                  "allOf": [
                                    {
                                      "not": {}
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "sourceType": {
                                  "allOf": [
                                    {
                                      "description": "Resource type for `chatAgentHelper` sessions",
                                      "type": "string",
                                      "const": "chatAgentHelper"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                }
                              },
                              "required": [
                                "appId",
                                "sourceType"
                              ],
                              "additionalProperties": false,
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "appId": {
                                  "allOf": [
                                    {
                                      "description": "Application ID; returned only for standard app chat sessions",
                                      "example": "68ee0bd23d17260b7829b137",
                                      "type": "string",
                                      "pattern": "^[0-9a-fA-F]{24}$"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "skillId": {
                                  "allOf": [
                                    {
                                      "not": {}
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                }
                              },
                              "required": [
                                "appId"
                              ],
                              "additionalProperties": false,
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "appId": {
                                  "allOf": [
                                    {
                                      "not": {}
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "skillId": {
                                  "allOf": [
                                    {
                                      "description": "Skill Edit debug ID; returned only for Skill Edit sessions",
                                      "example": "68ee0bd23d17260b7829b137",
                                      "type": "string",
                                      "pattern": "^[0-9a-fA-F]{24}$"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                }
                              },
                              "required": [
                                "skillId"
                              ],
                              "additionalProperties": false,
                              "description": ""
                            }
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/record/getPaginationRecords": {
      "post": {
        "summary": "List Chat Records (Paginated)",
        "description": "Retrieve paginated conversation records for a specified chat session across supported authentication modes.",
        "tags": [
          "Chat Records"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "App Chat",
                    "description": "Identify the conversation via `appId`. When both API Key and login session are supported, `Authorization` takes precedence over token/Cookie.",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "Application ID authenticated with the request header credentials allowed by this endpoint.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "Session resource type associated with `appId`. Defaults to `app`; pass the matching `sourceType` for assistant builder sessions.",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "Default Identity",
                            "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                            "anyOf": [
                              {
                                "title": "Offset Pagination",
                                "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                                "type": "object",
                                "properties": {
                                  "offset": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "first"
                                    },
                                    "example": 0,
                                    "description": "0-based offset",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "example": 20,
                                        "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "last"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "Chat ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "Whether to load custom feedback items",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "Fetch mode controlling message visibility and filtering",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "Whether to include soft-deleted messages",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "offset"
                                ]
                              },
                              {
                                "title": "Page-Number Pagination",
                                "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                                "type": "object",
                                "properties": {
                                  "pageNum": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "first"
                                    },
                                    "example": 1,
                                    "description": "1-based page number; ignored when `offset` is provided",
                                    "default": 1,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "example": 20,
                                        "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "last"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "Chat ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "Whether to load custom feedback items",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "Fetch mode controlling message visibility and filtering",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "Whether to include soft-deleted messages",
                                    "type": "boolean"
                                  }
                                },
                                "required": []
                              }
                            ]
                          },
                          {
                            "title": "Custom End-User (`customUid`)",
                            "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              }
                            },
                            "required": [
                              "customUid"
                            ],
                            "allOf": [
                              {
                                "anyOf": [
                                  {
                                    "title": "Offset Pagination",
                                    "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                                    "type": "object",
                                    "properties": {
                                      "offset": {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "x-fastgpt-union-parameter": {
                                          "label": "Pagination Parameters",
                                          "position": "first"
                                        },
                                        "example": 0,
                                        "description": "0-based offset",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "pageSize": {
                                        "allOf": [
                                          {
                                            "x-fastgpt-union-group": {
                                              "id": "pagination",
                                              "label": "Pagination Parameters"
                                            },
                                            "example": 20,
                                            "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                            "default": 20,
                                            "type": "integer",
                                            "exclusiveMinimum": 0,
                                            "maximum": 500
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "Pagination Parameters",
                                          "position": "last"
                                        }
                                      },
                                      "chatId": {
                                        "example": "chat123",
                                        "description": "Chat ID",
                                        "type": "string",
                                        "maxLength": 1024
                                      },
                                      "loadCustomFeedbacks": {
                                        "example": false,
                                        "description": "Whether to load custom feedback items",
                                        "type": "boolean"
                                      },
                                      "type": {
                                        "example": "normal",
                                        "description": "Fetch mode controlling message visibility and filtering",
                                        "type": "string",
                                        "enum": [
                                          "normal",
                                          "outLink",
                                          "home"
                                        ]
                                      },
                                      "includeDeleted": {
                                        "example": false,
                                        "description": "Whether to include soft-deleted messages",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "offset"
                                    ]
                                  },
                                  {
                                    "title": "Page-Number Pagination",
                                    "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                                    "type": "object",
                                    "properties": {
                                      "pageNum": {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "x-fastgpt-union-parameter": {
                                          "label": "Pagination Parameters",
                                          "position": "first"
                                        },
                                        "example": 1,
                                        "description": "1-based page number; ignored when `offset` is provided",
                                        "default": 1,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "pageSize": {
                                        "allOf": [
                                          {
                                            "x-fastgpt-union-group": {
                                              "id": "pagination",
                                              "label": "Pagination Parameters"
                                            },
                                            "example": 20,
                                            "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                            "default": 20,
                                            "type": "integer",
                                            "exclusiveMinimum": 0,
                                            "maximum": 500
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "Pagination Parameters",
                                          "position": "last"
                                        }
                                      },
                                      "chatId": {
                                        "example": "chat123",
                                        "description": "Chat ID",
                                        "type": "string",
                                        "maxLength": 1024
                                      },
                                      "loadCustomFeedbacks": {
                                        "example": false,
                                        "description": "Whether to load custom feedback items",
                                        "type": "boolean"
                                      },
                                      "type": {
                                        "example": "normal",
                                        "description": "Fetch mode controlling message visibility and filtering",
                                        "type": "string",
                                        "enum": [
                                          "normal",
                                          "outLink",
                                          "home"
                                        ]
                                      },
                                      "includeDeleted": {
                                        "example": false,
                                        "description": "Whether to include soft-deleted messages",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": []
                                  }
                                ]
                              },
                              {}
                            ],
                            "x-fastgpt-union-layout": true
                          },
                          {
                            "title": "Proxy Team Member (`authProxy`)",
                            "description": "Act on behalf of another member in the same team via `authProxy`. Available only on personal API keys with `authProxy` enabled; mutually exclusive with `customUid`.",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key proxy caller identity. Available only for personal keys with `authProxy` enabled; specify `tmbId` or `username` (`tmbId` takes precedence without falling back to `username` on invalid ID).",
                                    "anyOf": [
                                      {
                                        "title": "By Team Member ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "Proxied team member ID (`tmbId`), takes precedence over `username`",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "By Username",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "Proxied team member username",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              }
                            },
                            "required": [
                              "authProxy"
                            ],
                            "allOf": [
                              {
                                "anyOf": [
                                  {
                                    "title": "Offset Pagination",
                                    "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                                    "type": "object",
                                    "properties": {
                                      "offset": {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "x-fastgpt-union-parameter": {
                                          "label": "Pagination Parameters",
                                          "position": "first"
                                        },
                                        "example": 0,
                                        "description": "0-based offset",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "pageSize": {
                                        "allOf": [
                                          {
                                            "x-fastgpt-union-group": {
                                              "id": "pagination",
                                              "label": "Pagination Parameters"
                                            },
                                            "example": 20,
                                            "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                            "default": 20,
                                            "type": "integer",
                                            "exclusiveMinimum": 0,
                                            "maximum": 500
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "Pagination Parameters",
                                          "position": "last"
                                        }
                                      },
                                      "chatId": {
                                        "example": "chat123",
                                        "description": "Chat ID",
                                        "type": "string",
                                        "maxLength": 1024
                                      },
                                      "loadCustomFeedbacks": {
                                        "example": false,
                                        "description": "Whether to load custom feedback items",
                                        "type": "boolean"
                                      },
                                      "type": {
                                        "example": "normal",
                                        "description": "Fetch mode controlling message visibility and filtering",
                                        "type": "string",
                                        "enum": [
                                          "normal",
                                          "outLink",
                                          "home"
                                        ]
                                      },
                                      "includeDeleted": {
                                        "example": false,
                                        "description": "Whether to include soft-deleted messages",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "offset"
                                    ]
                                  },
                                  {
                                    "title": "Page-Number Pagination",
                                    "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                                    "type": "object",
                                    "properties": {
                                      "pageNum": {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "x-fastgpt-union-parameter": {
                                          "label": "Pagination Parameters",
                                          "position": "first"
                                        },
                                        "example": 1,
                                        "description": "1-based page number; ignored when `offset` is provided",
                                        "default": 1,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "pageSize": {
                                        "allOf": [
                                          {
                                            "x-fastgpt-union-group": {
                                              "id": "pagination",
                                              "label": "Pagination Parameters"
                                            },
                                            "example": 20,
                                            "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                            "default": 20,
                                            "type": "integer",
                                            "exclusiveMinimum": 0,
                                            "maximum": 500
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "Pagination Parameters",
                                          "position": "last"
                                        }
                                      },
                                      "chatId": {
                                        "example": "chat123",
                                        "description": "Chat ID",
                                        "type": "string",
                                        "maxLength": 1024
                                      },
                                      "loadCustomFeedbacks": {
                                        "example": false,
                                        "description": "Whether to load custom feedback items",
                                        "type": "boolean"
                                      },
                                      "type": {
                                        "example": "normal",
                                        "description": "Fetch mode controlling message visibility and filtering",
                                        "type": "string",
                                        "enum": [
                                          "normal",
                                          "outLink",
                                          "home"
                                        ]
                                      },
                                      "includeDeleted": {
                                        "example": false,
                                        "description": "Whether to include soft-deleted messages",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": []
                                  }
                                ]
                              },
                              {}
                            ],
                            "x-fastgpt-union-layout": true
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill Debug Session",
                    "description": "Identify the debug session via `skillId` (takes precedence over `appId` and ignores `sourceType`), authenticated with allowed request header credentials.",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit debug ID authenticated with allowed request header credentials.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      }
                    },
                    "required": [
                      "skillId"
                    ],
                    "allOf": [
                      {
                        "allOf": [
                          {
                            "title": "Skill Debug Session",
                            "description": "Identify the debug session via `skillId` (takes precedence over `appId` and ignores `sourceType`), authenticated with allowed request header credentials.",
                            "type": "object",
                            "properties": {},
                            "required": []
                          },
                          {
                            "anyOf": [
                              {
                                "title": "Offset Pagination",
                                "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                                "type": "object",
                                "properties": {
                                  "offset": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "first"
                                    },
                                    "example": 0,
                                    "description": "0-based offset",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "example": 20,
                                        "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "last"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "Chat ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "Whether to load custom feedback items",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "Fetch mode controlling message visibility and filtering",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "Whether to include soft-deleted messages",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "offset"
                                ]
                              },
                              {
                                "title": "Page-Number Pagination",
                                "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                                "type": "object",
                                "properties": {
                                  "pageNum": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "first"
                                    },
                                    "example": 1,
                                    "description": "1-based page number; ignored when `offset` is provided",
                                    "default": 1,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "example": 20,
                                        "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "last"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "Chat ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "Whether to load custom feedback items",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "Fetch mode controlling message visibility and filtering",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "Whether to include soft-deleted messages",
                                    "type": "boolean"
                                  }
                                }
                              }
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Share-Link Chat",
                    "description": "Resolves the underlying app via `outLinkAuthData`, taking precedence over `skillId` and `appId` (ignoring `sourceType`). Protected links still validate login cookies/tokens and never fall back to standard auth on failure.",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "Share-link auth payload (`shareId` / `outLinkUid`). Overrides `skillId` and `appId`; protected links still validate login session cookies/tokens.",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "Share link ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "External share user ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      }
                    },
                    "required": [
                      "outLinkAuthData"
                    ],
                    "allOf": [
                      {
                        "allOf": [
                          {
                            "title": "Share-Link Chat",
                            "description": "Resolves the underlying app via `outLinkAuthData`, taking precedence over `skillId` and `appId` (ignoring `sourceType`). Protected links still validate login cookies/tokens and never fall back to standard auth on failure.",
                            "type": "object",
                            "properties": {},
                            "required": []
                          },
                          {
                            "anyOf": [
                              {
                                "title": "Offset Pagination",
                                "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                                "type": "object",
                                "properties": {
                                  "offset": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "first"
                                    },
                                    "example": 0,
                                    "description": "0-based offset",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "example": 20,
                                        "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "last"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "Chat ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "Whether to load custom feedback items",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "Fetch mode controlling message visibility and filtering",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "Whether to include soft-deleted messages",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "offset"
                                ]
                              },
                              {
                                "title": "Page-Number Pagination",
                                "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                                "type": "object",
                                "properties": {
                                  "pageNum": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "first"
                                    },
                                    "example": 1,
                                    "description": "1-based page number; ignored when `offset` is provided",
                                    "default": 1,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "example": 20,
                                        "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "last"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "Chat ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "Whether to load custom feedback items",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "Fetch mode controlling message visibility and filtering",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "Whether to include soft-deleted messages",
                                    "type": "boolean"
                                  }
                                }
                              }
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "App API Key (no appId required)",
                    "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                    "anyOf": [
                      {
                        "title": "Default Identity",
                        "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                        "anyOf": [
                          {
                            "title": "Offset Pagination",
                            "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                            "type": "object",
                            "properties": {
                              "offset": {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "Pagination Parameters"
                                },
                                "x-fastgpt-union-parameter": {
                                  "label": "Pagination Parameters",
                                  "position": "first"
                                },
                                "example": 0,
                                "description": "0-based offset",
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "pageSize": {
                                "allOf": [
                                  {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "example": 20,
                                    "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                    "default": 20,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 500
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "Pagination Parameters",
                                  "position": "last"
                                }
                              },
                              "chatId": {
                                "example": "chat123",
                                "description": "Chat ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "loadCustomFeedbacks": {
                                "example": false,
                                "description": "Whether to load custom feedback items",
                                "type": "boolean"
                              },
                              "type": {
                                "example": "normal",
                                "description": "Fetch mode controlling message visibility and filtering",
                                "type": "string",
                                "enum": [
                                  "normal",
                                  "outLink",
                                  "home"
                                ]
                              },
                              "includeDeleted": {
                                "example": false,
                                "description": "Whether to include soft-deleted messages",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "offset"
                            ]
                          },
                          {
                            "title": "Page-Number Pagination",
                            "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                            "type": "object",
                            "properties": {
                              "pageNum": {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "Pagination Parameters"
                                },
                                "x-fastgpt-union-parameter": {
                                  "label": "Pagination Parameters",
                                  "position": "first"
                                },
                                "example": 1,
                                "description": "1-based page number; ignored when `offset` is provided",
                                "default": 1,
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              "pageSize": {
                                "allOf": [
                                  {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "example": 20,
                                    "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                    "default": 20,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 500
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "Pagination Parameters",
                                  "position": "last"
                                }
                              },
                              "chatId": {
                                "example": "chat123",
                                "description": "Chat ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "loadCustomFeedbacks": {
                                "example": false,
                                "description": "Whether to load custom feedback items",
                                "type": "boolean"
                              },
                              "type": {
                                "example": "normal",
                                "description": "Fetch mode controlling message visibility and filtering",
                                "type": "string",
                                "enum": [
                                  "normal",
                                  "outLink",
                                  "home"
                                ]
                              },
                              "includeDeleted": {
                                "example": false,
                                "description": "Whether to include soft-deleted messages",
                                "type": "boolean"
                              }
                            },
                            "required": []
                          }
                        ]
                      },
                      {
                        "title": "Custom End-User (`customUid`)",
                        "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          }
                        },
                        "required": [
                          "customUid"
                        ],
                        "allOf": [
                          {
                            "anyOf": [
                              {
                                "title": "Offset Pagination",
                                "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                                "type": "object",
                                "properties": {
                                  "offset": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "first"
                                    },
                                    "example": 0,
                                    "description": "0-based offset",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "example": 20,
                                        "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "last"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "Chat ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "Whether to load custom feedback items",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "Fetch mode controlling message visibility and filtering",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "Whether to include soft-deleted messages",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "offset"
                                ]
                              },
                              {
                                "title": "Page-Number Pagination",
                                "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                                "type": "object",
                                "properties": {
                                  "pageNum": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "first"
                                    },
                                    "example": 1,
                                    "description": "1-based page number; ignored when `offset` is provided",
                                    "default": 1,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "Pagination Parameters"
                                        },
                                        "example": 20,
                                        "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "Pagination Parameters",
                                      "position": "last"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "Chat ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "Whether to load custom feedback items",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "Fetch mode controlling message visibility and filtering",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "Whether to include soft-deleted messages",
                                    "type": "boolean"
                                  }
                                },
                                "required": []
                              }
                            ]
                          },
                          {}
                        ],
                        "x-fastgpt-union-layout": true
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "offset": 0
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully returned chat records",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "items": {
                            "type": "object",
                            "additionalProperties": true
                          },
                          "description": "Chat record list",
                          "type": "array"
                        },
                        "total": {
                          "example": 10,
                          "description": "Total count",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "list",
                        "total"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/record/getRecords_v2": {
      "post": {
        "summary": "List Chat Records by Cursor",
        "description": "Fetches the latest messages by default in chronological order. Provide at most one of `prevId` (targets Human turn boundary), `nextId`, or `initialId` (targets AI turn boundary). Pass `prevCursor`/`nextCursor` directly to `prevId`/`nextId` (`null` when no further page exists). Returned count may slightly exceed `pageSize` to complete turn boundaries.",
        "tags": [
          "Chat Records"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "not": {
                  "required": [
                    "role"
                  ]
                },
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "title": "App Chat",
                        "description": "Identify the conversation via `appId`. When both API Key and login session are supported, `Authorization` takes precedence over token/Cookie.",
                        "properties": {
                          "appId": {
                            "allOf": [
                              {
                                "example": "68ad85a7463006c963799a05",
                                "description": "Application ID authenticated with the request header credentials allowed by this endpoint.",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "first"
                            }
                          },
                          "sourceType": {
                            "allOf": [
                              {
                                "example": "chatAgentHelper",
                                "description": "Session resource type associated with `appId`. Defaults to `app`; pass the matching `sourceType` for assistant builder sessions.",
                                "type": "string",
                                "enum": [
                                  "app",
                                  "chatAgentHelper",
                                  "workflowBuilder"
                                ]
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "last"
                            }
                          }
                        },
                        "required": [
                          "appId"
                        ],
                        "allOf": [
                          {
                            "anyOf": [
                              {
                                "title": "Default Identity",
                                "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                                "type": "object",
                                "properties": {
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "Chat ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "Whether to load custom feedback items",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "Fetch mode controlling message visibility and filtering",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "Whether to include soft-deleted messages",
                                    "type": "boolean"
                                  }
                                },
                                "required": []
                              },
                              {
                                "title": "Custom End-User (`customUid`)",
                                "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                                "type": "object",
                                "properties": {
                                  "customUid": {
                                    "allOf": [
                                      {
                                        "example": "customer-42",
                                        "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1024
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "only"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "Chat ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "Whether to load custom feedback items",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "Fetch mode controlling message visibility and filtering",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "Whether to include soft-deleted messages",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "customUid"
                                ]
                              },
                              {
                                "title": "Proxy Team Member (`authProxy`)",
                                "description": "Act on behalf of another member in the same team via `authProxy`. Available only on personal API keys with `authProxy` enabled; mutually exclusive with `customUid`.",
                                "type": "object",
                                "properties": {
                                  "authProxy": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "description": "API Key proxy caller identity. Available only for personal keys with `authProxy` enabled; specify `tmbId` or `username` (`tmbId` takes precedence without falling back to `username` on invalid ID).",
                                        "anyOf": [
                                          {
                                            "title": "By Team Member ID",
                                            "type": "object",
                                            "properties": {
                                              "tmbId": {
                                                "allOf": [
                                                  {
                                                    "description": "Proxied team member ID (`tmbId`), takes precedence over `username`",
                                                    "example": "68ee0bd23d17260b7829b137",
                                                    "type": "string",
                                                    "pattern": "^[0-9a-fA-F]{24}$"
                                                  }
                                                ],
                                                "x-fastgpt-union-parameter": {
                                                  "label": "",
                                                  "position": "only"
                                                }
                                              }
                                            },
                                            "required": [
                                              "tmbId"
                                            ],
                                            "description": ""
                                          },
                                          {
                                            "title": "By Username",
                                            "type": "object",
                                            "properties": {
                                              "username": {
                                                "allOf": [
                                                  {
                                                    "example": "user@example.com",
                                                    "description": "Proxied team member username",
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 128
                                                  }
                                                ],
                                                "x-fastgpt-union-parameter": {
                                                  "label": "",
                                                  "position": "only"
                                                }
                                              }
                                            },
                                            "required": [
                                              "username"
                                            ],
                                            "description": ""
                                          }
                                        ]
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "only"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "Chat ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "Whether to load custom feedback items",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "Fetch mode controlling message visibility and filtering",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "Whether to include soft-deleted messages",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "authProxy"
                                ]
                              }
                            ]
                          },
                          {}
                        ],
                        "x-fastgpt-union-layout": true
                      },
                      {
                        "title": "Skill Debug Session",
                        "description": "Identify the debug session via `skillId` (takes precedence over `appId` and ignores `sourceType`), authenticated with allowed request header credentials.",
                        "type": "object",
                        "properties": {
                          "skillId": {
                            "allOf": [
                              {
                                "example": "68ad85a7463006c963799a06",
                                "description": "Skill Edit debug ID authenticated with allowed request header credentials.",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "example": "chat123",
                            "description": "Chat ID",
                            "type": "string",
                            "maxLength": 1024
                          },
                          "loadCustomFeedbacks": {
                            "example": false,
                            "description": "Whether to load custom feedback items",
                            "type": "boolean"
                          },
                          "type": {
                            "example": "normal",
                            "description": "Fetch mode controlling message visibility and filtering",
                            "type": "string",
                            "enum": [
                              "normal",
                              "outLink",
                              "home"
                            ]
                          },
                          "includeDeleted": {
                            "example": false,
                            "description": "Whether to include soft-deleted messages",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "skillId"
                        ]
                      },
                      {
                        "title": "Share-Link Chat",
                        "description": "Resolves the underlying app via `outLinkAuthData`, taking precedence over `skillId` and `appId` (ignoring `sourceType`). Protected links still validate login cookies/tokens and never fall back to standard auth on failure.",
                        "type": "object",
                        "properties": {
                          "outLinkAuthData": {
                            "allOf": [
                              {
                                "description": "Share-link auth payload (`shareId` / `outLinkUid`). Overrides `skillId` and `appId`; protected links still validate login session cookies/tokens.",
                                "type": "object",
                                "properties": {
                                  "shareId": {
                                    "description": "Share link ID",
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "outLinkUid": {
                                    "description": "External share user ID",
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "shareId",
                                  "outLinkUid"
                                ]
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "example": "chat123",
                            "description": "Chat ID",
                            "type": "string",
                            "maxLength": 1024
                          },
                          "loadCustomFeedbacks": {
                            "example": false,
                            "description": "Whether to load custom feedback items",
                            "type": "boolean"
                          },
                          "type": {
                            "example": "normal",
                            "description": "Fetch mode controlling message visibility and filtering",
                            "type": "string",
                            "enum": [
                              "normal",
                              "outLink",
                              "home"
                            ]
                          },
                          "includeDeleted": {
                            "example": false,
                            "description": "Whether to include soft-deleted messages",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "outLinkAuthData"
                        ]
                      },
                      {
                        "title": "App API Key (no appId required)",
                        "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                        "anyOf": [
                          {
                            "title": "Default Identity",
                            "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "example": "chat123",
                                "description": "Chat ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "loadCustomFeedbacks": {
                                "example": false,
                                "description": "Whether to load custom feedback items",
                                "type": "boolean"
                              },
                              "type": {
                                "example": "normal",
                                "description": "Fetch mode controlling message visibility and filtering",
                                "type": "string",
                                "enum": [
                                  "normal",
                                  "outLink",
                                  "home"
                                ]
                              },
                              "includeDeleted": {
                                "example": false,
                                "description": "Whether to include soft-deleted messages",
                                "type": "boolean"
                              }
                            },
                            "required": []
                          },
                          {
                            "title": "Custom End-User (`customUid`)",
                            "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "example": "chat123",
                                "description": "Chat ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "loadCustomFeedbacks": {
                                "example": false,
                                "description": "Whether to load custom feedback items",
                                "type": "boolean"
                              },
                              "type": {
                                "example": "normal",
                                "description": "Fetch mode controlling message visibility and filtering",
                                "type": "string",
                                "enum": [
                                  "normal",
                                  "outLink",
                                  "home"
                                ]
                              },
                              "includeDeleted": {
                                "example": false,
                                "description": "Whether to include soft-deleted messages",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "customUid"
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "not": {
                      "anyOf": [
                        {
                          "required": [
                            "prevId",
                            "nextId"
                          ]
                        },
                        {
                          "required": [
                            "prevId",
                            "initialId"
                          ]
                        },
                        {
                          "required": [
                            "nextId",
                            "initialId"
                          ]
                        }
                      ]
                    },
                    "anyOf": [
                      {
                        "title": "Page Backward (`prevId`)",
                        "type": "object",
                        "properties": {
                          "prevId": {
                            "allOf": [
                              {
                                "example": "68ad85a7463006c963799a04",
                                "description": "Cursor data ID for paging backward",
                                "type": "string"
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "pageSize": {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "Pagination Parameters"
                            },
                            "example": 20,
                            "description": "Target messages per page (default 20, max 500; may be slightly exceeded to complete turn boundaries)",
                            "default": 20,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 500
                          },
                          "anchor": {
                            "type": [
                              "object",
                              "array",
                              "string",
                              "number",
                              "boolean",
                              "null"
                            ],
                            "description": "Current anchor position (such as `chunkIndex`)"
                          }
                        },
                        "required": [
                          "prevId"
                        ],
                        "description": ""
                      },
                      {
                        "title": "Page Forward (`nextId`)",
                        "type": "object",
                        "properties": {
                          "nextId": {
                            "allOf": [
                              {
                                "example": "68ad85a7463006c963799a06",
                                "description": "Cursor data ID for paging forward",
                                "type": "string"
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "pageSize": {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "Pagination Parameters"
                            },
                            "example": 20,
                            "description": "Target messages per page (default 20, max 500; may be slightly exceeded to complete turn boundaries)",
                            "default": 20,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 500
                          },
                          "anchor": {
                            "type": [
                              "object",
                              "array",
                              "string",
                              "number",
                              "boolean",
                              "null"
                            ],
                            "description": "Current anchor position (such as `chunkIndex`)"
                          }
                        },
                        "required": [
                          "nextId"
                        ],
                        "description": ""
                      },
                      {
                        "title": "Anchor Record (`initialId`)",
                        "type": "object",
                        "properties": {
                          "initialId": {
                            "allOf": [
                              {
                                "example": "68ad85a7463006c963799a05",
                                "description": "Initial anchor message data ID",
                                "type": "string"
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "pageSize": {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "Pagination Parameters"
                            },
                            "example": 20,
                            "description": "Target messages per page (default 20, max 500; may be slightly exceeded to complete turn boundaries)",
                            "default": 20,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 500
                          },
                          "anchor": {
                            "type": [
                              "object",
                              "array",
                              "string",
                              "number",
                              "boolean",
                              "null"
                            ],
                            "description": "Current anchor position (such as `chunkIndex`)"
                          }
                        },
                        "required": [
                          "initialId"
                        ],
                        "description": ""
                      },
                      {
                        "title": "Default Latest Page",
                        "type": "object",
                        "properties": {
                          "pageSize": {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "Pagination Parameters"
                            },
                            "example": 20,
                            "description": "Target messages per page (default 20, max 500; may be slightly exceeded to complete turn boundaries)",
                            "default": 20,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 500
                          },
                          "anchor": {
                            "type": [
                              "object",
                              "array",
                              "string",
                              "number",
                              "boolean",
                              "null"
                            ],
                            "description": "Current anchor position (such as `chunkIndex`)"
                          }
                        }
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "prevId": "68ad85a7463006c963799a04"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully returned chat records",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "hasMorePrev": {
                          "example": false,
                          "description": "Whether earlier messages exist before the current slice",
                          "type": "boolean"
                        },
                        "hasMoreNext": {
                          "example": true,
                          "description": "Whether newer messages exist after the current slice",
                          "type": "boolean"
                        },
                        "list": {
                          "description": "Chronological list of chat records (use `dataId` as the canonical identifier)",
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "obj": {
                                    "allOf": [
                                      {
                                        "type": "string",
                                        "const": "Human"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "first"
                                    }
                                  },
                                  "value": {
                                    "allOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "askId": {
                                              "deprecated": true,
                                              "description": "Legacy user reply interactive ID retained for compatibility; no longer populated on new messages",
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "select": {
                                              "oneOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "allOf": [
                                                        {
                                                          "description": "Q&A input type",
                                                          "type": "string",
                                                          "const": "agentAsk"
                                                        }
                                                      ],
                                                      "x-fastgpt-union-parameter": {
                                                        "label": "",
                                                        "position": "first"
                                                      }
                                                    },
                                                    "questions": {
                                                      "allOf": [
                                                        {
                                                          "description": "User answers ordered by question",
                                                          "minItems": 1,
                                                          "type": "array",
                                                          "items": {
                                                            "type": "object",
                                                            "properties": {
                                                              "question": {
                                                                "description": "Question snapshot at prompt time",
                                                                "type": "string"
                                                              },
                                                              "value": {
                                                                "description": "User answer text (selected option or custom text); empty string means skipped",
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "question",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        }
                                                      ],
                                                      "x-fastgpt-union-parameter": {
                                                        "label": "",
                                                        "position": "last"
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "questions"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": ""
                                                },
                                                {
                                                  "oneOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "workflowBuilderPreview"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "only"
                                                          }
                                                        },
                                                        "action": {
                                                          "allOf": [
                                                            {
                                                              "description": "Confirm plan and start building",
                                                              "type": "string",
                                                              "const": "confirm"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "only"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "action"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "workflowBuilderPreview"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "only"
                                                          }
                                                        },
                                                        "action": {
                                                          "allOf": [
                                                            {
                                                              "description": "Cancel this build",
                                                              "type": "string",
                                                              "const": "cancel"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "only"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "action"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "workflowBuilderPreview"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "only"
                                                          }
                                                        },
                                                        "action": {
                                                          "allOf": [
                                                            {
                                                              "description": "Modify plan",
                                                              "type": "string",
                                                              "const": "revise"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "reviseText": {
                                                          "allOf": [
                                                            {
                                                              "description": "Specific revision feedback for the plan; cannot be empty",
                                                              "type": "string",
                                                              "minLength": 1
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "action",
                                                        "reviseText"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    }
                                                  ],
                                                  "type": "object"
                                                }
                                              ],
                                              "type": "object"
                                            },
                                            "text": {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "file": {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "image",
                                                    "audio",
                                                    "video",
                                                    "document",
                                                    "unknown",
                                                    "file"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "key": {
                                                  "type": "string"
                                                },
                                                "url": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "url"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "additionalProperties": false
                                        }
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "hideInUI": {
                                    "allOf": [
                                      {
                                        "type": "boolean"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "last"
                                    }
                                  },
                                  "useAgentSandbox": {
                                    "type": "boolean"
                                  },
                                  "totalQuoteList": {
                                    "type": "array",
                                    "items": {
                                      "anyOf": [
                                        {
                                          "description": "Dataset search result item",
                                          "type": "object",
                                          "properties": {
                                            "q": {
                                              "allOf": [
                                                {
                                                  "description": "Primary chunk content / question",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "first"
                                              }
                                            },
                                            "a": {
                                              "allOf": [
                                                {
                                                  "description": "Supplementary answer / text",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "imageId": {
                                              "allOf": [
                                                {
                                                  "description": "Image ID",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "imagePreivewUrl": {
                                              "allOf": [
                                                {
                                                  "description": "Image preview URL",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "updateTime": {
                                              "allOf": [
                                                {
                                                  "description": "Update time",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "indexStatus": {
                                              "allOf": [
                                                {
                                                  "description": "Index status (absent on legacy already-indexed records)",
                                                  "type": "string",
                                                  "enum": [
                                                    "indexing",
                                                    "indexed",
                                                    "error",
                                                    "rebuildIndexPending",
                                                    "rebuildIndexRunning",
                                                    "rebuildIndexFailed",
                                                    "rebuildSynonymPending",
                                                    "rebuildSynonymRunning",
                                                    "rebuildSynonymFailed"
                                                  ]
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "indexErrorMsg": {
                                              "allOf": [
                                                {
                                                  "description": "Indexing error details",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "imageDescMap": {
                                              "allOf": [
                                                {
                                                  "description": "Image description mapping",
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {
                                                    "type": "string"
                                                  }
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "metadata": {
                                              "allOf": [
                                                {
                                                  "description": "Custom metadata",
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {}
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "synonymMappings": {
                                              "allOf": [
                                                {
                                                  "description": "Mapping from original terms appearing in chunks or user questions to canonical terms",
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {
                                                    "type": "string"
                                                  }
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "last"
                                              }
                                            },
                                            "id": {
                                              "description": "Data item ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "datasetId": {
                                              "description": "Dataset ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "collectionId": {
                                              "description": "Collection ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "sourceName": {
                                              "description": "Source name",
                                              "type": "string"
                                            },
                                            "sourceId": {
                                              "description": "Source ID",
                                              "type": "string"
                                            },
                                            "chunkIndex": {
                                              "description": "Chunk index",
                                              "type": "number"
                                            },
                                            "score": {
                                              "description": "Retrieval score breakdown list",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "description": "Score type",
                                                    "type": "string",
                                                    "enum": [
                                                      "embedding",
                                                      "fullText",
                                                      "reRank",
                                                      "rrf"
                                                    ]
                                                  },
                                                  "value": {
                                                    "description": "Score value",
                                                    "type": "number"
                                                  },
                                                  "index": {
                                                    "description": "Index",
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "value",
                                                  "index"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "retrievalRank": {
                                              "description": "Retrieval rank",
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "q",
                                            "id",
                                            "datasetId",
                                            "collectionId",
                                            "updateTime",
                                            "sourceName",
                                            "chunkIndex",
                                            "score"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "description": "Compact citation data item",
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "description": "Data item ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "chunkIndex": {
                                              "description": "Chunk index",
                                              "type": "number"
                                            },
                                            "datasetId": {
                                              "description": "Dataset ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "collectionId": {
                                              "description": "Collection ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "sourceId": {
                                              "description": "Source ID",
                                              "type": "string"
                                            },
                                            "sourceName": {
                                              "description": "Source name",
                                              "type": "string"
                                            },
                                            "score": {
                                              "description": "Retrieval score breakdown list",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "description": "Score type",
                                                    "type": "string",
                                                    "enum": [
                                                      "embedding",
                                                      "fullText",
                                                      "reRank",
                                                      "rrf"
                                                    ]
                                                  },
                                                  "value": {
                                                    "description": "Score value",
                                                    "type": "number"
                                                  },
                                                  "index": {
                                                    "description": "Index",
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "value",
                                                  "index"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "retrievalRank": {
                                              "description": "Retrieval rank",
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "chunkIndex",
                                            "datasetId",
                                            "collectionId",
                                            "sourceName",
                                            "score"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    }
                                  },
                                  "toolCiteLinks": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string"
                                        },
                                        "url": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "url"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "errorText": {
                                    "type": "object",
                                    "properties": {
                                      "moduleName": {
                                        "type": "string"
                                      },
                                      "errorText": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "moduleName",
                                      "errorText"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "llmModuleAccount": {
                                    "deprecated": true,
                                    "type": "number"
                                  },
                                  "historyPreviewLength": {
                                    "deprecated": true,
                                    "type": "number"
                                  },
                                  "_id": {
                                    "example": "68ee0bd23d17260b7829b137",
                                    "description": "ObjectId",
                                    "type": "string",
                                    "pattern": "^[0-9a-fA-F]{24}$"
                                  },
                                  "dataId": {
                                    "description": "Canonical message business ID used for details, feedback, and turn cursors",
                                    "type": "string"
                                  },
                                  "id": {
                                    "deprecated": true,
                                    "description": "Deprecated alias of `dataId` for legacy clients; use `dataId` instead",
                                    "type": "string"
                                  },
                                  "time": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "obj",
                                  "value",
                                  "dataId"
                                ],
                                "additionalProperties": {},
                                "description": ""
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "obj": {
                                    "allOf": [
                                      {
                                        "type": "string",
                                        "const": "System"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "first"
                                    }
                                  },
                                  "value": {
                                    "allOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "content": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "content"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "additionalProperties": false
                                        }
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "last"
                                    }
                                  },
                                  "useAgentSandbox": {
                                    "type": "boolean"
                                  },
                                  "totalQuoteList": {
                                    "type": "array",
                                    "items": {
                                      "anyOf": [
                                        {
                                          "description": "Dataset search result item",
                                          "type": "object",
                                          "properties": {
                                            "q": {
                                              "allOf": [
                                                {
                                                  "description": "Primary chunk content / question",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "first"
                                              }
                                            },
                                            "a": {
                                              "allOf": [
                                                {
                                                  "description": "Supplementary answer / text",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "imageId": {
                                              "allOf": [
                                                {
                                                  "description": "Image ID",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "imagePreivewUrl": {
                                              "allOf": [
                                                {
                                                  "description": "Image preview URL",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "updateTime": {
                                              "allOf": [
                                                {
                                                  "description": "Update time",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "indexStatus": {
                                              "allOf": [
                                                {
                                                  "description": "Index status (absent on legacy already-indexed records)",
                                                  "type": "string",
                                                  "enum": [
                                                    "indexing",
                                                    "indexed",
                                                    "error",
                                                    "rebuildIndexPending",
                                                    "rebuildIndexRunning",
                                                    "rebuildIndexFailed",
                                                    "rebuildSynonymPending",
                                                    "rebuildSynonymRunning",
                                                    "rebuildSynonymFailed"
                                                  ]
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "indexErrorMsg": {
                                              "allOf": [
                                                {
                                                  "description": "Indexing error details",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "imageDescMap": {
                                              "allOf": [
                                                {
                                                  "description": "Image description mapping",
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {
                                                    "type": "string"
                                                  }
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "metadata": {
                                              "allOf": [
                                                {
                                                  "description": "Custom metadata",
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {}
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "synonymMappings": {
                                              "allOf": [
                                                {
                                                  "description": "Mapping from original terms appearing in chunks or user questions to canonical terms",
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {
                                                    "type": "string"
                                                  }
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "last"
                                              }
                                            },
                                            "id": {
                                              "description": "Data item ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "datasetId": {
                                              "description": "Dataset ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "collectionId": {
                                              "description": "Collection ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "sourceName": {
                                              "description": "Source name",
                                              "type": "string"
                                            },
                                            "sourceId": {
                                              "description": "Source ID",
                                              "type": "string"
                                            },
                                            "chunkIndex": {
                                              "description": "Chunk index",
                                              "type": "number"
                                            },
                                            "score": {
                                              "description": "Retrieval score breakdown list",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "description": "Score type",
                                                    "type": "string",
                                                    "enum": [
                                                      "embedding",
                                                      "fullText",
                                                      "reRank",
                                                      "rrf"
                                                    ]
                                                  },
                                                  "value": {
                                                    "description": "Score value",
                                                    "type": "number"
                                                  },
                                                  "index": {
                                                    "description": "Index",
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "value",
                                                  "index"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "retrievalRank": {
                                              "description": "Retrieval rank",
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "q",
                                            "id",
                                            "datasetId",
                                            "collectionId",
                                            "updateTime",
                                            "sourceName",
                                            "chunkIndex",
                                            "score"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "description": "Compact citation data item",
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "description": "Data item ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "chunkIndex": {
                                              "description": "Chunk index",
                                              "type": "number"
                                            },
                                            "datasetId": {
                                              "description": "Dataset ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "collectionId": {
                                              "description": "Collection ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "sourceId": {
                                              "description": "Source ID",
                                              "type": "string"
                                            },
                                            "sourceName": {
                                              "description": "Source name",
                                              "type": "string"
                                            },
                                            "score": {
                                              "description": "Retrieval score breakdown list",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "description": "Score type",
                                                    "type": "string",
                                                    "enum": [
                                                      "embedding",
                                                      "fullText",
                                                      "reRank",
                                                      "rrf"
                                                    ]
                                                  },
                                                  "value": {
                                                    "description": "Score value",
                                                    "type": "number"
                                                  },
                                                  "index": {
                                                    "description": "Index",
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "value",
                                                  "index"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "retrievalRank": {
                                              "description": "Retrieval rank",
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "chunkIndex",
                                            "datasetId",
                                            "collectionId",
                                            "sourceName",
                                            "score"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    }
                                  },
                                  "toolCiteLinks": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string"
                                        },
                                        "url": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "url"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "errorText": {
                                    "type": "object",
                                    "properties": {
                                      "moduleName": {
                                        "type": "string"
                                      },
                                      "errorText": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "moduleName",
                                      "errorText"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "llmModuleAccount": {
                                    "deprecated": true,
                                    "type": "number"
                                  },
                                  "historyPreviewLength": {
                                    "deprecated": true,
                                    "type": "number"
                                  },
                                  "_id": {
                                    "example": "68ee0bd23d17260b7829b137",
                                    "description": "ObjectId",
                                    "type": "string",
                                    "pattern": "^[0-9a-fA-F]{24}$"
                                  },
                                  "dataId": {
                                    "description": "Canonical message business ID used for details, feedback, and turn cursors",
                                    "type": "string"
                                  },
                                  "id": {
                                    "deprecated": true,
                                    "description": "Deprecated alias of `dataId` for legacy clients; use `dataId` instead",
                                    "type": "string"
                                  },
                                  "time": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "obj",
                                  "value",
                                  "dataId"
                                ],
                                "additionalProperties": {},
                                "description": ""
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "obj": {
                                    "allOf": [
                                      {
                                        "type": "string",
                                        "const": "AI"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "first"
                                    }
                                  },
                                  "value": {
                                    "allOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "userMessage": {
                                              "description": "Server-appended hidden user instructions preserved across history loads",
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "type": "string"
                                                },
                                                "source": {
                                                  "type": "string",
                                                  "const": "server"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "source"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "inputContext": {
                                              "description": "Rewritten human input actually consumed in this turn with skill, time, and file context",
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "oneOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "select"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "select": {
                                                                "allOf": [
                                                                  {
                                                                    "oneOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "Q&A input type",
                                                                                "type": "string",
                                                                                "const": "agentAsk"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "first"
                                                                            }
                                                                          },
                                                                          "questions": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "User answers ordered by question",
                                                                                "minItems": 1,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "object",
                                                                                  "properties": {
                                                                                    "question": {
                                                                                      "description": "Question snapshot at prompt time",
                                                                                      "type": "string"
                                                                                    },
                                                                                    "value": {
                                                                                      "description": "User answer text (selected option or custom text); empty string means skipped",
                                                                                      "type": "string"
                                                                                    }
                                                                                  },
                                                                                  "required": [
                                                                                    "question",
                                                                                    "value"
                                                                                  ],
                                                                                  "additionalProperties": false
                                                                                }
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "last"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "questions"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "oneOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "type": {
                                                                                "allOf": [
                                                                                  {
                                                                                    "type": "string",
                                                                                    "const": "workflowBuilderPreview"
                                                                                  }
                                                                                ],
                                                                                "x-fastgpt-union-parameter": {
                                                                                  "label": "",
                                                                                  "position": "only"
                                                                                }
                                                                              },
                                                                              "action": {
                                                                                "allOf": [
                                                                                  {
                                                                                    "description": "Confirm plan and start building",
                                                                                    "type": "string",
                                                                                    "const": "confirm"
                                                                                  }
                                                                                ],
                                                                                "x-fastgpt-union-parameter": {
                                                                                  "label": "",
                                                                                  "position": "only"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "type",
                                                                              "action"
                                                                            ],
                                                                            "additionalProperties": false,
                                                                            "description": ""
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "type": {
                                                                                "allOf": [
                                                                                  {
                                                                                    "type": "string",
                                                                                    "const": "workflowBuilderPreview"
                                                                                  }
                                                                                ],
                                                                                "x-fastgpt-union-parameter": {
                                                                                  "label": "",
                                                                                  "position": "only"
                                                                                }
                                                                              },
                                                                              "action": {
                                                                                "allOf": [
                                                                                  {
                                                                                    "description": "Cancel this build",
                                                                                    "type": "string",
                                                                                    "const": "cancel"
                                                                                  }
                                                                                ],
                                                                                "x-fastgpt-union-parameter": {
                                                                                  "label": "",
                                                                                  "position": "only"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "type",
                                                                              "action"
                                                                            ],
                                                                            "additionalProperties": false,
                                                                            "description": ""
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "type": {
                                                                                "allOf": [
                                                                                  {
                                                                                    "type": "string",
                                                                                    "const": "workflowBuilderPreview"
                                                                                  }
                                                                                ],
                                                                                "x-fastgpt-union-parameter": {
                                                                                  "label": "",
                                                                                  "position": "only"
                                                                                }
                                                                              },
                                                                              "action": {
                                                                                "allOf": [
                                                                                  {
                                                                                    "description": "Modify plan",
                                                                                    "type": "string",
                                                                                    "const": "revise"
                                                                                  }
                                                                                ],
                                                                                "x-fastgpt-union-parameter": {
                                                                                  "label": "",
                                                                                  "position": "first"
                                                                                }
                                                                              },
                                                                              "reviseText": {
                                                                                "allOf": [
                                                                                  {
                                                                                    "description": "Specific revision feedback for the plan; cannot be empty",
                                                                                    "type": "string",
                                                                                    "minLength": 1
                                                                                  }
                                                                                ],
                                                                                "x-fastgpt-union-parameter": {
                                                                                  "label": "",
                                                                                  "position": "last"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "type",
                                                                              "action",
                                                                              "reviseText"
                                                                            ],
                                                                            "additionalProperties": false,
                                                                            "description": ""
                                                                          }
                                                                        ],
                                                                        "type": "object"
                                                                      }
                                                                    ],
                                                                    "type": "object"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              },
                                                              "key": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "select"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "text"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "text": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              },
                                                              "key": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "image_url"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "image_url": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "url": {
                                                                        "type": "string"
                                                                      },
                                                                      "detail": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "auto",
                                                                          "low",
                                                                          "high"
                                                                        ]
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "url"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              },
                                                              "key": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "image_url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "input_audio"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "input_audio": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "data": {
                                                                        "type": "string"
                                                                      },
                                                                      "format": {
                                                                        "description": "Known audio format; omit if unknown so the model endpoint infers it",
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "mp3",
                                                                          "wav",
                                                                          "ogg",
                                                                          "m4a",
                                                                          "amr",
                                                                          "mpga"
                                                                        ]
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "data"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              },
                                                              "key": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "input_audio"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "video_url"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "video_url": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "url": {
                                                                        "type": "string"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "url"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              },
                                                              "key": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "video_url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "file"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "file": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "file_data": {
                                                                        "type": "string"
                                                                      },
                                                                      "file_id": {
                                                                        "type": "string"
                                                                      },
                                                                      "filename": {
                                                                        "type": "string"
                                                                      }
                                                                    },
                                                                    "additionalProperties": false
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              },
                                                              "key": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "file"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "file_url"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "name": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "middle"
                                                                }
                                                              },
                                                              "url": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "middle"
                                                                }
                                                              },
                                                              "fileType": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "audio",
                                                                      "video",
                                                                      "document",
                                                                      "unknown",
                                                                      "file"
                                                                    ]
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              },
                                                              "key": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": ""
                                                          }
                                                        ],
                                                        "type": "object"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "id": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "modelResponseId": {
                                              "description": "Stable correlation ID for this model response",
                                              "type": "string"
                                            },
                                            "toolCallIds": {
                                              "description": "Original tool call ordering for this response, including interactive tools",
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "displayOnly": {
                                              "description": "Child tool display output excluded from parent model context",
                                              "type": "boolean"
                                            },
                                            "toolResponses": {
                                              "description": "Actual execution result from resuming a child tool, completing the original call",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "id": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "response": {
                                                    "type": "string"
                                                  },
                                                  "content": {
                                                    "description": "Structured content the subtool returns to the model when it resumes",
                                                    "type": "array",
                                                    "items": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "allOf": [
                                                                {
                                                                  "type": "string",
                                                                  "const": "text"
                                                                }
                                                              ],
                                                              "x-fastgpt-union-parameter": {
                                                                "label": "",
                                                                "position": "first"
                                                              }
                                                            },
                                                            "text": {
                                                              "allOf": [
                                                                {
                                                                  "type": "string"
                                                                }
                                                              ],
                                                              "x-fastgpt-union-parameter": {
                                                                "label": "",
                                                                "position": "last"
                                                              }
                                                            },
                                                            "key": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "text"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": ""
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "allOf": [
                                                                {
                                                                  "type": "string",
                                                                  "const": "image_url"
                                                                }
                                                              ],
                                                              "x-fastgpt-union-parameter": {
                                                                "label": "",
                                                                "position": "first"
                                                              }
                                                            },
                                                            "image_url": {
                                                              "allOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "url": {
                                                                      "type": "string"
                                                                    },
                                                                    "detail": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "auto",
                                                                        "low",
                                                                        "high"
                                                                      ]
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "url"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ],
                                                              "x-fastgpt-union-parameter": {
                                                                "label": "",
                                                                "position": "last"
                                                              }
                                                            },
                                                            "key": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "image_url"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": ""
                                                        }
                                                      ]
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "response"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "askId": {
                                              "deprecated": true,
                                              "description": "Legacy Ask correlation field; no longer written on new messages",
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "text": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "content": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "content"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "reasoning": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "content": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "content"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "tools": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "id": {
                                                        "type": "string"
                                                      },
                                                      "toolName": {
                                                        "type": "string"
                                                      },
                                                      "toolAvatar": {
                                                        "type": "string"
                                                      },
                                                      "params": {
                                                        "type": "string"
                                                      },
                                                      "response": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "content": {
                                                        "description": "Structured content the tool returns to the model",
                                                        "type": "array",
                                                        "items": {
                                                          "anyOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "type": {
                                                                  "allOf": [
                                                                    {
                                                                      "type": "string",
                                                                      "const": "text"
                                                                    }
                                                                  ],
                                                                  "x-fastgpt-union-parameter": {
                                                                    "label": "",
                                                                    "position": "first"
                                                                  }
                                                                },
                                                                "text": {
                                                                  "allOf": [
                                                                    {
                                                                      "type": "string"
                                                                    }
                                                                  ],
                                                                  "x-fastgpt-union-parameter": {
                                                                    "label": "",
                                                                    "position": "last"
                                                                  }
                                                                },
                                                                "key": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "type",
                                                                "text"
                                                              ],
                                                              "additionalProperties": false,
                                                              "description": ""
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "type": {
                                                                  "allOf": [
                                                                    {
                                                                      "type": "string",
                                                                      "const": "image_url"
                                                                    }
                                                                  ],
                                                                  "x-fastgpt-union-parameter": {
                                                                    "label": "",
                                                                    "position": "first"
                                                                  }
                                                                },
                                                                "image_url": {
                                                                  "allOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "url": {
                                                                          "type": "string"
                                                                        },
                                                                        "detail": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "auto",
                                                                            "low",
                                                                            "high"
                                                                          ]
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "url"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ],
                                                                  "x-fastgpt-union-parameter": {
                                                                    "label": "",
                                                                    "position": "last"
                                                                  }
                                                                },
                                                                "key": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "type",
                                                                "image_url"
                                                              ],
                                                              "additionalProperties": false,
                                                              "description": ""
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "hideDetails": {
                                                        "description": "Display tool metadata only without exposing parameters or response details",
                                                        "type": "boolean"
                                                      },
                                                      "hideInUI": {
                                                        "description": "Hide internal tool UI display while retaining model context",
                                                        "type": "boolean"
                                                      },
                                                      "internalOnly": {
                                                        "description": "Internal catalog tool context for server recovery only; stripped from public responses",
                                                        "type": "boolean"
                                                      },
                                                      "functionName": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "id",
                                                      "toolName",
                                                      "toolAvatar",
                                                      "params",
                                                      "functionName"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "skills": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "id": {
                                                        "type": "string"
                                                      },
                                                      "skillName": {
                                                        "type": "string"
                                                      },
                                                      "skillAvatar": {
                                                        "type": "string"
                                                      },
                                                      "description": {
                                                        "type": "string"
                                                      },
                                                      "skillMdPath": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "id",
                                                      "skillName",
                                                      "skillAvatar",
                                                      "description",
                                                      "skillMdPath"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "interactive": {
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "entryNodeIds": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "interactiveId": {
                                                      "type": "string"
                                                    },
                                                    "nodeResponseId": {
                                                      "type": "string"
                                                    },
                                                    "memoryEdges": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "source": {
                                                            "description": "Source node ID of the edge",
                                                            "type": "string"
                                                          },
                                                          "sourceHandle": {
                                                            "description": "Source output handle ID of the edge",
                                                            "type": "string"
                                                          },
                                                          "target": {
                                                            "description": "Target node ID of the edge",
                                                            "type": "string"
                                                          },
                                                          "targetHandle": {
                                                            "description": "Target input handle ID of the edge",
                                                            "type": "string"
                                                          },
                                                          "status": {
                                                            "type": "string",
                                                            "enum": [
                                                              "waiting",
                                                              "active",
                                                              "skipped"
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "source",
                                                          "sourceHandle",
                                                          "target",
                                                          "targetHandle",
                                                          "status"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "nodeOutputs": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "nodeId": {
                                                            "type": "string"
                                                          },
                                                          "key": {
                                                            "description": "Node output key referenced by downstream nodes",
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "userChatInput",
                                                                  "history",
                                                                  "answerText",
                                                                  "reasoningText",
                                                                  "success",
                                                                  "failed",
                                                                  "system_text",
                                                                  "system_addOutputParam",
                                                                  "system_rawResponse",
                                                                  "system_error",
                                                                  "system_error_text",
                                                                  "error",
                                                                  "userFiles",
                                                                  "quoteQA",
                                                                  "cqResult",
                                                                  "fields",
                                                                  "system_resultTrue",
                                                                  "system_resultFalse",
                                                                  "selectedTools",
                                                                  "httpRawResponse",
                                                                  "system_httpRawError",
                                                                  "pluginStart",
                                                                  "ifElseResult",
                                                                  "selectResult",
                                                                  "loopArray",
                                                                  "loopStartInput",
                                                                  "loopStartIndex",
                                                                  "parallelSuccessResults",
                                                                  "parallelFullResults",
                                                                  "parallelStatus",
                                                                  "currentIndex",
                                                                  "currentItem",
                                                                  "currentIteration",
                                                                  "formInputResult",
                                                                  "fileTitle"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": [
                                                              "object",
                                                              "array",
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "null"
                                                            ],
                                                            "description": "Node output value"
                                                          }
                                                        },
                                                        "required": [
                                                          "nodeId",
                                                          "key",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "skipNodeQueue": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "skippedNodeIdList": {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "skippedNodeIdList"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "usageId": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "entryNodeIds",
                                                    "memoryEdges",
                                                    "nodeOutputs"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "oneOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "userSelect"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "params": {
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "description": {
                                                                  "type": "string"
                                                                },
                                                                "userSelectOptions": {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "key": {
                                                                        "type": "string"
                                                                      },
                                                                      "value": {
                                                                        "type": "string"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "key",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                },
                                                                "userSelectedVal": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "description",
                                                                "userSelectOptions"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "params"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "userInput"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "params": {
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "description": {
                                                                  "type": "string"
                                                                },
                                                                "inputForm": {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "maxFiles": {
                                                                        "description": "Maximum files allowed per chat turn",
                                                                        "type": "integer",
                                                                        "minimum": 0,
                                                                        "maximum": 9007199254740991
                                                                      },
                                                                      "canSelectFile": {
                                                                        "description": "Whether document files can be uploaded in chat",
                                                                        "type": "boolean"
                                                                      },
                                                                      "customPdfParse": {
                                                                        "description": "Whether custom PDF parsing is enabled",
                                                                        "type": "boolean"
                                                                      },
                                                                      "canSelectImg": {
                                                                        "description": "Whether images can be uploaded in chat",
                                                                        "type": "boolean"
                                                                      },
                                                                      "canSelectVideo": {
                                                                        "description": "Whether videos can be uploaded in chat",
                                                                        "type": "boolean"
                                                                      },
                                                                      "canSelectAudio": {
                                                                        "description": "Whether audio files can be uploaded in chat",
                                                                        "type": "boolean"
                                                                      },
                                                                      "canSelectCustomFileExtension": {
                                                                        "description": "Whether custom file extensions are allowed in chat",
                                                                        "type": "boolean"
                                                                      },
                                                                      "customFileExtensionList": {
                                                                        "description": "List of allowed custom file extensions in chat",
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string"
                                                                        }
                                                                      },
                                                                      "type": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "reference",
                                                                          "input",
                                                                          "textarea",
                                                                          "numberInput",
                                                                          "switch",
                                                                          "select",
                                                                          "multipleSelect",
                                                                          "JSONEditor",
                                                                          "addInputParam",
                                                                          "customVariable",
                                                                          "selectApp",
                                                                          "selectLLMModel",
                                                                          "settingLLMModel",
                                                                          "selectDataset",
                                                                          "selectDatasetParamsModal",
                                                                          "settingDatasetQuotePrompt",
                                                                          "hidden",
                                                                          "custom",
                                                                          "selectSkill",
                                                                          "selectTool",
                                                                          "fileSelect",
                                                                          "timePointSelect",
                                                                          "timeRangeSelect",
                                                                          "password",
                                                                          "datasetTagFilter",
                                                                          "off",
                                                                          "agentGenerated"
                                                                        ]
                                                                      },
                                                                      "key": {
                                                                        "type": "string"
                                                                      },
                                                                      "label": {
                                                                        "type": "string"
                                                                      },
                                                                      "value": {
                                                                        "type": [
                                                                          "object",
                                                                          "array",
                                                                          "string",
                                                                          "number",
                                                                          "boolean",
                                                                          "null"
                                                                        ],
                                                                        "description": "Current entered value"
                                                                      },
                                                                      "valueType": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "string",
                                                                          "number",
                                                                          "boolean",
                                                                          "object",
                                                                          "arrayString",
                                                                          "arrayNumber",
                                                                          "arrayBoolean",
                                                                          "arrayObject",
                                                                          "arrayAny",
                                                                          "any",
                                                                          "chatHistory",
                                                                          "datasetQuote",
                                                                          "dynamic",
                                                                          "selectDataset",
                                                                          "selectApp"
                                                                        ]
                                                                      },
                                                                      "description": {
                                                                        "type": "string"
                                                                      },
                                                                      "defaultValue": {
                                                                        "type": [
                                                                          "object",
                                                                          "array",
                                                                          "string",
                                                                          "number",
                                                                          "boolean",
                                                                          "null"
                                                                        ],
                                                                        "description": "Default value"
                                                                      },
                                                                      "required": {
                                                                        "type": "boolean"
                                                                      },
                                                                      "timeGranularity": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "day",
                                                                          "hour",
                                                                          "minute",
                                                                          "second"
                                                                        ]
                                                                      },
                                                                      "timeRangeStart": {
                                                                        "type": "string"
                                                                      },
                                                                      "timeRangeEnd": {
                                                                        "type": "string"
                                                                      },
                                                                      "maxLength": {
                                                                        "type": "number"
                                                                      },
                                                                      "minLength": {
                                                                        "type": "number"
                                                                      },
                                                                      "max": {
                                                                        "type": "number"
                                                                      },
                                                                      "min": {
                                                                        "type": "number"
                                                                      },
                                                                      "list": {
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "label": {
                                                                              "type": "string"
                                                                            },
                                                                            "value": {
                                                                              "type": "string"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "label",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      },
                                                                      "listInputType": {
                                                                        "description": "Option source mode (`input` for static entries or `reference` for variable references)",
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "input",
                                                                          "reference"
                                                                        ]
                                                                      },
                                                                      "listReference": {
                                                                        "description": "Variable reference list for dynamic options",
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "array",
                                                                          "prefixItems": [
                                                                            {
                                                                              "type": "string"
                                                                            },
                                                                            {
                                                                              "type": "string"
                                                                            }
                                                                          ]
                                                                        }
                                                                      },
                                                                      "canLocalUpload": {
                                                                        "type": "boolean"
                                                                      },
                                                                      "canUrlUpload": {
                                                                        "type": "boolean"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "key",
                                                                      "label",
                                                                      "value",
                                                                      "valueType",
                                                                      "required"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                },
                                                                "submitted": {
                                                                  "type": "boolean"
                                                                }
                                                              },
                                                              "required": [
                                                                "description",
                                                                "inputForm"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "params"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "childrenInteractive"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "params": {
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "childrenResponse": {
                                                                  "type": "object",
                                                                  "additionalProperties": true,
                                                                  "description": "Sub-workflow interactive response"
                                                                }
                                                              },
                                                              "required": [
                                                                "childrenResponse"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "params"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "toolChildrenInteractive"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "params": {
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "toolCallId": {
                                                                  "description": "Original parent model tool call ID where resumed sub-workflow results are attached",
                                                                  "type": "string",
                                                                  "minLength": 1
                                                                },
                                                                "childrenResponse": {
                                                                  "type": "object",
                                                                  "additionalProperties": true,
                                                                  "description": "Sub-workflow interactive response"
                                                                }
                                                              },
                                                              "required": [
                                                                "toolCallId",
                                                                "childrenResponse"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "params"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "loopInteractive"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "params": {
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "loopResult": {
                                                                  "items": {
                                                                    "type": [
                                                                      "object",
                                                                      "array",
                                                                      "string",
                                                                      "number",
                                                                      "boolean",
                                                                      "null"
                                                                    ]
                                                                  },
                                                                  "description": "Per-iteration responses",
                                                                  "type": "array"
                                                                },
                                                                "childrenResponse": {
                                                                  "type": "object",
                                                                  "additionalProperties": true,
                                                                  "description": "Sub-workflow interactive response"
                                                                },
                                                                "currentIndex": {
                                                                  "type": "number"
                                                                }
                                                              },
                                                              "required": [
                                                                "loopResult",
                                                                "childrenResponse",
                                                                "currentIndex"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "params"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "loopRunInteractive"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "params": {
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "loopHistory": {
                                                                  "items": {
                                                                    "type": "object",
                                                                    "additionalProperties": true
                                                                  },
                                                                  "description": "Per-iteration snapshots",
                                                                  "type": "array"
                                                                },
                                                                "childrenResponse": {
                                                                  "type": "object",
                                                                  "additionalProperties": true,
                                                                  "description": "Sub-workflow interactive response"
                                                                },
                                                                "iteration": {
                                                                  "type": "number"
                                                                },
                                                                "pendingIterationSummary": {
                                                                  "type": "object",
                                                                  "additionalProperties": true,
                                                                  "description": "Summary of pending execution iterations"
                                                                }
                                                              },
                                                              "required": [
                                                                "loopHistory",
                                                                "childrenResponse",
                                                                "iteration"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "params"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "paymentPause"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "params": {
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "description": {
                                                                  "type": "string"
                                                                },
                                                                "continue": {
                                                                  "type": "boolean"
                                                                }
                                                              },
                                                              "additionalProperties": false
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "params"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "agentAsk"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "params": {
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "toolCallId": {
                                                                  "description": "Raw tool call ID returned by the model",
                                                                  "type": "string",
                                                                  "minLength": 1
                                                                },
                                                                "arguments": {
                                                                  "description": "Raw JSON string of tool arguments from the model, preserved verbatim without re-serialization",
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "toolCallId",
                                                                "arguments"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "params"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "workflowBuilderPreview"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "params": {
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "toolCallId": {
                                                                  "description": "Raw tool call ID returned by the model",
                                                                  "type": "string",
                                                                  "minLength": 1
                                                                },
                                                                "arguments": {
                                                                  "description": "Raw JSON string of Preview tool arguments, parsed for UI display and restored verbatim",
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "toolCallId",
                                                                "arguments"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "params"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    }
                                                  ],
                                                  "type": "object"
                                                }
                                              ]
                                            },
                                            "plan": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "planId": {
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "description": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "steps": {
                                                      "description": "List of plan steps containing at least one executable or verifiable step",
                                                      "minItems": 1,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "description": "Stable step ID used for plan updates and UI rendering",
                                                            "type": "string"
                                                          },
                                                          "name": {
                                                            "description": "Short title describing the step objective",
                                                            "type": "string"
                                                          },
                                                          "description": {
                                                            "description": "Step description detailing objectives and boundaries",
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "status": {
                                                            "description": "Step status: `pending`, `in_progress`, `done`, `blocked`, or `skipped`",
                                                            "default": "pending",
                                                            "type": "string",
                                                            "enum": [
                                                              "pending",
                                                              "in_progress",
                                                              "done",
                                                              "blocked",
                                                              "skipped"
                                                            ]
                                                          },
                                                          "note": {
                                                            "description": "Step note recording outcome, blocker reason, skip reason, or progress",
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "name",
                                                          "status"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "planId",
                                                    "name",
                                                    "steps"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "planStatus": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "status": {
                                                      "description": "Plan status: `generating` or `updating`",
                                                      "type": "string",
                                                      "enum": [
                                                        "generating",
                                                        "updating"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "status"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "agentPlanUpdate": {
                                              "anyOf": [
                                                {
                                                  "description": "Internal `update_plan` call record in the Agent loop for context recovery and UI display",
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "description": "`update_plan` tool call ID",
                                                      "type": "string"
                                                    },
                                                    "functionName": {
                                                      "description": "Plan update tool function name",
                                                      "default": "update_plan",
                                                      "type": "string"
                                                    },
                                                    "params": {
                                                      "description": "JSON argument string for `update_plan`",
                                                      "default": "",
                                                      "type": "string"
                                                    },
                                                    "response": {
                                                      "description": "Result returned to the model by `update_plan`",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "functionName",
                                                    "params"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "agentAsk": {
                                              "deprecated": true,
                                              "description": "Legacy Ask copy; new messages store `interactive` only",
                                              "anyOf": [
                                                {
                                                  "description": "Internal `ask_agent` call record in the Agent loop for follow-up context recovery and UI display",
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "description": "`ask_agent` tool call ID",
                                                      "type": "string"
                                                    },
                                                    "functionName": {
                                                      "description": "Follow-up prompt tool function name",
                                                      "default": "ask_agent",
                                                      "type": "string"
                                                    },
                                                    "params": {
                                                      "description": "JSON argument string for `ask_agent`",
                                                      "default": "",
                                                      "type": "string"
                                                    },
                                                    "askId": {
                                                      "description": "Follow-up prompt ID used to match the user response",
                                                      "type": "string",
                                                      "minLength": 1
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "functionName",
                                                    "params",
                                                    "askId"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "contextCheckpoint": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "workflowBuilderVersion": {
                                              "type": "object",
                                              "properties": {
                                                "versionNo": {
                                                  "description": "AI-generated version sequence number in the current workflow builder session",
                                                  "example": 1,
                                                  "type": "integer",
                                                  "exclusiveMinimum": 0,
                                                  "maximum": 9007199254740991
                                                },
                                                "name": {
                                                  "description": "Version display name",
                                                  "example": "AI Generated Version 1",
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "filename": {
                                                  "description": "Version JSON filename",
                                                  "example": "AI Generated Version 1.json",
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "checksum": {
                                                  "description": "SHA-256 checksum of `WorkflowDocument`",
                                                  "example": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
                                                  "type": "string",
                                                  "pattern": "^sha256:[a-f0-9]{64}$"
                                                },
                                                "generatedAt": {
                                                  "description": "Timestamp when AI generation completed",
                                                  "example": "2026-08-12T10:00:00.000Z",
                                                  "type": "string",
                                                  "format": "date-time",
                                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                                                },
                                                "s3Key": {
                                                  "description": "S3 object key where the validated generated workflow is archived",
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "expiresAt": {
                                                  "description": "S3 version expiration timestamp",
                                                  "example": "2026-08-13T10:00:00.000Z",
                                                  "type": "string",
                                                  "format": "date-time",
                                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                                                },
                                                "appliedAt": {
                                                  "description": "Timestamp when the version was first applied to the canvas",
                                                  "example": "2026-08-12T10:00:00.000Z",
                                                  "type": "string",
                                                  "format": "date-time",
                                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                                                }
                                              },
                                              "required": [
                                                "versionNo",
                                                "name",
                                                "filename",
                                                "checksum",
                                                "generatedAt"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "chatAgentBuilderVersion": {
                                              "type": "object",
                                              "properties": {
                                                "s3Key": {
                                                  "description": "S3 archive key for generation settings",
                                                  "example": "chat/chatAgentHelper/app/member/chat/config.json",
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "expiresAt": {
                                                  "description": "Expiration timestamp for generation settings",
                                                  "example": "2026-10-23T00:00:00.000Z",
                                                  "type": "string",
                                                  "format": "date-time",
                                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                                                }
                                              },
                                              "required": [
                                                "s3Key",
                                                "expiresAt"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "tool": {
                                              "deprecated": true,
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "toolName": {
                                                      "type": "string"
                                                    },
                                                    "toolAvatar": {
                                                      "type": "string"
                                                    },
                                                    "params": {
                                                      "type": "string"
                                                    },
                                                    "response": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "content": {
                                                      "description": "Structured content the tool returns to the model",
                                                      "type": "array",
                                                      "items": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "text"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "text": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              },
                                                              "key": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "image_url"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "image_url": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "url": {
                                                                        "type": "string"
                                                                      },
                                                                      "detail": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "auto",
                                                                          "low",
                                                                          "high"
                                                                        ]
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "url"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              },
                                                              "key": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "image_url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": ""
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "hideDetails": {
                                                      "description": "Display tool metadata only without exposing parameters or response details",
                                                      "type": "boolean"
                                                    },
                                                    "hideInUI": {
                                                      "description": "Hide internal tool UI display while retaining model context",
                                                      "type": "boolean"
                                                    },
                                                    "internalOnly": {
                                                      "description": "Internal catalog tool context for server recovery only; stripped from public responses",
                                                      "type": "boolean"
                                                    },
                                                    "functionName": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "toolName",
                                                    "toolAvatar",
                                                    "params",
                                                    "functionName"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "hideReason": {
                                              "type": "boolean"
                                            },
                                            "hideInUI": {
                                              "type": "boolean"
                                            }
                                          },
                                          "additionalProperties": false
                                        }
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "memories": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "additionalProperties": {}
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "userGoodFeedback": {
                                    "allOf": [
                                      {
                                        "type": "string"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "userBadFeedback": {
                                    "allOf": [
                                      {
                                        "type": "string"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "customFeedbacks": {
                                    "allOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "adminFeedback": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "feedbackDataId": {
                                            "type": "string"
                                          },
                                          "datasetId": {
                                            "type": "string"
                                          },
                                          "collectionId": {
                                            "type": "string"
                                          },
                                          "q": {
                                            "type": "string"
                                          },
                                          "a": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "feedbackDataId",
                                          "datasetId",
                                          "collectionId",
                                          "q"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "isFeedbackRead": {
                                    "allOf": [
                                      {
                                        "type": "boolean"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "durationSeconds": {
                                    "allOf": [
                                      {
                                        "type": "number"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "errorMsg": {
                                    "allOf": [
                                      {
                                        "type": "string"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "citeCollectionIds": {
                                    "allOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "responseData": {
                                    "allOf": [
                                      {
                                        "description": "Node Response",
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "moduleLogo": {
                                              "description": "Module icon URL",
                                              "type": "string"
                                            },
                                            "moduleNameArgs": {
                                              "description": "i18n interpolation parameters for the module name",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "runningTime": {
                                              "description": "Execution duration in seconds",
                                              "type": "number"
                                            },
                                            "firstTokenTime": {
                                              "description": "Time to first token in seconds",
                                              "type": "number"
                                            },
                                            "query": {
                                              "description": "Query text",
                                              "type": "string"
                                            },
                                            "textOutput": {
                                              "description": "Text output",
                                              "type": "string"
                                            },
                                            "llmRequestIds": {
                                              "description": "List of LLM request trace IDs",
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "agentPlanStatus": {
                                              "description": "Agent plan node status",
                                              "type": "string",
                                              "enum": [
                                                "set_plan",
                                                "update_plan",
                                                "ask_question"
                                              ]
                                            },
                                            "agentPlanResult": {
                                              "description": "Agent plan operation result",
                                              "type": "string"
                                            },
                                            "error": {
                                              "description": "Error details",
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {}
                                                },
                                                {
                                                  "type": "string"
                                                }
                                              ]
                                            },
                                            "errorText": {
                                              "description": "Error message text",
                                              "type": "string"
                                            },
                                            "errorCaptured": {
                                              "description": "Whether the error was caught by a catch branch",
                                              "type": "boolean"
                                            },
                                            "isToolCall": {
                                              "description": "Whether the tool node was invoked by model tool-calling (`false` indicates direct workflow execution)",
                                              "type": "boolean"
                                            },
                                            "moderationRecords": {
                                              "description": "Content moderation interception record (visible only with app write permission)",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "stage": {
                                                    "description": "Moderation stage: `entry` (user input), `model_input` (model prompt), or `output` (user output)",
                                                    "type": "string",
                                                    "enum": [
                                                      "entry",
                                                      "model_input",
                                                      "output"
                                                    ]
                                                  },
                                                  "targetField": {
                                                    "description": "Moderated field path",
                                                    "type": "string"
                                                  },
                                                  "verdict": {
                                                    "description": "Moderation verdict",
                                                    "type": "string",
                                                    "enum": [
                                                      "pass",
                                                      "suspected",
                                                      "block",
                                                      "error"
                                                    ]
                                                  },
                                                  "actionTaken": {
                                                    "description": "Enforcement action taken",
                                                    "type": "string",
                                                    "enum": [
                                                      "pass",
                                                      "block",
                                                      "replace"
                                                    ]
                                                  },
                                                  "hits": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "label": {
                                                          "type": "string"
                                                        },
                                                        "providerLabel": {
                                                          "type": "string"
                                                        },
                                                        "score": {
                                                          "type": "number"
                                                        },
                                                        "keywords": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "label"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  },
                                                  "keywords": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "content": {
                                                    "description": "Original moderated text",
                                                    "type": "string"
                                                  },
                                                  "errorMessage": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "stage",
                                                  "verdict",
                                                  "actionTaken"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "customInputs": {
                                              "description": "Custom inputs",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "customOutputs": {
                                              "description": "Custom outputs",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "nodeInputs": {
                                              "description": "Node inputs",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "nodeOutputs": {
                                              "description": "Node outputs",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "mergeSignId": {
                                              "description": "Legacy merged signature ID",
                                              "deprecated": true,
                                              "type": "string"
                                            },
                                            "parentId": {
                                              "type": "string"
                                            },
                                            "tokens": {
                                              "description": "Total tokens",
                                              "type": "number"
                                            },
                                            "inputTokens": {
                                              "description": "Input tokens",
                                              "type": "number"
                                            },
                                            "outputTokens": {
                                              "description": "Output tokens",
                                              "type": "number"
                                            },
                                            "modelId": {
                                              "description": "Model ID",
                                              "type": "string"
                                            },
                                            "model": {
                                              "description": "Legacy model identifier",
                                              "deprecated": true,
                                              "type": "string"
                                            },
                                            "contextTotalLen": {
                                              "description": "Total context length",
                                              "type": "number"
                                            },
                                            "totalPoints": {
                                              "description": "Total credit points",
                                              "type": "number"
                                            },
                                            "childResponseCount": {
                                              "type": "number"
                                            },
                                            "temperature": {
                                              "description": "Temperature",
                                              "type": "number"
                                            },
                                            "maxToken": {
                                              "description": "Max tokens",
                                              "type": "number"
                                            },
                                            "quoteList": {
                                              "description": "Dataset citation list",
                                              "type": "array",
                                              "items": {
                                                "anyOf": [
                                                  {
                                                    "description": "Dataset search result item",
                                                    "type": "object",
                                                    "properties": {
                                                      "q": {
                                                        "allOf": [
                                                          {
                                                            "description": "Primary chunk content / question",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "a": {
                                                        "allOf": [
                                                          {
                                                            "description": "Supplementary answer / text",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "imageId": {
                                                        "allOf": [
                                                          {
                                                            "description": "Image ID",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "imagePreivewUrl": {
                                                        "allOf": [
                                                          {
                                                            "description": "Image preview URL",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "updateTime": {
                                                        "allOf": [
                                                          {
                                                            "description": "Update time",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "indexStatus": {
                                                        "allOf": [
                                                          {
                                                            "description": "Index status (absent on legacy already-indexed records)",
                                                            "type": "string",
                                                            "enum": [
                                                              "indexing",
                                                              "indexed",
                                                              "error",
                                                              "rebuildIndexPending",
                                                              "rebuildIndexRunning",
                                                              "rebuildIndexFailed",
                                                              "rebuildSynonymPending",
                                                              "rebuildSynonymRunning",
                                                              "rebuildSynonymFailed"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "indexErrorMsg": {
                                                        "allOf": [
                                                          {
                                                            "description": "Indexing error details",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "imageDescMap": {
                                                        "allOf": [
                                                          {
                                                            "description": "Image description mapping",
                                                            "type": "object",
                                                            "propertyNames": {
                                                              "type": "string"
                                                            },
                                                            "additionalProperties": {
                                                              "type": "string"
                                                            }
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "metadata": {
                                                        "allOf": [
                                                          {
                                                            "description": "Custom metadata",
                                                            "type": "object",
                                                            "propertyNames": {
                                                              "type": "string"
                                                            },
                                                            "additionalProperties": {}
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "synonymMappings": {
                                                        "allOf": [
                                                          {
                                                            "description": "Mapping from original terms appearing in chunks or user questions to canonical terms",
                                                            "type": "object",
                                                            "propertyNames": {
                                                              "type": "string"
                                                            },
                                                            "additionalProperties": {
                                                              "type": "string"
                                                            }
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "id": {
                                                        "description": "Data item ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "datasetId": {
                                                        "description": "Dataset ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "collectionId": {
                                                        "description": "Collection ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "sourceName": {
                                                        "description": "Source name",
                                                        "type": "string"
                                                      },
                                                      "sourceId": {
                                                        "description": "Source ID",
                                                        "type": "string"
                                                      },
                                                      "chunkIndex": {
                                                        "description": "Chunk index",
                                                        "type": "number"
                                                      },
                                                      "score": {
                                                        "description": "Retrieval score breakdown list",
                                                        "type": "array",
                                                        "items": {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "description": "Score type",
                                                              "type": "string",
                                                              "enum": [
                                                                "embedding",
                                                                "fullText",
                                                                "reRank",
                                                                "rrf"
                                                              ]
                                                            },
                                                            "value": {
                                                              "description": "Score value",
                                                              "type": "number"
                                                            },
                                                            "index": {
                                                              "description": "Index",
                                                              "type": "number"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "value",
                                                            "index"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      },
                                                      "retrievalRank": {
                                                        "description": "Retrieval rank",
                                                        "type": "number"
                                                      }
                                                    },
                                                    "required": [
                                                      "q",
                                                      "id",
                                                      "datasetId",
                                                      "collectionId",
                                                      "updateTime",
                                                      "sourceName",
                                                      "chunkIndex",
                                                      "score"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "description": "Compact citation data item",
                                                    "type": "object",
                                                    "properties": {
                                                      "id": {
                                                        "description": "Data item ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "chunkIndex": {
                                                        "description": "Chunk index",
                                                        "type": "number"
                                                      },
                                                      "datasetId": {
                                                        "description": "Dataset ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "collectionId": {
                                                        "description": "Collection ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "sourceId": {
                                                        "description": "Source ID",
                                                        "type": "string"
                                                      },
                                                      "sourceName": {
                                                        "description": "Source name",
                                                        "type": "string"
                                                      },
                                                      "score": {
                                                        "description": "Retrieval score breakdown list",
                                                        "type": "array",
                                                        "items": {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "description": "Score type",
                                                              "type": "string",
                                                              "enum": [
                                                                "embedding",
                                                                "fullText",
                                                                "reRank",
                                                                "rrf"
                                                              ]
                                                            },
                                                            "value": {
                                                              "description": "Score value",
                                                              "type": "number"
                                                            },
                                                            "index": {
                                                              "description": "Index",
                                                              "type": "number"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "value",
                                                            "index"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      },
                                                      "retrievalRank": {
                                                        "description": "Retrieval rank",
                                                        "type": "number"
                                                      }
                                                    },
                                                    "required": [
                                                      "id",
                                                      "chunkIndex",
                                                      "datasetId",
                                                      "collectionId",
                                                      "sourceName",
                                                      "score"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            },
                                            "reasoningText": {
                                              "description": "Reasoning text",
                                              "type": "string"
                                            },
                                            "historyPreview": {
                                              "description": "Context messages preview",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "obj": {
                                                    "type": "string",
                                                    "enum": [
                                                      "System",
                                                      "Human",
                                                      "AI"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "obj",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "finishReason": {
                                              "description": "Model finish reason",
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "error",
                                                    "close",
                                                    "abnormal_close",
                                                    "stop",
                                                    "length",
                                                    "tool_calls",
                                                    "content_filter",
                                                    "function_call"
                                                  ]
                                                },
                                                {
                                                  "type": "null",
                                                  "const": null
                                                },
                                                {
                                                  "not": {}
                                                }
                                              ]
                                            },
                                            "embeddingModel": {
                                              "description": "Embedding model",
                                              "type": "string"
                                            },
                                            "embeddingTokens": {
                                              "description": "Embedding tokens",
                                              "type": "number"
                                            },
                                            "similarity": {
                                              "description": "Similarity score threshold",
                                              "type": "number"
                                            },
                                            "limit": {
                                              "description": "Token or result limit",
                                              "type": "number"
                                            },
                                            "searchMode": {
                                              "description": "Search mode",
                                              "type": "string",
                                              "enum": [
                                                "embedding",
                                                "fullTextRecall",
                                                "mixedRecall"
                                              ]
                                            },
                                            "embeddingWeight": {
                                              "description": "Embedding weight",
                                              "type": "number"
                                            },
                                            "datasetQueries": {
                                              "description": "Search query text",
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "rerankModel": {
                                              "description": "Rerank model",
                                              "type": "string"
                                            },
                                            "rerankWeight": {
                                              "description": "Rerank weight",
                                              "type": "number"
                                            },
                                            "reRankInputTokens": {
                                              "description": "Rerank input tokens",
                                              "type": "number"
                                            },
                                            "searchUsingReRank": {
                                              "description": "Whether reranking was used",
                                              "type": "boolean"
                                            },
                                            "retrievalResults": {
                                              "description": "Fused candidate set prior to deduplication/filtering (recorded only when reranking is enabled)",
                                              "type": "array",
                                              "items": {
                                                "anyOf": [
                                                  {
                                                    "description": "Dataset search result item",
                                                    "type": "object",
                                                    "properties": {
                                                      "q": {
                                                        "allOf": [
                                                          {
                                                            "description": "Primary chunk content / question",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "a": {
                                                        "allOf": [
                                                          {
                                                            "description": "Supplementary answer / text",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "imageId": {
                                                        "allOf": [
                                                          {
                                                            "description": "Image ID",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "imagePreivewUrl": {
                                                        "allOf": [
                                                          {
                                                            "description": "Image preview URL",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "updateTime": {
                                                        "allOf": [
                                                          {
                                                            "description": "Update time",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "indexStatus": {
                                                        "allOf": [
                                                          {
                                                            "description": "Index status (absent on legacy already-indexed records)",
                                                            "type": "string",
                                                            "enum": [
                                                              "indexing",
                                                              "indexed",
                                                              "error",
                                                              "rebuildIndexPending",
                                                              "rebuildIndexRunning",
                                                              "rebuildIndexFailed",
                                                              "rebuildSynonymPending",
                                                              "rebuildSynonymRunning",
                                                              "rebuildSynonymFailed"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "indexErrorMsg": {
                                                        "allOf": [
                                                          {
                                                            "description": "Indexing error details",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "imageDescMap": {
                                                        "allOf": [
                                                          {
                                                            "description": "Image description mapping",
                                                            "type": "object",
                                                            "propertyNames": {
                                                              "type": "string"
                                                            },
                                                            "additionalProperties": {
                                                              "type": "string"
                                                            }
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "metadata": {
                                                        "allOf": [
                                                          {
                                                            "description": "Custom metadata",
                                                            "type": "object",
                                                            "propertyNames": {
                                                              "type": "string"
                                                            },
                                                            "additionalProperties": {}
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "synonymMappings": {
                                                        "allOf": [
                                                          {
                                                            "description": "Mapping from original terms appearing in chunks or user questions to canonical terms",
                                                            "type": "object",
                                                            "propertyNames": {
                                                              "type": "string"
                                                            },
                                                            "additionalProperties": {
                                                              "type": "string"
                                                            }
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "id": {
                                                        "description": "Data item ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "datasetId": {
                                                        "description": "Dataset ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "collectionId": {
                                                        "description": "Collection ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "sourceName": {
                                                        "description": "Source name",
                                                        "type": "string"
                                                      },
                                                      "sourceId": {
                                                        "description": "Source ID",
                                                        "type": "string"
                                                      },
                                                      "chunkIndex": {
                                                        "description": "Chunk index",
                                                        "type": "number"
                                                      },
                                                      "score": {
                                                        "description": "Retrieval score breakdown list",
                                                        "type": "array",
                                                        "items": {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "description": "Score type",
                                                              "type": "string",
                                                              "enum": [
                                                                "embedding",
                                                                "fullText",
                                                                "reRank",
                                                                "rrf"
                                                              ]
                                                            },
                                                            "value": {
                                                              "description": "Score value",
                                                              "type": "number"
                                                            },
                                                            "index": {
                                                              "description": "Index",
                                                              "type": "number"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "value",
                                                            "index"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      },
                                                      "retrievalRank": {
                                                        "description": "Retrieval rank",
                                                        "type": "number"
                                                      }
                                                    },
                                                    "required": [
                                                      "q",
                                                      "id",
                                                      "datasetId",
                                                      "collectionId",
                                                      "updateTime",
                                                      "sourceName",
                                                      "chunkIndex",
                                                      "score"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "description": "Compact citation data item",
                                                    "type": "object",
                                                    "properties": {
                                                      "id": {
                                                        "description": "Data item ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "chunkIndex": {
                                                        "description": "Chunk index",
                                                        "type": "number"
                                                      },
                                                      "datasetId": {
                                                        "description": "Dataset ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "collectionId": {
                                                        "description": "Collection ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "sourceId": {
                                                        "description": "Source ID",
                                                        "type": "string"
                                                      },
                                                      "sourceName": {
                                                        "description": "Source name",
                                                        "type": "string"
                                                      },
                                                      "score": {
                                                        "description": "Retrieval score breakdown list",
                                                        "type": "array",
                                                        "items": {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "description": "Score type",
                                                              "type": "string",
                                                              "enum": [
                                                                "embedding",
                                                                "fullText",
                                                                "reRank",
                                                                "rrf"
                                                              ]
                                                            },
                                                            "value": {
                                                              "description": "Score value",
                                                              "type": "number"
                                                            },
                                                            "index": {
                                                              "description": "Index",
                                                              "type": "number"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "value",
                                                            "index"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      },
                                                      "retrievalRank": {
                                                        "description": "Retrieval rank",
                                                        "type": "number"
                                                      }
                                                    },
                                                    "required": [
                                                      "id",
                                                      "chunkIndex",
                                                      "datasetId",
                                                      "collectionId",
                                                      "sourceName",
                                                      "score"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            },
                                            "concatLength": {
                                              "type": "number"
                                            },
                                            "cqList": {
                                              "description": "Classification question items",
                                              "type": "array",
                                              "items": {
                                                "description": "Classification agent item",
                                                "type": "object",
                                                "properties": {
                                                  "value": {
                                                    "description": "Classification value",
                                                    "type": "string"
                                                  },
                                                  "key": {
                                                    "description": "Classification key",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "value",
                                                  "key"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "cqResult": {
                                              "description": "Classification result",
                                              "type": "string"
                                            },
                                            "extractDescription": {
                                              "description": "Extraction description",
                                              "type": "string"
                                            },
                                            "extractResult": {
                                              "description": "Extraction result",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "params": {
                                              "description": "Request parameters",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "body": {
                                              "description": "Request body",
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {}
                                                },
                                                {
                                                  "type": "string"
                                                }
                                              ]
                                            },
                                            "headers": {
                                              "description": "Request headers",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "httpResult": {
                                              "description": "HTTP response result",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "httpErrorResult": {
                                              "description": "HTTP failure result",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "toolInput": {
                                              "description": "Tool inputs",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "pluginOutput": {
                                              "description": "Plugin output",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "pluginDetail": {
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": true
                                              },
                                              "description": "Plugin execution details (recursive node responses)",
                                              "type": "array"
                                            },
                                            "toolParamsResult": {
                                              "description": "Tool argument extraction result",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "toolRes": {
                                              "type": [
                                                "object",
                                                "array",
                                                "string",
                                                "number",
                                                "boolean",
                                                "null"
                                              ],
                                              "description": "Tool Response"
                                            },
                                            "ifElseResult": {
                                              "description": "Condition evaluator result",
                                              "type": "string"
                                            },
                                            "toolCallInputTokens": {
                                              "description": "Tool-calling input tokens",
                                              "type": "number"
                                            },
                                            "toolCallOutputTokens": {
                                              "description": "Tool-calling output tokens",
                                              "type": "number"
                                            },
                                            "toolDetail": {
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": true
                                              },
                                              "description": "Tool execution details (recursive node responses)",
                                              "type": "array"
                                            },
                                            "toolStop": {
                                              "type": "boolean"
                                            },
                                            "stepQuery": {
                                              "description": "Step query",
                                              "type": "string"
                                            },
                                            "compressTextAgent": {
                                              "description": "Text compression agent summary",
                                              "type": "object",
                                              "properties": {
                                                "inputTokens": {
                                                  "description": "Input tokens",
                                                  "type": "number"
                                                },
                                                "outputTokens": {
                                                  "description": "Output tokens",
                                                  "type": "number"
                                                },
                                                "totalPoints": {
                                                  "description": "Total credit points",
                                                  "type": "number"
                                                }
                                              },
                                              "required": [
                                                "inputTokens",
                                                "outputTokens",
                                                "totalPoints"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "codeLog": {
                                              "description": "Code execution logs",
                                              "type": "string"
                                            },
                                            "readFilesResult": {
                                              "description": "File reading result",
                                              "type": "string"
                                            },
                                            "readFiles": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "url": {
                                                    "type": "string"
                                                  },
                                                  "name": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "url",
                                                  "name"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "userSelectResult": {
                                              "description": "User selection result",
                                              "type": "string"
                                            },
                                            "formInputResult": {
                                              "description": "Form submission result",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "updateVarResult": {
                                              "items": {
                                                "type": [
                                                  "object",
                                                  "array",
                                                  "string",
                                                  "number",
                                                  "boolean",
                                                  "null"
                                                ]
                                              },
                                              "description": "Variable update result",
                                              "type": "array"
                                            },
                                            "loopResult": {
                                              "items": {
                                                "type": [
                                                  "object",
                                                  "array",
                                                  "string",
                                                  "number",
                                                  "boolean",
                                                  "null"
                                                ]
                                              },
                                              "description": "Loop result",
                                              "type": "array"
                                            },
                                            "loopInput": {
                                              "items": {
                                                "type": [
                                                  "object",
                                                  "array",
                                                  "string",
                                                  "number",
                                                  "boolean",
                                                  "null"
                                                ]
                                              },
                                              "description": "Loop input items",
                                              "type": "array"
                                            },
                                            "loopDetail": {
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": true
                                              },
                                              "description": "Loop execution details (recursive node responses)",
                                              "type": "array"
                                            },
                                            "loopInputValue": {
                                              "type": [
                                                "object",
                                                "array",
                                                "string",
                                                "number",
                                                "boolean",
                                                "null"
                                              ],
                                              "description": "Loop iteration input value"
                                            },
                                            "loopOutputValue": {
                                              "type": [
                                                "object",
                                                "array",
                                                "string",
                                                "number",
                                                "boolean",
                                                "null"
                                              ],
                                              "description": "Loop iteration output value"
                                            },
                                            "parallelInput": {
                                              "items": {
                                                "type": [
                                                  "object",
                                                  "array",
                                                  "string",
                                                  "number",
                                                  "boolean",
                                                  "null"
                                                ]
                                              },
                                              "description": "Parallel inputs",
                                              "type": "array"
                                            },
                                            "parallelResult": {
                                              "items": {
                                                "type": [
                                                  "object",
                                                  "array",
                                                  "string",
                                                  "number",
                                                  "boolean",
                                                  "null"
                                                ]
                                              },
                                              "description": "Parallel outputs",
                                              "type": "array"
                                            },
                                            "parallelRunDetail": {
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": true
                                              },
                                              "description": "Per-task execution summary (success/failure status)",
                                              "type": "array"
                                            },
                                            "parallelDetail": {
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": true
                                              },
                                              "description": "Full sub-workflow responses for successful tasks",
                                              "deprecated": true,
                                              "type": "array"
                                            },
                                            "loopRunInput": {
                                              "type": [
                                                "object",
                                                "array",
                                                "string",
                                                "number",
                                                "boolean",
                                                "null"
                                              ],
                                              "description": "Loop-run input (array items or conditional marker)"
                                            },
                                            "loopRunIterations": {
                                              "description": "Actual iteration count executed by loop-run",
                                              "type": "number"
                                            },
                                            "loopRunHistory": {
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": true
                                              },
                                              "description": "Per-iteration snapshot in loop-run",
                                              "type": "array"
                                            },
                                            "loopRunDetail": {
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": true
                                              },
                                              "description": "Aggregated sub-workflow node responses across loop-run iterations",
                                              "deprecated": true,
                                              "type": "array"
                                            },
                                            "childrenResponses": {
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": true
                                              },
                                              "description": "Child node responses",
                                              "type": "array"
                                            },
                                            "toolId": {
                                              "description": "Tool ID",
                                              "type": "string"
                                            },
                                            "extensionModel": {
                                              "description": "Query extension model",
                                              "deprecated": true,
                                              "type": "string"
                                            },
                                            "extensionResult": {
                                              "description": "Query extension result",
                                              "deprecated": true,
                                              "type": "string"
                                            },
                                            "extensionTokens": {
                                              "description": "Query extension tokens",
                                              "deprecated": true,
                                              "type": "number"
                                            },
                                            "nodeId": {
                                              "type": "string"
                                            },
                                            "id": {
                                              "type": "string"
                                            },
                                            "moduleType": {
                                              "type": "string",
                                              "enum": [
                                                "emptyNode",
                                                "globalVariable",
                                                "comment",
                                                "workflowStart",
                                                "chatNode",
                                                "datasetSearchNode",
                                                "datasetConcatNode",
                                                "answerNode",
                                                "classifyQuestion",
                                                "contentExtract",
                                                "httpRequest468",
                                                "pluginInput",
                                                "pluginOutput",
                                                "cfr",
                                                "agent",
                                                "tools",
                                                "stopTool",
                                                "toolParams",
                                                "ifElseNode",
                                                "variableUpdate",
                                                "code",
                                                "textEditor",
                                                "customFeedback",
                                                "readFiles",
                                                "userSelect",
                                                "loop",
                                                "loopStart",
                                                "loopEnd",
                                                "parallelRun",
                                                "loopRun",
                                                "loopRunStart",
                                                "loopRunBreak",
                                                "formInput",
                                                "tool",
                                                "toolSet",
                                                "appModule",
                                                "pluginModule",
                                                "app"
                                              ]
                                            },
                                            "moduleName": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "nodeId",
                                            "id",
                                            "moduleType",
                                            "moduleName"
                                          ],
                                          "additionalProperties": false
                                        }
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "last"
                                    }
                                  },
                                  "useAgentSandbox": {
                                    "type": "boolean"
                                  },
                                  "totalQuoteList": {
                                    "type": "array",
                                    "items": {
                                      "anyOf": [
                                        {
                                          "description": "Dataset search result item",
                                          "type": "object",
                                          "properties": {
                                            "q": {
                                              "allOf": [
                                                {
                                                  "description": "Primary chunk content / question",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "first"
                                              }
                                            },
                                            "a": {
                                              "allOf": [
                                                {
                                                  "description": "Supplementary answer / text",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "imageId": {
                                              "allOf": [
                                                {
                                                  "description": "Image ID",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "imagePreivewUrl": {
                                              "allOf": [
                                                {
                                                  "description": "Image preview URL",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "updateTime": {
                                              "allOf": [
                                                {
                                                  "description": "Update time",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "indexStatus": {
                                              "allOf": [
                                                {
                                                  "description": "Index status (absent on legacy already-indexed records)",
                                                  "type": "string",
                                                  "enum": [
                                                    "indexing",
                                                    "indexed",
                                                    "error",
                                                    "rebuildIndexPending",
                                                    "rebuildIndexRunning",
                                                    "rebuildIndexFailed",
                                                    "rebuildSynonymPending",
                                                    "rebuildSynonymRunning",
                                                    "rebuildSynonymFailed"
                                                  ]
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "indexErrorMsg": {
                                              "allOf": [
                                                {
                                                  "description": "Indexing error details",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "imageDescMap": {
                                              "allOf": [
                                                {
                                                  "description": "Image description mapping",
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {
                                                    "type": "string"
                                                  }
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "metadata": {
                                              "allOf": [
                                                {
                                                  "description": "Custom metadata",
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {}
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "synonymMappings": {
                                              "allOf": [
                                                {
                                                  "description": "Mapping from original terms appearing in chunks or user questions to canonical terms",
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {
                                                    "type": "string"
                                                  }
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "last"
                                              }
                                            },
                                            "id": {
                                              "description": "Data item ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "datasetId": {
                                              "description": "Dataset ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "collectionId": {
                                              "description": "Collection ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "sourceName": {
                                              "description": "Source name",
                                              "type": "string"
                                            },
                                            "sourceId": {
                                              "description": "Source ID",
                                              "type": "string"
                                            },
                                            "chunkIndex": {
                                              "description": "Chunk index",
                                              "type": "number"
                                            },
                                            "score": {
                                              "description": "Retrieval score breakdown list",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "description": "Score type",
                                                    "type": "string",
                                                    "enum": [
                                                      "embedding",
                                                      "fullText",
                                                      "reRank",
                                                      "rrf"
                                                    ]
                                                  },
                                                  "value": {
                                                    "description": "Score value",
                                                    "type": "number"
                                                  },
                                                  "index": {
                                                    "description": "Index",
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "value",
                                                  "index"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "retrievalRank": {
                                              "description": "Retrieval rank",
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "q",
                                            "id",
                                            "datasetId",
                                            "collectionId",
                                            "updateTime",
                                            "sourceName",
                                            "chunkIndex",
                                            "score"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "description": "Compact citation data item",
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "description": "Data item ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "chunkIndex": {
                                              "description": "Chunk index",
                                              "type": "number"
                                            },
                                            "datasetId": {
                                              "description": "Dataset ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "collectionId": {
                                              "description": "Collection ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "sourceId": {
                                              "description": "Source ID",
                                              "type": "string"
                                            },
                                            "sourceName": {
                                              "description": "Source name",
                                              "type": "string"
                                            },
                                            "score": {
                                              "description": "Retrieval score breakdown list",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "description": "Score type",
                                                    "type": "string",
                                                    "enum": [
                                                      "embedding",
                                                      "fullText",
                                                      "reRank",
                                                      "rrf"
                                                    ]
                                                  },
                                                  "value": {
                                                    "description": "Score value",
                                                    "type": "number"
                                                  },
                                                  "index": {
                                                    "description": "Index",
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "value",
                                                  "index"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "retrievalRank": {
                                              "description": "Retrieval rank",
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "chunkIndex",
                                            "datasetId",
                                            "collectionId",
                                            "sourceName",
                                            "score"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    }
                                  },
                                  "toolCiteLinks": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string"
                                        },
                                        "url": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "url"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "errorText": {
                                    "type": "object",
                                    "properties": {
                                      "moduleName": {
                                        "type": "string"
                                      },
                                      "errorText": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "moduleName",
                                      "errorText"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "llmModuleAccount": {
                                    "deprecated": true,
                                    "type": "number"
                                  },
                                  "historyPreviewLength": {
                                    "deprecated": true,
                                    "type": "number"
                                  },
                                  "_id": {
                                    "example": "68ee0bd23d17260b7829b137",
                                    "description": "ObjectId",
                                    "type": "string",
                                    "pattern": "^[0-9a-fA-F]{24}$"
                                  },
                                  "dataId": {
                                    "description": "Canonical message business ID used for details, feedback, and turn cursors",
                                    "type": "string"
                                  },
                                  "id": {
                                    "deprecated": true,
                                    "description": "Deprecated alias of `dataId` for legacy clients; use `dataId` instead",
                                    "type": "string"
                                  },
                                  "time": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "obj",
                                  "value",
                                  "dataId"
                                ],
                                "additionalProperties": {},
                                "description": ""
                              }
                            ]
                          }
                        },
                        "total": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "prevCursor": {
                          "description": "Cursor `dataId` for paging backward (`prevId`; server locates the Human turn start; `null` when unavailable)",
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "nextCursor": {
                          "description": "Cursor `dataId` for paging forward (`nextId`; server locates the AI turn end; `null` when unavailable)",
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "hasMorePrev",
                        "hasMoreNext",
                        "list",
                        "total",
                        "prevCursor",
                        "nextCursor"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/record/getResData": {
      "get": {
        "summary": "Get Chat Record Response Details",
        "description": "Retrieve detailed node execution data (`responseData`) for a specific AI message by `dataId`.",
        "tags": [
          "Chat Records"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "schema": {
              "anyOf": [
                {
                  "title": "App Chat",
                  "description": "Identify the conversation via `appId`. When both API Key and login session are supported, `Authorization` takes precedence over token/Cookie.",
                  "properties": {
                    "appId": {
                      "allOf": [
                        {
                          "example": "68ad85a7463006c963799a05",
                          "description": "Application ID authenticated with the request header credentials allowed by this endpoint.",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "first"
                      }
                    },
                    "sourceType": {
                      "allOf": [
                        {
                          "example": "chatAgentHelper",
                          "description": "Session resource type associated with `appId`. Defaults to `app`; pass the matching `sourceType` for assistant builder sessions.",
                          "type": "string",
                          "enum": [
                            "app",
                            "chatAgentHelper",
                            "workflowBuilder"
                          ]
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "last"
                      }
                    }
                  },
                  "required": [
                    "appId"
                  ],
                  "allOf": [
                    {
                      "anyOf": [
                        {
                          "title": "Default Identity",
                          "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                          "type": "object",
                          "properties": {
                            "chatId": {
                              "description": "Chat ID",
                              "type": "string",
                              "maxLength": 1024
                            },
                            "dataId": {
                              "description": "Chat record data ID",
                              "type": "string"
                            }
                          },
                          "required": [
                            "dataId"
                          ]
                        },
                        {
                          "title": "Custom End-User (`customUid`)",
                          "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                          "type": "object",
                          "properties": {
                            "customUid": {
                              "allOf": [
                                {
                                  "example": "customer-42",
                                  "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                }
                              ],
                              "x-fastgpt-union-parameter": {
                                "label": "",
                                "position": "only"
                              }
                            },
                            "chatId": {
                              "description": "Chat ID",
                              "type": "string",
                              "maxLength": 1024
                            },
                            "dataId": {
                              "description": "Chat record data ID",
                              "type": "string"
                            }
                          },
                          "required": [
                            "dataId",
                            "customUid"
                          ]
                        },
                        {
                          "title": "Proxy Team Member (`authProxy`)",
                          "description": "Act on behalf of another member in the same team via `authProxy`. Available only on personal API keys with `authProxy` enabled; mutually exclusive with `customUid`.",
                          "type": "object",
                          "properties": {
                            "authProxy": {
                              "allOf": [
                                {
                                  "example": "{\"tmbId\":\"68ad85a7463006c963799a06\"}",
                                  "description": "JSON-serialized proxy identity, e.g. `{\"tmbId\":\"member-id\"}` or `{\"username\":\"alice\"}`",
                                  "type": "string"
                                }
                              ],
                              "x-fastgpt-union-parameter": {
                                "label": "",
                                "position": "only"
                              }
                            },
                            "chatId": {
                              "description": "Chat ID",
                              "type": "string",
                              "maxLength": 1024
                            },
                            "dataId": {
                              "description": "Chat record data ID",
                              "type": "string"
                            }
                          },
                          "required": [
                            "dataId",
                            "authProxy"
                          ]
                        }
                      ]
                    },
                    {}
                  ],
                  "x-fastgpt-union-layout": true
                },
                {
                  "title": "Skill Debug Session",
                  "description": "Identify the debug session via `skillId` (takes precedence over `appId` and ignores `sourceType`), authenticated with allowed request header credentials.",
                  "type": "object",
                  "properties": {
                    "skillId": {
                      "allOf": [
                        {
                          "example": "68ad85a7463006c963799a06",
                          "description": "Skill Edit debug ID authenticated with allowed request header credentials.",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "only"
                      }
                    },
                    "chatId": {
                      "description": "Chat ID",
                      "type": "string",
                      "maxLength": 1024
                    },
                    "dataId": {
                      "description": "Chat record data ID",
                      "type": "string"
                    }
                  },
                  "required": [
                    "skillId",
                    "dataId"
                  ]
                },
                {
                  "title": "Share-Link Chat",
                  "description": "Resolves the underlying app via `outLinkAuthData`, taking precedence over `skillId` and `appId` (ignoring `sourceType`). Protected links still validate login cookies/tokens and never fall back to standard auth on failure.",
                  "type": "object",
                  "properties": {
                    "outLinkAuthData": {
                      "allOf": [
                        {
                          "example": "{\"shareId\":\"share-id\",\"outLinkUid\":\"outlink-user-id\"}",
                          "description": "JSON-serialized share-link auth payload containing `shareId` and `outLinkUid`. Overrides `skillId` and `appId`; protected links still check login session cookies/tokens.",
                          "type": "string"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "only"
                      }
                    },
                    "chatId": {
                      "description": "Chat ID",
                      "type": "string",
                      "maxLength": 1024
                    },
                    "dataId": {
                      "description": "Chat record data ID",
                      "type": "string"
                    }
                  },
                  "required": [
                    "outLinkAuthData",
                    "dataId"
                  ]
                },
                {
                  "title": "App API Key (no appId required)",
                  "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                  "anyOf": [
                    {
                      "title": "Default Identity",
                      "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                      "type": "object",
                      "properties": {
                        "chatId": {
                          "description": "Chat ID",
                          "type": "string",
                          "maxLength": 1024
                        },
                        "dataId": {
                          "description": "Chat record data ID",
                          "type": "string"
                        }
                      },
                      "required": [
                        "dataId"
                      ]
                    },
                    {
                      "title": "Custom End-User (`customUid`)",
                      "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                      "type": "object",
                      "properties": {
                        "customUid": {
                          "allOf": [
                            {
                              "example": "customer-42",
                              "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            }
                          ],
                          "x-fastgpt-union-parameter": {
                            "label": "",
                            "position": "only"
                          }
                        },
                        "chatId": {
                          "description": "Chat ID",
                          "type": "string",
                          "maxLength": 1024
                        },
                        "dataId": {
                          "description": "Chat record data ID",
                          "type": "string"
                        }
                      },
                      "required": [
                        "dataId",
                        "customUid"
                      ]
                    }
                  ]
                }
              ]
            },
            "required": true,
            "style": "form",
            "explode": true,
            "examples": {
              "default": {
                "value": {
                  "appId": "68ad85a7463006c963799a05",
                  "dataId": "string"
                },
                "x-disabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully returned response details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/record/getQuote": {
      "post": {
        "summary": "Get Chat Record Citations",
        "description": "Retrieve dataset citation chunks for a specified chat message (requires chat read access).",
        "tags": [
          "Chat Records"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "App Chat",
                    "description": "Identify the conversation via `appId`. When both API Key and login session are supported, `Authorization` takes precedence over token/Cookie.",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "Application ID authenticated with the request header credentials allowed by this endpoint.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "Session resource type associated with `appId`. Defaults to `app`; pass the matching `sourceType` for assistant builder sessions.",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "Default Identity",
                            "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "description": "Chat ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "chatItemDataId": {
                                "example": "item_abc123",
                                "description": "Chat message `dataId`",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "datasetDataIdList": {
                                "example": [
                                  "68ad85a7463006c963799a05"
                                ],
                                "description": "List of dataset data item IDs",
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                }
                              },
                              "collectionIdList": {
                                "example": [
                                  "68ad85a7463006c963799a06"
                                ],
                                "description": "List of collection IDs",
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                }
                              }
                            },
                            "required": [
                              "chatId",
                              "chatItemDataId",
                              "datasetDataIdList",
                              "collectionIdList"
                            ]
                          },
                          {
                            "title": "Custom End-User (`customUid`)",
                            "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "Chat ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "chatItemDataId": {
                                "example": "item_abc123",
                                "description": "Chat message `dataId`",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "datasetDataIdList": {
                                "example": [
                                  "68ad85a7463006c963799a05"
                                ],
                                "description": "List of dataset data item IDs",
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                }
                              },
                              "collectionIdList": {
                                "example": [
                                  "68ad85a7463006c963799a06"
                                ],
                                "description": "List of collection IDs",
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                }
                              }
                            },
                            "required": [
                              "chatId",
                              "chatItemDataId",
                              "datasetDataIdList",
                              "collectionIdList",
                              "customUid"
                            ]
                          },
                          {
                            "title": "Proxy Team Member (`authProxy`)",
                            "description": "Act on behalf of another member in the same team via `authProxy`. Available only on personal API keys with `authProxy` enabled; mutually exclusive with `customUid`.",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key proxy caller identity. Available only for personal keys with `authProxy` enabled; specify `tmbId` or `username` (`tmbId` takes precedence without falling back to `username` on invalid ID).",
                                    "anyOf": [
                                      {
                                        "title": "By Team Member ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "Proxied team member ID (`tmbId`), takes precedence over `username`",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "By Username",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "Proxied team member username",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "Chat ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "chatItemDataId": {
                                "example": "item_abc123",
                                "description": "Chat message `dataId`",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "datasetDataIdList": {
                                "example": [
                                  "68ad85a7463006c963799a05"
                                ],
                                "description": "List of dataset data item IDs",
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                }
                              },
                              "collectionIdList": {
                                "example": [
                                  "68ad85a7463006c963799a06"
                                ],
                                "description": "List of collection IDs",
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                }
                              }
                            },
                            "required": [
                              "chatId",
                              "chatItemDataId",
                              "datasetDataIdList",
                              "collectionIdList",
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill Debug Session",
                    "description": "Identify the debug session via `skillId` (takes precedence over `appId` and ignores `sourceType`), authenticated with allowed request header credentials.",
                    "type": "object",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit debug ID authenticated with allowed request header credentials.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "Chat ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      },
                      "chatItemDataId": {
                        "example": "item_abc123",
                        "description": "Chat message `dataId`",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "datasetDataIdList": {
                        "example": [
                          "68ad85a7463006c963799a05"
                        ],
                        "description": "List of dataset data item IDs",
                        "maxItems": 200,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "collectionIdList": {
                        "example": [
                          "68ad85a7463006c963799a06"
                        ],
                        "description": "List of collection IDs",
                        "maxItems": 200,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      }
                    },
                    "required": [
                      "skillId",
                      "chatId",
                      "chatItemDataId",
                      "datasetDataIdList",
                      "collectionIdList"
                    ]
                  },
                  {
                    "title": "Share-Link Chat",
                    "description": "Resolves the underlying app via `outLinkAuthData`, taking precedence over `skillId` and `appId` (ignoring `sourceType`). Protected links still validate login cookies/tokens and never fall back to standard auth on failure.",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "Share-link auth payload (`shareId` / `outLinkUid`). Overrides `skillId` and `appId`; protected links still validate login session cookies/tokens.",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "Share link ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "External share user ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "Chat ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      },
                      "chatItemDataId": {
                        "example": "item_abc123",
                        "description": "Chat message `dataId`",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "datasetDataIdList": {
                        "example": [
                          "68ad85a7463006c963799a05"
                        ],
                        "description": "List of dataset data item IDs",
                        "maxItems": 200,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "collectionIdList": {
                        "example": [
                          "68ad85a7463006c963799a06"
                        ],
                        "description": "List of collection IDs",
                        "maxItems": 200,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      }
                    },
                    "required": [
                      "outLinkAuthData",
                      "chatId",
                      "chatItemDataId",
                      "datasetDataIdList",
                      "collectionIdList"
                    ]
                  },
                  {
                    "title": "App API Key (no appId required)",
                    "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                    "anyOf": [
                      {
                        "title": "Default Identity",
                        "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                        "type": "object",
                        "properties": {
                          "chatId": {
                            "description": "Chat ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          },
                          "chatItemDataId": {
                            "example": "item_abc123",
                            "description": "Chat message `dataId`",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "datasetDataIdList": {
                            "example": [
                              "68ad85a7463006c963799a05"
                            ],
                            "description": "List of dataset data item IDs",
                            "maxItems": 200,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          },
                          "collectionIdList": {
                            "example": [
                              "68ad85a7463006c963799a06"
                            ],
                            "description": "List of collection IDs",
                            "maxItems": 200,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          }
                        },
                        "required": [
                          "chatId",
                          "chatItemDataId",
                          "datasetDataIdList",
                          "collectionIdList"
                        ]
                      },
                      {
                        "title": "Custom End-User (`customUid`)",
                        "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "description": "Chat ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          },
                          "chatItemDataId": {
                            "example": "item_abc123",
                            "description": "Chat message `dataId`",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "datasetDataIdList": {
                            "example": [
                              "68ad85a7463006c963799a05"
                            ],
                            "description": "List of dataset data item IDs",
                            "maxItems": 200,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          },
                          "collectionIdList": {
                            "example": [
                              "68ad85a7463006c963799a06"
                            ],
                            "description": "List of collection IDs",
                            "maxItems": 200,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          }
                        },
                        "required": [
                          "chatId",
                          "chatItemDataId",
                          "datasetDataIdList",
                          "collectionIdList",
                          "customUid"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatId": "string",
                "chatItemDataId": "item_abc123",
                "datasetDataIdList": [
                  "68ad85a7463006c963799a05"
                ],
                "collectionIdList": [
                  "68ad85a7463006c963799a06"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully returned citation list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "description": "List of cited dataset chunks",
                        "type": "object",
                        "properties": {
                          "_id": {
                            "description": "Data item ID",
                            "example": "68ee0bd23d17260b7829b137",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          },
                          "q": {
                            "description": "Primary chunk content / question",
                            "type": "string"
                          },
                          "a": {
                            "description": "Supplementary answer / text",
                            "type": "string"
                          },
                          "imagePreivewUrl": {
                            "description": "Image preview URL",
                            "type": "string"
                          },
                          "history": {
                            "description": "Legacy snapshot flag",
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "q": {
                                  "description": "Primary chunk content / question",
                                  "type": "string"
                                },
                                "a": {
                                  "description": "Supplementary answer / text",
                                  "type": "string"
                                },
                                "imageId": {
                                  "description": "Image ID",
                                  "type": "string"
                                },
                                "updateTime": {
                                  "description": "Update time",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "q",
                                "updateTime"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "updateTime": {
                            "description": "Update time",
                            "type": "string"
                          },
                          "index": {
                            "description": "Chunk index",
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "updated": {
                            "description": "Whether the chunk has been updated since citation",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "_id",
                          "q",
                          "updateTime",
                          "index"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/record/getCollectionQuote": {
      "post": {
        "summary": "Get Collection Citation Chunks",
        "description": "Paginate forward or backward around a cited chunk index inside a collection (requires chat access).",
        "tags": [
          "Chat Records"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "App Chat",
                    "description": "Identify the conversation via `appId`. When both API Key and login session are supported, `Authorization` takes precedence over token/Cookie.",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "Application ID authenticated with the request header credentials allowed by this endpoint.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "Session resource type associated with `appId`. Defaults to `app`; pass the matching `sourceType` for assistant builder sessions.",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "Default Identity",
                            "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "description": "Chat ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "chatItemDataId": {
                                "example": "item_abc123",
                                "description": "Chat message `dataId`",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "collectionId": {
                                "description": "Collection ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "pageSize": {
                                "description": "Items per page (default 20, range `[1, 30]`)",
                                "default": 20,
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 30
                              },
                              "anchor": {
                                "description": "Current anchor `chunkIndex`",
                                "type": "number"
                              },
                              "initialId": {
                                "description": "Initial anchor message data ID",
                                "type": "string"
                              },
                              "nextId": {
                                "description": "Cursor data ID for paging forward",
                                "type": "string"
                              },
                              "prevId": {
                                "description": "Cursor data ID for paging backward",
                                "type": "string"
                              }
                            },
                            "required": [
                              "chatId",
                              "chatItemDataId",
                              "collectionId"
                            ]
                          },
                          {
                            "title": "Custom End-User (`customUid`)",
                            "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "Chat ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "chatItemDataId": {
                                "example": "item_abc123",
                                "description": "Chat message `dataId`",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "collectionId": {
                                "description": "Collection ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "pageSize": {
                                "description": "Items per page (default 20, range `[1, 30]`)",
                                "default": 20,
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 30
                              },
                              "anchor": {
                                "description": "Current anchor `chunkIndex`",
                                "type": "number"
                              },
                              "initialId": {
                                "description": "Initial anchor message data ID",
                                "type": "string"
                              },
                              "nextId": {
                                "description": "Cursor data ID for paging forward",
                                "type": "string"
                              },
                              "prevId": {
                                "description": "Cursor data ID for paging backward",
                                "type": "string"
                              }
                            },
                            "required": [
                              "chatId",
                              "chatItemDataId",
                              "collectionId",
                              "customUid"
                            ]
                          },
                          {
                            "title": "Proxy Team Member (`authProxy`)",
                            "description": "Act on behalf of another member in the same team via `authProxy`. Available only on personal API keys with `authProxy` enabled; mutually exclusive with `customUid`.",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key proxy caller identity. Available only for personal keys with `authProxy` enabled; specify `tmbId` or `username` (`tmbId` takes precedence without falling back to `username` on invalid ID).",
                                    "anyOf": [
                                      {
                                        "title": "By Team Member ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "Proxied team member ID (`tmbId`), takes precedence over `username`",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "By Username",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "Proxied team member username",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "Chat ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "chatItemDataId": {
                                "example": "item_abc123",
                                "description": "Chat message `dataId`",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "collectionId": {
                                "description": "Collection ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "pageSize": {
                                "description": "Items per page (default 20, range `[1, 30]`)",
                                "default": 20,
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 30
                              },
                              "anchor": {
                                "description": "Current anchor `chunkIndex`",
                                "type": "number"
                              },
                              "initialId": {
                                "description": "Initial anchor message data ID",
                                "type": "string"
                              },
                              "nextId": {
                                "description": "Cursor data ID for paging forward",
                                "type": "string"
                              },
                              "prevId": {
                                "description": "Cursor data ID for paging backward",
                                "type": "string"
                              }
                            },
                            "required": [
                              "chatId",
                              "chatItemDataId",
                              "collectionId",
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill Debug Session",
                    "description": "Identify the debug session via `skillId` (takes precedence over `appId` and ignores `sourceType`), authenticated with allowed request header credentials.",
                    "type": "object",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit debug ID authenticated with allowed request header credentials.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "Chat ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      },
                      "chatItemDataId": {
                        "example": "item_abc123",
                        "description": "Chat message `dataId`",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "collectionId": {
                        "description": "Collection ID",
                        "example": "68ee0bd23d17260b7829b137",
                        "type": "string",
                        "pattern": "^[0-9a-fA-F]{24}$"
                      },
                      "pageSize": {
                        "description": "Items per page (default 20, range `[1, 30]`)",
                        "default": 20,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 30
                      },
                      "anchor": {
                        "description": "Current anchor `chunkIndex`",
                        "type": "number"
                      },
                      "initialId": {
                        "description": "Initial anchor message data ID",
                        "type": "string"
                      },
                      "nextId": {
                        "description": "Cursor data ID for paging forward",
                        "type": "string"
                      },
                      "prevId": {
                        "description": "Cursor data ID for paging backward",
                        "type": "string"
                      }
                    },
                    "required": [
                      "skillId",
                      "chatId",
                      "chatItemDataId",
                      "collectionId"
                    ]
                  },
                  {
                    "title": "Share-Link Chat",
                    "description": "Resolves the underlying app via `outLinkAuthData`, taking precedence over `skillId` and `appId` (ignoring `sourceType`). Protected links still validate login cookies/tokens and never fall back to standard auth on failure.",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "Share-link auth payload (`shareId` / `outLinkUid`). Overrides `skillId` and `appId`; protected links still validate login session cookies/tokens.",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "Share link ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "External share user ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "Chat ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      },
                      "chatItemDataId": {
                        "example": "item_abc123",
                        "description": "Chat message `dataId`",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "collectionId": {
                        "description": "Collection ID",
                        "example": "68ee0bd23d17260b7829b137",
                        "type": "string",
                        "pattern": "^[0-9a-fA-F]{24}$"
                      },
                      "pageSize": {
                        "description": "Items per page (default 20, range `[1, 30]`)",
                        "default": 20,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 30
                      },
                      "anchor": {
                        "description": "Current anchor `chunkIndex`",
                        "type": "number"
                      },
                      "initialId": {
                        "description": "Initial anchor message data ID",
                        "type": "string"
                      },
                      "nextId": {
                        "description": "Cursor data ID for paging forward",
                        "type": "string"
                      },
                      "prevId": {
                        "description": "Cursor data ID for paging backward",
                        "type": "string"
                      }
                    },
                    "required": [
                      "outLinkAuthData",
                      "chatId",
                      "chatItemDataId",
                      "collectionId"
                    ]
                  },
                  {
                    "title": "App API Key (no appId required)",
                    "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                    "anyOf": [
                      {
                        "title": "Default Identity",
                        "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                        "type": "object",
                        "properties": {
                          "chatId": {
                            "description": "Chat ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          },
                          "chatItemDataId": {
                            "example": "item_abc123",
                            "description": "Chat message `dataId`",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "collectionId": {
                            "description": "Collection ID",
                            "example": "68ee0bd23d17260b7829b137",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          },
                          "pageSize": {
                            "description": "Items per page (default 20, range `[1, 30]`)",
                            "default": 20,
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 30
                          },
                          "anchor": {
                            "description": "Current anchor `chunkIndex`",
                            "type": "number"
                          },
                          "initialId": {
                            "description": "Initial anchor message data ID",
                            "type": "string"
                          },
                          "nextId": {
                            "description": "Cursor data ID for paging forward",
                            "type": "string"
                          },
                          "prevId": {
                            "description": "Cursor data ID for paging backward",
                            "type": "string"
                          }
                        },
                        "required": [
                          "chatId",
                          "chatItemDataId",
                          "collectionId"
                        ]
                      },
                      {
                        "title": "Custom End-User (`customUid`)",
                        "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "description": "Chat ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          },
                          "chatItemDataId": {
                            "example": "item_abc123",
                            "description": "Chat message `dataId`",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "collectionId": {
                            "description": "Collection ID",
                            "example": "68ee0bd23d17260b7829b137",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          },
                          "pageSize": {
                            "description": "Items per page (default 20, range `[1, 30]`)",
                            "default": 20,
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 30
                          },
                          "anchor": {
                            "description": "Current anchor `chunkIndex`",
                            "type": "number"
                          },
                          "initialId": {
                            "description": "Initial anchor message data ID",
                            "type": "string"
                          },
                          "nextId": {
                            "description": "Cursor data ID for paging forward",
                            "type": "string"
                          },
                          "prevId": {
                            "description": "Cursor data ID for paging backward",
                            "type": "string"
                          }
                        },
                        "required": [
                          "chatId",
                          "chatItemDataId",
                          "collectionId",
                          "customUid"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatId": "string",
                "chatItemDataId": "item_abc123",
                "collectionId": "68ee0bd23d17260b7829b137"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully returned paginated collection chunks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "_id": {
                                "description": "Data item ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "q": {
                                "description": "Primary chunk content / question",
                                "type": "string"
                              },
                              "a": {
                                "description": "Supplementary answer / text",
                                "type": "string"
                              },
                              "imagePreivewUrl": {
                                "description": "Image preview URL",
                                "type": "string"
                              },
                              "history": {
                                "description": "Legacy snapshot flag",
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "q": {
                                      "description": "Primary chunk content / question",
                                      "type": "string"
                                    },
                                    "a": {
                                      "description": "Supplementary answer / text",
                                      "type": "string"
                                    },
                                    "imageId": {
                                      "description": "Image ID",
                                      "type": "string"
                                    },
                                    "updateTime": {
                                      "description": "Update time",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "q",
                                    "updateTime"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "updateTime": {
                                "description": "Update time",
                                "type": "string"
                              },
                              "index": {
                                "description": "Chunk index",
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "updated": {
                                "description": "Whether the chunk has been updated since citation",
                                "type": "boolean"
                              },
                              "id": {
                                "description": "Data ID (alias of `_id`)",
                                "type": "string"
                              },
                              "anchor": {
                                "description": "Chunk sequence index (alias of `index`)",
                                "type": "number"
                              }
                            },
                            "required": [
                              "_id",
                              "q",
                              "updateTime",
                              "index",
                              "id"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "hasMorePrev": {
                          "description": "Whether earlier messages exist before the current slice",
                          "type": "boolean"
                        },
                        "hasMoreNext": {
                          "description": "Whether newer messages exist after the current slice",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "list",
                        "hasMorePrev",
                        "hasMoreNext"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/record/delete": {
      "delete": {
        "summary": "Delete Chat Records",
        "description": "Soft-deletes specified messages via JSON body (`outLinkAuthData` as an object, `contentIds` as an array). Pending Ask/Preview state is recalculated from remaining records, allowing re-answering when the final reply is deleted.",
        "tags": [
          "Chat Records"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "App Chat",
                    "description": "Identify the conversation via `appId`. When both API Key and login session are supported, `Authorization` takes precedence over token/Cookie.",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "Application ID authenticated with the request header credentials allowed by this endpoint.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "Session resource type associated with `appId`. Defaults to `app`; pass the matching `sourceType` for assistant builder sessions.",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "Default Identity",
                            "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "example": "chat123",
                                "description": "Chat ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "contentId": {
                                "example": "content123",
                                "description": "Message `dataId` to delete",
                                "type": "string"
                              },
                              "contentIds": {
                                "example": [
                                  "content123",
                                  "content456"
                                ],
                                "description": "List of message `contentIds` to delete",
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "chatId"
                            ]
                          },
                          {
                            "title": "Custom End-User (`customUid`)",
                            "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "example": "chat123",
                                "description": "Chat ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "contentId": {
                                "example": "content123",
                                "description": "Message `dataId` to delete",
                                "type": "string"
                              },
                              "contentIds": {
                                "example": [
                                  "content123",
                                  "content456"
                                ],
                                "description": "List of message `contentIds` to delete",
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "chatId",
                              "customUid"
                            ]
                          },
                          {
                            "title": "Proxy Team Member (`authProxy`)",
                            "description": "Act on behalf of another member in the same team via `authProxy`. Available only on personal API keys with `authProxy` enabled; mutually exclusive with `customUid`.",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key proxy caller identity. Available only for personal keys with `authProxy` enabled; specify `tmbId` or `username` (`tmbId` takes precedence without falling back to `username` on invalid ID).",
                                    "anyOf": [
                                      {
                                        "title": "By Team Member ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "Proxied team member ID (`tmbId`), takes precedence over `username`",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "By Username",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "Proxied team member username",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "example": "chat123",
                                "description": "Chat ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "contentId": {
                                "example": "content123",
                                "description": "Message `dataId` to delete",
                                "type": "string"
                              },
                              "contentIds": {
                                "example": [
                                  "content123",
                                  "content456"
                                ],
                                "description": "List of message `contentIds` to delete",
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "chatId",
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill Debug Session",
                    "description": "Identify the debug session via `skillId` (takes precedence over `appId` and ignores `sourceType`), authenticated with allowed request header credentials.",
                    "type": "object",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit debug ID authenticated with allowed request header credentials.",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "example": "chat123",
                        "description": "Chat ID",
                        "type": "string",
                        "maxLength": 1024
                      },
                      "contentId": {
                        "example": "content123",
                        "description": "Message `dataId` to delete",
                        "type": "string"
                      },
                      "contentIds": {
                        "example": [
                          "content123",
                          "content456"
                        ],
                        "description": "List of message `contentIds` to delete",
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "skillId",
                      "chatId"
                    ]
                  },
                  {
                    "title": "Share-Link Chat",
                    "description": "Resolves the underlying app via `outLinkAuthData`, taking precedence over `skillId` and `appId` (ignoring `sourceType`). Protected links still validate login cookies/tokens and never fall back to standard auth on failure.",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "Share-link auth payload (`shareId` / `outLinkUid`). Overrides `skillId` and `appId`; protected links still validate login session cookies/tokens.",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "Share link ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "External share user ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "example": "chat123",
                        "description": "Chat ID",
                        "type": "string",
                        "maxLength": 1024
                      },
                      "contentId": {
                        "example": "content123",
                        "description": "Message `dataId` to delete",
                        "type": "string"
                      },
                      "contentIds": {
                        "example": [
                          "content123",
                          "content456"
                        ],
                        "description": "List of message `contentIds` to delete",
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "outLinkAuthData",
                      "chatId"
                    ]
                  },
                  {
                    "title": "App API Key (no appId required)",
                    "description": "When authorizing with an app-bound App API Key, omit `appId` and `sourceType`; the server resolves the bound app with `sourceType` fixed to `app`. Personal keys and login sessions cannot omit `appId`, and an explicit `appId` does not override an App API Key binding.",
                    "anyOf": [
                      {
                        "title": "Default Identity",
                        "description": "Omit `customUid` and `authProxy` to execute using the team member identity associated with the credential.",
                        "type": "object",
                        "properties": {
                          "chatId": {
                            "example": "chat123",
                            "description": "Chat ID",
                            "type": "string",
                            "maxLength": 1024
                          },
                          "contentId": {
                            "example": "content123",
                            "description": "Message `dataId` to delete",
                            "type": "string"
                          },
                          "contentIds": {
                            "example": [
                              "content123",
                              "content456"
                            ],
                            "description": "List of message `contentIds` to delete",
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "chatId"
                        ]
                      },
                      {
                        "title": "Custom End-User (`customUid`)",
                        "description": "Tag end users from your own system via `customUid` without changing the authenticating member or permissions. Passed as workflow `userId` and used to scope chat management.",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "Supported only for standard app API Key calls. Exact match against the external user ID (`outLinkUid`, not `tmbId`). Omit to keep full scope or pass to restrict reads, updates, and deletions (max 1024 chars, cannot be empty or `null`, does not change member identity).",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "example": "chat123",
                            "description": "Chat ID",
                            "type": "string",
                            "maxLength": 1024
                          },
                          "contentId": {
                            "example": "content123",
                            "description": "Message `dataId` to delete",
                            "type": "string"
                          },
                          "contentIds": {
                            "example": [
                              "content123",
                              "content456"
                            ],
                            "description": "List of message `contentIds` to delete",
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "chatId",
                          "customUid"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatId": "chat123"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/create": {
      "post": {
        "summary": "Create Dataset",
        "description": "Create a new dataset or folder supporting standard, website sync, external file, and API datasets.",
        "tags": [
          "Datasets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "parentId": {
                    "example": "68ad85a7463006c963799a05",
                    "description": "Parent folder ID; omit to create at the root level",
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([0-9a-fA-F]{24})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "type": {
                    "example": "dataset",
                    "description": "Dataset type",
                    "type": "string",
                    "enum": [
                      "folder",
                      "dataset",
                      "websiteDataset",
                      "externalFile",
                      "apiDataset",
                      "feishu",
                      "yuque",
                      "dingtalk"
                    ]
                  },
                  "name": {
                    "example": "My Dataset",
                    "description": "Dataset name",
                    "type": "string"
                  },
                  "intro": {
                    "example": "A knowledge base dataset for storing product documentation.",
                    "description": "Dataset introduction",
                    "type": "string"
                  },
                  "avatar": {
                    "example": "/imgs/dataset/avatar.png",
                    "description": "Dataset avatar URL (optional; uses default icon when omitted)",
                    "type": "string"
                  },
                  "vectorModelId": {
                    "description": "Embedding model ID; uses the system default if omitted",
                    "type": "string"
                  },
                  "vectorModel": {
                    "example": "text-embedding-3-small",
                    "description": "Embedding model identifier; uses the system default if omitted",
                    "deprecated": true,
                    "type": "string"
                  },
                  "agentModelId": {
                    "description": "Dataset Agent model ID; uses the default model if omitted",
                    "type": "string"
                  },
                  "agentModel": {
                    "example": "gpt-4o-mini",
                    "description": "Dataset Agent model identifier; uses the default model if omitted",
                    "deprecated": true,
                    "type": "string"
                  },
                  "vlmModelId": {
                    "description": "Vision-Language Model (VLM) ID; keeps default when omitted, `null` or empty string clears it",
                    "example": "",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "vlmModel": {
                    "example": "gpt-4o",
                    "description": "Vision-Language Model (VLM) identifier",
                    "deprecated": true,
                    "type": "string"
                  },
                  "apiDatasetServer": {
                    "description": "Third-party dataset server configuration (API / Lark / Yuque / DingTalk)",
                    "type": "object",
                    "properties": {
                      "apiServer": {
                        "description": "API dataset server configuration",
                        "type": "object",
                        "properties": {
                          "baseUrl": {
                            "type": "string"
                          },
                          "authorization": {
                            "type": "string"
                          },
                          "basePath": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "baseUrl"
                        ]
                      },
                      "feishuServer": {
                        "description": "Lark (Feishu) server configuration",
                        "type": "object",
                        "properties": {
                          "appId": {
                            "type": "string"
                          },
                          "appSecret": {
                            "type": "string"
                          },
                          "folderToken": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "appId",
                          "folderToken"
                        ]
                      },
                      "yuqueServer": {
                        "description": "Yuque server configuration",
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "token": {
                            "type": "string"
                          },
                          "basePath": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "userId"
                        ]
                      },
                      "dingtalkServer": {
                        "description": "DingTalk dataset configuration",
                        "type": "object",
                        "properties": {
                          "appKey": {
                            "type": "string"
                          },
                          "appSecret": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "operatorId": {
                            "type": "string"
                          },
                          "workspaceId": {
                            "type": "string"
                          },
                          "rootNodeId": {
                            "type": "string"
                          },
                          "workspaceName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "appKey",
                          "userId"
                        ]
                      }
                    }
                  },
                  "sangforFileParseConfig": {
                    "description": "External PDF parsing switches (header/footer, appendix, image OCR, chart-to-table); applies only when `customPdfParse` is enabled",
                    "type": "object",
                    "properties": {
                      "keep_header_footer": {
                        "description": "Whether to keep page headers and footers (default `false`, strips headers/footers)",
                        "type": "boolean"
                      },
                      "keep_appendix": {
                        "description": "Whether to keep appendix sections (default `true`)",
                        "type": "boolean"
                      },
                      "image_analysis": {
                        "description": "Whether to retain OCR/image recognition results including stamps (default `false`)",
                        "type": "boolean"
                      },
                      "chart_analysis": {
                        "description": "Whether to keep chart-to-table extraction results alongside original images (default `false`)",
                        "type": "boolean"
                      }
                    }
                  },
                  "inheritPermission": {
                    "example": true,
                    "description": "Whether to inherit parent permissions (default `true`). `true` merges the parent permission snapshot and tracks future changes; `false` creates an isolated node with only creator `owner` permission.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "type",
                  "name",
                  "intro"
                ]
              },
              "example": {
                "type": "folder",
                "name": "My Dataset",
                "intro": "A knowledge base dataset for storing product documentation."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully returned the newly created dataset ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/list": {
      "post": {
        "deprecated": true,
        "summary": "List Datasets (Deprecated)",
        "description": "Deprecated; use `POST /core/dataset/listV2` instead. Retained for backward compatibility and returns an array of accessible datasets filtered by type or keyword, whereas V2 returns `{ list, total }`.",
        "tags": [
          "Datasets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "example": {
                  "parentId": null,
                  "type": "dataset",
                  "searchKey": "Product Docs"
                },
                "type": "object",
                "properties": {
                  "parentId": {
                    "example": "68ad85a7463006c963799a05",
                    "description": "Parent folder ID; `null` or omitted queries the root folder",
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([0-9a-fA-F]{24})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "type": {
                    "example": "dataset",
                    "description": "Dataset type filter",
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "folder",
                          "dataset",
                          "websiteDataset",
                          "externalFile",
                          "apiDataset",
                          "feishu",
                          "yuque",
                          "dingtalk"
                        ]
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "folder",
                            "dataset",
                            "websiteDataset",
                            "externalFile",
                            "apiDataset",
                            "feishu",
                            "yuque",
                            "dingtalk"
                          ]
                        }
                      }
                    ]
                  },
                  "searchKey": {
                    "example": "Product Docs",
                    "description": "Search keyword matching dataset name and introduction",
                    "type": "string"
                  },
                  "sort": {
                    "default": "updateTimeDesc",
                    "example": "updateTimeDesc",
                    "description": "Sort order; defaults to most recently updated descending",
                    "x-enumDescriptions": {
                      "updateTimeDesc": "Sort by update time descending (most recently modified first, default)",
                      "createTimeDesc": "Sort by creation time descending (newest first)",
                      "createTimeAsc": "Sort by creation time ascending (oldest first)"
                    },
                    "type": "string",
                    "enum": [
                      "updateTimeDesc",
                      "createTimeDesc",
                      "createTimeAsc"
                    ]
                  },
                  "tmbIds": {
                    "description": "Filter by creator member IDs; an empty array returns an empty list",
                    "type": "array",
                    "items": {
                      "example": "68ee0bd23d17260b7829b137",
                      "description": "ObjectId",
                      "type": "string",
                      "pattern": "^[0-9a-fA-F]{24}$"
                    }
                  }
                }
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully returned dataset list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "_id": {
                            "description": "Dataset ID",
                            "example": "68ee0bd23d17260b7829b137",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          },
                          "tmbId": {
                            "description": "Team member ID",
                            "example": "68ee0bd23d17260b7829b137",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          },
                          "avatar": {
                            "description": "Avatar",
                            "default": "/icon/logo.svg",
                            "type": "string"
                          },
                          "createTime": {
                            "description": "Creation time",
                            "type": "string"
                          },
                          "updateTime": {
                            "description": "Update time",
                            "type": "string"
                          },
                          "name": {
                            "description": "Name",
                            "type": "string"
                          },
                          "intro": {
                            "description": "Introduction",
                            "type": "string"
                          },
                          "type": {
                            "description": "Dataset type",
                            "type": "string",
                            "enum": [
                              "folder",
                              "dataset",
                              "websiteDataset",
                              "externalFile",
                              "apiDataset",
                              "feishu",
                              "yuque",
                              "dingtalk"
                            ]
                          },
                          "permission": {
                            "description": "Serialized permission object JSON structure",
                            "type": "object",
                            "properties": {
                              "role": {
                                "description": "Permission role bitmask value",
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "isOwner": {
                                "description": "Whether the caller has owner permission",
                                "type": "boolean"
                              },
                              "hasManagePer": {
                                "description": "Whether the caller has manage permission",
                                "type": "boolean"
                              },
                              "hasWritePer": {
                                "description": "Whether the caller has write permission",
                                "type": "boolean"
                              },
                              "hasReadPer": {
                                "description": "Whether the caller has read permission",
                                "type": "boolean"
                              },
                              "hasManageRole": {
                                "description": "Whether manage role bit is set",
                                "type": "boolean"
                              },
                              "hasWriteRole": {
                                "description": "Whether write role bit is set",
                                "type": "boolean"
                              },
                              "hasReadRole": {
                                "description": "Whether read role bit is set",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "role",
                              "isOwner",
                              "hasManagePer",
                              "hasWritePer",
                              "hasReadPer",
                              "hasManageRole",
                              "hasWriteRole",
                              "hasReadRole"
                            ],
                            "additionalProperties": {}
                          },
                          "appCount": {
                            "description": "Count of published apps referencing this dataset (returned only to non-folder owners when enabled)",
                            "example": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "fileCount": {
                            "description": "Total non-folder collection count across all depths (unfiltered by file permissions; returned only when `withFileCount` is requested on non-folder datasets)",
                            "example": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "vectorModel": {
                            "description": "Embedding model info (empty for folders or deleted models; inactive models still return display metadata)",
                            "type": "object",
                            "properties": {
                              "pricing": {
                                "description": "Credit price per fixed billing unit; omitted if free",
                                "example": {
                                  "unitPrice": 2
                                },
                                "type": "object",
                                "properties": {
                                  "unitPrice": {
                                    "description": "Composite credit price per million units (tokens/TTS) or per 60 seconds (STT)",
                                    "example": 2,
                                    "type": "number",
                                    "minimum": 0
                                  }
                                },
                                "additionalProperties": false
                              },
                              "provider": {
                                "type": "string",
                                "minLength": 1
                              },
                              "model": {
                                "type": "string",
                                "minLength": 1
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "scope": {
                                "default": "system",
                                "type": "string",
                                "enum": [
                                  "system",
                                  "team"
                                ]
                              },
                              "sortOrder": {
                                "description": "Display rank within the same scope (smaller numbers appear first)",
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "tmbId": {
                                "anyOf": [
                                  {
                                    "example": "68ee0bd23d17260b7829b137",
                                    "description": "ObjectId",
                                    "type": "string",
                                    "pattern": "^[0-9a-fA-F]{24}$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "teamId": {
                                "anyOf": [
                                  {
                                    "example": "68ee0bd23d17260b7829b137",
                                    "description": "ObjectId",
                                    "type": "string",
                                    "pattern": "^[0-9a-fA-F]{24}$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "isActive": {
                                "type": "boolean"
                              },
                              "isUpcomingDeprecation": {
                                "description": "Whether the model is scheduled for deprecation",
                                "example": true,
                                "type": "boolean"
                              },
                              "requestUrl": {
                                "type": "string"
                              },
                              "requestAuth": {
                                "type": "string"
                              },
                              "testMode": {
                                "type": "boolean"
                              },
                              "type": {
                                "type": "string",
                                "const": "embedding"
                              },
                              "config": {
                                "type": "object",
                                "properties": {
                                  "defaultToken": {
                                    "type": "number"
                                  },
                                  "maxToken": {
                                    "type": "number"
                                  },
                                  "weight": {
                                    "default": 0,
                                    "type": "number"
                                  },
                                  "hidden": {
                                    "type": "boolean"
                                  },
                                  "vision": {
                                    "type": "boolean"
                                  },
                                  "normalization": {
                                    "type": "boolean"
                                  },
                                  "batchSize": {
                                    "type": "number"
                                  },
                                  "defaultConfig": {
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "additionalProperties": {}
                                  },
                                  "dbConfig": {
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "additionalProperties": {}
                                  },
                                  "queryConfig": {
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "additionalProperties": {}
                                  }
                                },
                                "required": [
                                  "defaultToken",
                                  "maxToken",
                                  "weight"
                                ],
                                "additionalProperties": false
                              },
                              "modelId": {
                                "type": "string"
                              },
                              "avatar": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "provider",
                              "model",
                              "name",
                              "scope",
                              "type",
                              "config",
                              "modelId"
                            ],
                            "additionalProperties": false
                          },
                          "inheritPermission": {
                            "description": "Whether permissions are inherited from parent",
                            "type": "boolean"
                          },
                          "private": {
                            "description": "Whether access is private to the owner",
                            "type": "boolean"
                          },
                          "folderAccessMode": {
                            "example": "navigate",
                            "description": "Folder access mode; `navigate` allows traversing readable descendants without granting direct read permission",
                            "type": "string",
                            "enum": [
                              "read",
                              "navigate"
                            ]
                          },
                          "sourceMember": {
                            "description": "Source member",
                            "type": "object",
                            "properties": {
                              "name": {
                                "example": "Alice",
                                "description": "Member name",
                                "type": "string"
                              },
                              "avatar": {
                                "description": "Member avatar",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "status": {
                                "example": "active",
                                "description": "Member status",
                                "type": "string",
                                "enum": [
                                  "active",
                                  "leave",
                                  "forbidden"
                                ]
                              }
                            },
                            "required": [
                              "name",
                              "status"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "_id",
                          "tmbId",
                          "avatar",
                          "createTime",
                          "updateTime",
                          "name",
                          "intro",
                          "type",
                          "permission",
                          "inheritPermission"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/listV2": {
      "post": {
        "summary": "List Datasets (V2)",
        "description": "Queries accessible datasets with pagination or exact `datasetIds` lookup. When `datasetIds` is passed, `parentId` and pagination parameters are ignored while shared filters remain active.",
        "tags": [
          "Datasets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "Lookup by IDs",
                    "type": "object",
                    "properties": {
                      "datasetIds": {
                        "allOf": [
                          {
                            "example": [
                              "68ad85a7463006c963799a05"
                            ],
                            "description": "Exact lookup by up to 500 dataset or folder IDs; takes precedence over pagination and strips `parentId`/pagination fields while keeping shared filters.",
                            "minItems": 1,
                            "maxItems": 500,
                            "type": "array",
                            "items": {
                              "example": "68ee0bd23d17260b7829b137",
                              "description": "ObjectId",
                              "type": "string",
                              "pattern": "^[0-9a-fA-F]{24}$"
                            }
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "type": {
                        "example": "dataset",
                        "description": "Dataset type filter",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "folder",
                              "dataset",
                              "websiteDataset",
                              "externalFile",
                              "apiDataset",
                              "feishu",
                              "yuque",
                              "dingtalk"
                            ]
                          },
                          {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "folder",
                                "dataset",
                                "websiteDataset",
                                "externalFile",
                                "apiDataset",
                                "feishu",
                                "yuque",
                                "dingtalk"
                              ]
                            }
                          }
                        ]
                      },
                      "searchKey": {
                        "example": "Product Docs",
                        "description": "Search keyword matching dataset name and introduction",
                        "type": "string"
                      },
                      "sort": {
                        "default": "updateTimeDesc",
                        "example": "updateTimeDesc",
                        "description": "Sort order; defaults to most recently updated descending",
                        "x-enumDescriptions": {
                          "updateTimeDesc": "Sort by update time descending (most recently modified first, default)",
                          "createTimeDesc": "Sort by creation time descending (newest first)",
                          "createTimeAsc": "Sort by creation time ascending (oldest first)"
                        },
                        "type": "string",
                        "enum": [
                          "updateTimeDesc",
                          "createTimeDesc",
                          "createTimeAsc"
                        ]
                      },
                      "tmbIds": {
                        "description": "Filter by creator member IDs; an empty array returns an empty list",
                        "type": "array",
                        "items": {
                          "example": "68ee0bd23d17260b7829b137",
                          "description": "ObjectId",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      },
                      "withAppCount": {
                        "example": true,
                        "description": "Whether to count referencing published apps (default `false`; visible to non-folder owners only)",
                        "type": "boolean"
                      },
                      "withFileCount": {
                        "example": true,
                        "description": "Whether to compute total non-folder collection count across all depths (default `false`)",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "datasetIds"
                    ],
                    "description": ""
                  },
                  {
                    "title": "Paginated Lookup",
                    "description": "",
                    "properties": {
                      "parentId": {
                        "allOf": [
                          {
                            "example": null,
                            "description": "Parent folder ID (`null` or empty for root); omit to search across all readable datasets, or set to restrict search to a folder subtree",
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^([0-9a-fA-F]{24})?$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      }
                    },
                    "required": [],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "Offset Pagination",
                            "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                            "type": "object",
                            "properties": {
                              "offset": {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "Pagination Parameters"
                                },
                                "x-fastgpt-union-parameter": {
                                  "label": "Pagination Parameters",
                                  "position": "first"
                                },
                                "example": 0,
                                "description": "0-based offset",
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "pageSize": {
                                "allOf": [
                                  {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "example": 20,
                                    "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                    "default": 20,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 500
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "Pagination Parameters",
                                  "position": "last"
                                }
                              },
                              "type": {
                                "example": "dataset",
                                "description": "Dataset type filter",
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "folder",
                                      "dataset",
                                      "websiteDataset",
                                      "externalFile",
                                      "apiDataset",
                                      "feishu",
                                      "yuque",
                                      "dingtalk"
                                    ]
                                  },
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "enum": [
                                        "folder",
                                        "dataset",
                                        "websiteDataset",
                                        "externalFile",
                                        "apiDataset",
                                        "feishu",
                                        "yuque",
                                        "dingtalk"
                                      ]
                                    }
                                  }
                                ]
                              },
                              "searchKey": {
                                "example": "Product Docs",
                                "description": "Search keyword matching dataset name and introduction",
                                "type": "string"
                              },
                              "sort": {
                                "default": "updateTimeDesc",
                                "example": "updateTimeDesc",
                                "description": "Sort order; defaults to most recently updated descending",
                                "x-enumDescriptions": {
                                  "updateTimeDesc": "Sort by update time descending (most recently modified first, default)",
                                  "createTimeDesc": "Sort by creation time descending (newest first)",
                                  "createTimeAsc": "Sort by creation time ascending (oldest first)"
                                },
                                "type": "string",
                                "enum": [
                                  "updateTimeDesc",
                                  "createTimeDesc",
                                  "createTimeAsc"
                                ]
                              },
                              "tmbIds": {
                                "description": "Filter by creator member IDs; an empty array returns an empty list",
                                "type": "array",
                                "items": {
                                  "example": "68ee0bd23d17260b7829b137",
                                  "description": "ObjectId",
                                  "type": "string",
                                  "pattern": "^[0-9a-fA-F]{24}$"
                                }
                              },
                              "withAppCount": {
                                "example": true,
                                "description": "Whether to count referencing published apps (default `false`; visible to non-folder owners only)",
                                "type": "boolean"
                              },
                              "withFileCount": {
                                "example": true,
                                "description": "Whether to compute total non-folder collection count across all depths (default `false`)",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "offset"
                            ]
                          },
                          {
                            "title": "Page-Number Pagination",
                            "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                            "type": "object",
                            "properties": {
                              "pageNum": {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "Pagination Parameters"
                                },
                                "x-fastgpt-union-parameter": {
                                  "label": "Pagination Parameters",
                                  "position": "first"
                                },
                                "example": 1,
                                "description": "1-based page number; ignored when `offset` is provided",
                                "default": 1,
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              "pageSize": {
                                "allOf": [
                                  {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "Pagination Parameters"
                                    },
                                    "example": 20,
                                    "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                                    "default": 20,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 500
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "Pagination Parameters",
                                  "position": "last"
                                }
                              },
                              "type": {
                                "example": "dataset",
                                "description": "Dataset type filter",
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "folder",
                                      "dataset",
                                      "websiteDataset",
                                      "externalFile",
                                      "apiDataset",
                                      "feishu",
                                      "yuque",
                                      "dingtalk"
                                    ]
                                  },
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "enum": [
                                        "folder",
                                        "dataset",
                                        "websiteDataset",
                                        "externalFile",
                                        "apiDataset",
                                        "feishu",
                                        "yuque",
                                        "dingtalk"
                                      ]
                                    }
                                  }
                                ]
                              },
                              "searchKey": {
                                "example": "Product Docs",
                                "description": "Search keyword matching dataset name and introduction",
                                "type": "string"
                              },
                              "sort": {
                                "default": "updateTimeDesc",
                                "example": "updateTimeDesc",
                                "description": "Sort order; defaults to most recently updated descending",
                                "x-enumDescriptions": {
                                  "updateTimeDesc": "Sort by update time descending (most recently modified first, default)",
                                  "createTimeDesc": "Sort by creation time descending (newest first)",
                                  "createTimeAsc": "Sort by creation time ascending (oldest first)"
                                },
                                "type": "string",
                                "enum": [
                                  "updateTimeDesc",
                                  "createTimeDesc",
                                  "createTimeAsc"
                                ]
                              },
                              "tmbIds": {
                                "description": "Filter by creator member IDs; an empty array returns an empty list",
                                "type": "array",
                                "items": {
                                  "example": "68ee0bd23d17260b7829b137",
                                  "description": "ObjectId",
                                  "type": "string",
                                  "pattern": "^[0-9a-fA-F]{24}$"
                                }
                              },
                              "withAppCount": {
                                "example": true,
                                "description": "Whether to count referencing published apps (default `false`; visible to non-folder owners only)",
                                "type": "boolean"
                              },
                              "withFileCount": {
                                "example": true,
                                "description": "Whether to compute total non-folder collection count across all depths (default `false`)",
                                "type": "boolean"
                              }
                            }
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  }
                ]
              },
              "example": {
                "datasetIds": [
                  "68ad85a7463006c963799a05"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully returned dataset list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "default": 0,
                          "type": "number"
                        },
                        "list": {
                          "default": [],
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "_id": {
                                "description": "Dataset ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "tmbId": {
                                "description": "Team member ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "avatar": {
                                "description": "Avatar",
                                "default": "/icon/logo.svg",
                                "type": "string"
                              },
                              "createTime": {
                                "description": "Creation time",
                                "type": "string"
                              },
                              "updateTime": {
                                "description": "Update time",
                                "type": "string"
                              },
                              "name": {
                                "description": "Name",
                                "type": "string"
                              },
                              "intro": {
                                "description": "Introduction",
                                "type": "string"
                              },
                              "type": {
                                "description": "Dataset type",
                                "type": "string",
                                "enum": [
                                  "folder",
                                  "dataset",
                                  "websiteDataset",
                                  "externalFile",
                                  "apiDataset",
                                  "feishu",
                                  "yuque",
                                  "dingtalk"
                                ]
                              },
                              "permission": {
                                "description": "Serialized permission object JSON structure",
                                "type": "object",
                                "properties": {
                                  "role": {
                                    "description": "Permission role bitmask value",
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "isOwner": {
                                    "description": "Whether the caller has owner permission",
                                    "type": "boolean"
                                  },
                                  "hasManagePer": {
                                    "description": "Whether the caller has manage permission",
                                    "type": "boolean"
                                  },
                                  "hasWritePer": {
                                    "description": "Whether the caller has write permission",
                                    "type": "boolean"
                                  },
                                  "hasReadPer": {
                                    "description": "Whether the caller has read permission",
                                    "type": "boolean"
                                  },
                                  "hasManageRole": {
                                    "description": "Whether manage role bit is set",
                                    "type": "boolean"
                                  },
                                  "hasWriteRole": {
                                    "description": "Whether write role bit is set",
                                    "type": "boolean"
                                  },
                                  "hasReadRole": {
                                    "description": "Whether read role bit is set",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "role",
                                  "isOwner",
                                  "hasManagePer",
                                  "hasWritePer",
                                  "hasReadPer",
                                  "hasManageRole",
                                  "hasWriteRole",
                                  "hasReadRole"
                                ],
                                "additionalProperties": {}
                              },
                              "appCount": {
                                "description": "Count of published apps referencing this dataset (returned only to non-folder owners when enabled)",
                                "example": 0,
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "fileCount": {
                                "description": "Total non-folder collection count across all depths (unfiltered by file permissions; returned only when `withFileCount` is requested on non-folder datasets)",
                                "example": 0,
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "vectorModel": {
                                "description": "Embedding model info (empty for folders or deleted models; inactive models still return display metadata)",
                                "type": "object",
                                "properties": {
                                  "pricing": {
                                    "description": "Credit price per fixed billing unit; omitted if free",
                                    "example": {
                                      "unitPrice": 2
                                    },
                                    "type": "object",
                                    "properties": {
                                      "unitPrice": {
                                        "description": "Composite credit price per million units (tokens/TTS) or per 60 seconds (STT)",
                                        "example": 2,
                                        "type": "number",
                                        "minimum": 0
                                      }
                                    },
                                    "additionalProperties": false
                                  },
                                  "provider": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "model": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "scope": {
                                    "default": "system",
                                    "type": "string",
                                    "enum": [
                                      "system",
                                      "team"
                                    ]
                                  },
                                  "sortOrder": {
                                    "description": "Display rank within the same scope (smaller numbers appear first)",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "tmbId": {
                                    "anyOf": [
                                      {
                                        "example": "68ee0bd23d17260b7829b137",
                                        "description": "ObjectId",
                                        "type": "string",
                                        "pattern": "^[0-9a-fA-F]{24}$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "teamId": {
                                    "anyOf": [
                                      {
                                        "example": "68ee0bd23d17260b7829b137",
                                        "description": "ObjectId",
                                        "type": "string",
                                        "pattern": "^[0-9a-fA-F]{24}$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "isActive": {
                                    "type": "boolean"
                                  },
                                  "isUpcomingDeprecation": {
                                    "description": "Whether the model is scheduled for deprecation",
                                    "example": true,
                                    "type": "boolean"
                                  },
                                  "requestUrl": {
                                    "type": "string"
                                  },
                                  "requestAuth": {
                                    "type": "string"
                                  },
                                  "testMode": {
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "type": "string",
                                    "const": "embedding"
                                  },
                                  "config": {
                                    "type": "object",
                                    "properties": {
                                      "defaultToken": {
                                        "type": "number"
                                      },
                                      "maxToken": {
                                        "type": "number"
                                      },
                                      "weight": {
                                        "default": 0,
                                        "type": "number"
                                      },
                                      "hidden": {
                                        "type": "boolean"
                                      },
                                      "vision": {
                                        "type": "boolean"
                                      },
                                      "normalization": {
                                        "type": "boolean"
                                      },
                                      "batchSize": {
                                        "type": "number"
                                      },
                                      "defaultConfig": {
                                        "type": "object",
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "additionalProperties": {}
                                      },
                                      "dbConfig": {
                                        "type": "object",
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "additionalProperties": {}
                                      },
                                      "queryConfig": {
                                        "type": "object",
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "additionalProperties": {}
                                      }
                                    },
                                    "required": [
                                      "defaultToken",
                                      "maxToken",
                                      "weight"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "modelId": {
                                    "type": "string"
                                  },
                                  "avatar": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "provider",
                                  "model",
                                  "name",
                                  "scope",
                                  "type",
                                  "config",
                                  "modelId"
                                ],
                                "additionalProperties": false
                              },
                              "inheritPermission": {
                                "description": "Whether permissions are inherited from parent",
                                "type": "boolean"
                              },
                              "private": {
                                "description": "Whether access is private to the owner",
                                "type": "boolean"
                              },
                              "folderAccessMode": {
                                "example": "navigate",
                                "description": "Folder access mode; `navigate` allows traversing readable descendants without granting direct read permission",
                                "type": "string",
                                "enum": [
                                  "read",
                                  "navigate"
                                ]
                              },
                              "sourceMember": {
                                "description": "Source member",
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "example": "Alice",
                                    "description": "Member name",
                                    "type": "string"
                                  },
                                  "avatar": {
                                    "description": "Member avatar",
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "status": {
                                    "example": "active",
                                    "description": "Member status",
                                    "type": "string",
                                    "enum": [
                                      "active",
                                      "leave",
                                      "forbidden"
                                    ]
                                  }
                                },
                                "required": [
                                  "name",
                                  "status"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "_id",
                              "tmbId",
                              "avatar",
                              "createTime",
                              "updateTime",
                              "name",
                              "intro",
                              "type",
                              "permission",
                              "inheritPermission"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "total",
                        "list"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/detail": {
      "get": {
        "summary": "Get Dataset Details",
        "description": "Retrieve full dataset configuration including model bindings, permissions, and synchronization status.",
        "tags": [
          "Datasets"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "schema": {
              "example": "68ad85a7463006c963799a05",
              "description": "Dataset ID",
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "required": true,
            "description": "Dataset ID",
            "examples": {
              "default": {
                "value": "68ad85a7463006c963799a05",
                "x-disabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully returned dataset details (omits `createTime`)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "_id": {
                          "description": "Dataset ID",
                          "example": "68ee0bd23d17260b7829b137",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        },
                        "parentId": {
                          "description": "Parent folder ID",
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^([0-9a-fA-F]{24})?$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "userId": {
                          "description": "User ID",
                          "deprecated": true,
                          "example": "68ee0bd23d17260b7829b137",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        },
                        "teamId": {
                          "description": "Team ID",
                          "example": "68ee0bd23d17260b7829b137",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        },
                        "tmbId": {
                          "description": "Team member ID",
                          "example": "68ee0bd23d17260b7829b137",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        },
                        "updateTime": {
                          "description": "Update time",
                          "type": "string"
                        },
                        "inheritPermission": {
                          "description": "Whether permissions are inherited from parent",
                          "type": "boolean"
                        },
                        "collectionPermissionEnabled": {
                          "description": "Collection-level permission toggle (`false` by default, inheriting dataset readability)",
                          "type": "boolean"
                        },
                        "avatar": {
                          "description": "Avatar",
                          "default": "/icon/logo.svg",
                          "type": "string"
                        },
                        "name": {
                          "description": "Name",
                          "type": "string"
                        },
                        "intro": {
                          "description": "Introduction",
                          "type": "string"
                        },
                        "type": {
                          "description": "Dataset type",
                          "type": "string",
                          "enum": [
                            "folder",
                            "dataset",
                            "websiteDataset",
                            "externalFile",
                            "apiDataset",
                            "feishu",
                            "yuque",
                            "dingtalk"
                          ]
                        },
                        "vectorModelId": {
                          "description": "Embedding model ID",
                          "type": "string"
                        },
                        "agentModelId": {
                          "description": "AI model ID",
                          "type": "string"
                        },
                        "vlmModelId": {
                          "description": "VLM model ID",
                          "type": "string"
                        },
                        "websiteConfig": {
                          "description": "Website sync configuration",
                          "type": "object",
                          "properties": {
                            "url": {
                              "description": "Website URL",
                              "type": "string"
                            },
                            "selector": {
                              "description": "CSS selector for website scraping",
                              "type": "string"
                            }
                          },
                          "required": [
                            "url",
                            "selector"
                          ],
                          "additionalProperties": false
                        },
                        "chunkSettings": {
                          "description": "Chunking configuration",
                          "type": "object",
                          "properties": {
                            "trainingType": {
                              "description": "Training mode",
                              "type": "string",
                              "enum": [
                                "chunk",
                                "qa",
                                "imageParse",
                                "backup",
                                "template",
                                "auto"
                              ]
                            },
                            "chunkTriggerType": {
                              "description": "Chunk trigger mode",
                              "type": "string",
                              "enum": [
                                "minSize",
                                "forceChunk",
                                "maxSize"
                              ]
                            },
                            "chunkTriggerMinSize": {
                              "description": "Minimum size threshold to trigger chunking",
                              "type": "number"
                            },
                            "dataEnhanceCollectionName": {
                              "description": "Prepend collection name to chunks",
                              "type": "boolean"
                            },
                            "imageIndex": {
                              "description": "Enable image indexing",
                              "type": "boolean"
                            },
                            "autoIndexes": {
                              "description": "Auto-generate vector indexes",
                              "type": "boolean"
                            },
                            "indexPrefixTitle": {
                              "description": "Prefix title for indexes",
                              "type": "boolean"
                            },
                            "chunkSettingMode": {
                              "description": "Chunk setting preset (`auto`, `custom`, or `intelligent`)",
                              "type": "string",
                              "enum": [
                                "auto",
                                "custom",
                                "intelligent"
                              ]
                            },
                            "chunkSplitMode": {
                              "description": "Chunk splitting mode",
                              "type": "string",
                              "enum": [
                                "paragraph",
                                "size",
                                "char"
                              ]
                            },
                            "paragraphChunkAIMode": {
                              "description": "AI paragraph chunking mode",
                              "type": "string",
                              "enum": [
                                "auto",
                                "force",
                                "forbid"
                              ]
                            },
                            "paragraphChunkDeep": {
                              "description": "Paragraph heading split depth",
                              "type": "number"
                            },
                            "paragraphChunkMinSize": {
                              "description": "Minimum paragraph chunk size",
                              "type": "number"
                            },
                            "chunkSize": {
                              "description": "Target chunk size",
                              "type": "number"
                            },
                            "chunkSplitter": {
                              "description": "Custom primary chunk separator",
                              "type": "string"
                            },
                            "indexSize": {
                              "description": "Vector index chunk size",
                              "type": "number"
                            },
                            "qaPrompt": {
                              "description": "Custom prompt for Q&A extraction",
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        "sangforFileParseConfig": {
                          "description": "External PDF parse configuration",
                          "type": "object",
                          "properties": {
                            "keep_header_footer": {
                              "description": "Whether to keep page headers and footers (default `false`, strips headers/footers)",
                              "type": "boolean"
                            },
                            "keep_appendix": {
                              "description": "Whether to keep appendix sections (default `true`)",
                              "type": "boolean"
                            },
                            "image_analysis": {
                              "description": "Whether to retain OCR/image recognition results including stamps (default `false`)",
                              "type": "boolean"
                            },
                            "chart_analysis": {
                              "description": "Whether to keep chart-to-table extraction results alongside original images (default `false`)",
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": false
                        },
                        "apiDatasetServer": {
                          "description": "API dataset server configuration",
                          "type": "object",
                          "properties": {
                            "apiServer": {
                              "description": "API dataset server configuration",
                              "type": "object",
                              "properties": {
                                "baseUrl": {
                                  "type": "string"
                                },
                                "authorization": {
                                  "type": "string"
                                },
                                "basePath": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "baseUrl"
                              ],
                              "additionalProperties": false
                            },
                            "feishuServer": {
                              "description": "Lark (Feishu) server configuration",
                              "type": "object",
                              "properties": {
                                "appId": {
                                  "type": "string"
                                },
                                "appSecret": {
                                  "type": "string"
                                },
                                "folderToken": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "appId",
                                "folderToken"
                              ],
                              "additionalProperties": false
                            },
                            "yuqueServer": {
                              "description": "Yuque server configuration",
                              "type": "object",
                              "properties": {
                                "userId": {
                                  "type": "string"
                                },
                                "token": {
                                  "type": "string"
                                },
                                "basePath": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "userId"
                              ],
                              "additionalProperties": false
                            },
                            "dingtalkServer": {
                              "description": "DingTalk dataset configuration",
                              "type": "object",
                              "properties": {
                                "appKey": {
                                  "type": "string"
                                },
                                "appSecret": {
                                  "type": "string"
                                },
                                "userId": {
                                  "type": "string"
                                },
                                "operatorId": {
                                  "type": "string"
                                },
                                "workspaceId": {
                                  "type": "string"
                                },
                                "rootNodeId": {
                                  "type": "string"
                                },
                                "workspaceName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "appKey",
                                "userId"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "additionalProperties": false
                        },
                        "deleteTime": {
                          "description": "Deletion timestamp",
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "autoSync": {
                          "description": "Auto-sync enabled",
                          "type": "boolean"
                        },
                        "externalReadUrl": {
                          "description": "External source URL",
                          "deprecated": true,
                          "type": "string"
                        },
                        "defaultPermission": {
                          "description": "Default permission level",
                          "deprecated": true,
                          "type": "number"
                        },
                        "apiServer": {
                          "description": "API dataset server configuration",
                          "deprecated": true,
                          "type": "object",
                          "properties": {
                            "baseUrl": {
                              "type": "string"
                            },
                            "authorization": {
                              "type": "string"
                            },
                            "basePath": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "baseUrl"
                          ],
                          "additionalProperties": false
                        },
                        "feishuServer": {
                          "description": "Lark (Feishu) server configuration",
                          "deprecated": true,
                          "type": "object",
                          "properties": {
                            "appId": {
                              "type": "string"
                            },
                            "appSecret": {
                              "type": "string"
                            },
                            "folderToken": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "appId",
                            "folderToken"
                          ],
                          "additionalProperties": false
                        },
                        "yuqueServer": {
                          "description": "Yuque server configuration",
                          "deprecated": true,
                          "type": "object",
                          "properties": {
                            "userId": {
                              "type": "string"
                            },
                            "token": {
                              "type": "string"
                            },
                            "basePath": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "userId"
                          ],
                          "additionalProperties": false
                        },
                        "dingtalkServer": {
                          "description": "DingTalk dataset configuration",
                          "deprecated": true,
                          "type": "object",
                          "properties": {
                            "appKey": {
                              "type": "string"
                            },
                            "appSecret": {
                              "type": "string"
                            },
                            "userId": {
                              "type": "string"
                            },
                            "operatorId": {
                              "type": "string"
                            },
                            "workspaceId": {
                              "type": "string"
                            },
                            "rootNodeId": {
                              "type": "string"
                            },
                            "workspaceName": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "appKey",
                            "userId"
                          ],
                          "additionalProperties": false
                        },
                        "status": {
                          "description": "Synchronization/training status",
                          "type": "string",
                          "enum": [
                            "active",
                            "syncing",
                            "waiting",
                            "error"
                          ]
                        },
                        "hasTrainingTask": {
                          "description": "Whether active training jobs or pending/failed index/synonym rebuild tasks exist",
                          "example": false,
                          "type": "boolean"
                        },
                        "errorMsg": {
                          "description": "Error details",
                          "type": "string"
                        },
                        "vectorModel": {
                          "description": "Embedding model details (empty if deleted; inactive models still return display metadata)",
                          "type": "object",
                          "properties": {
                            "pricing": {
                              "description": "Credit price per fixed billing unit; omitted if free",
                              "example": {
                                "unitPrice": 2
                              },
                              "type": "object",
                              "properties": {
                                "unitPrice": {
                                  "description": "Composite credit price per million units (tokens/TTS) or per 60 seconds (STT)",
                                  "example": 2,
                                  "type": "number",
                                  "minimum": 0
                                }
                              },
                              "additionalProperties": false
                            },
                            "provider": {
                              "type": "string",
                              "minLength": 1
                            },
                            "model": {
                              "type": "string",
                              "minLength": 1
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "scope": {
                              "default": "system",
                              "type": "string",
                              "enum": [
                                "system",
                                "team"
                              ]
                            },
                            "sortOrder": {
                              "description": "Display rank within the same scope (smaller numbers appear first)",
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "tmbId": {
                              "anyOf": [
                                {
                                  "example": "68ee0bd23d17260b7829b137",
                                  "description": "ObjectId",
                                  "type": "string",
                                  "pattern": "^[0-9a-fA-F]{24}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "teamId": {
                              "anyOf": [
                                {
                                  "example": "68ee0bd23d17260b7829b137",
                                  "description": "ObjectId",
                                  "type": "string",
                                  "pattern": "^[0-9a-fA-F]{24}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "isActive": {
                              "type": "boolean"
                            },
                            "isUpcomingDeprecation": {
                              "description": "Whether the model is scheduled for deprecation",
                              "example": true,
                              "type": "boolean"
                            },
                            "requestUrl": {
                              "type": "string"
                            },
                            "requestAuth": {
                              "type": "string"
                            },
                            "testMode": {
                              "type": "boolean"
                            },
                            "type": {
                              "type": "string",
                              "const": "embedding"
                            },
                            "config": {
                              "type": "object",
                              "properties": {
                                "defaultToken": {
                                  "type": "number"
                                },
                                "maxToken": {
                                  "type": "number"
                                },
                                "weight": {
                                  "default": 0,
                                  "type": "number"
                                },
                                "hidden": {
                                  "type": "boolean"
                                },
                                "vision": {
                                  "type": "boolean"
                                },
                                "normalization": {
                                  "type": "boolean"
                                },
                                "batchSize": {
                                  "type": "number"
                                },
                                "defaultConfig": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                "dbConfig": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                "queryConfig": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                }
                              },
                              "required": [
                                "defaultToken",
                                "maxToken",
                                "weight"
                              ],
                              "additionalProperties": false
                            },
                            "modelId": {
                              "type": "string"
                            },
                            "avatar": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "provider",
                            "model",
                            "name",
                            "scope",
                            "type",
                            "config",
                            "modelId"
                          ],
                          "additionalProperties": false
                        },
                        "agentModel": {
                          "description": "AI model details (empty if deleted; inactive models still return display metadata)",
                          "type": "object",
                          "properties": {
                            "pricing": {
                              "description": "Tiered LLM pricing per million tokens; omitted if free",
                              "example": {
                                "tiers": [
                                  {
                                    "inputPrice": 2,
                                    "outputPrice": 4
                                  }
                                ]
                              },
                              "type": "object",
                              "properties": {
                                "tiers": {
                                  "description": "LLM pricing tier (lower bound derives from the previous tier upper bound)",
                                  "maxItems": 5,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "maxInputTokensK": {
                                        "description": "Upper input limit for this tier in thousands of tokens. Omit for unlimited",
                                        "example": 32,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "inputPrice": {
                                        "description": "Credit price per million input tokens",
                                        "example": 2,
                                        "type": "number",
                                        "minimum": 0
                                      },
                                      "outputPrice": {
                                        "description": "Credit price per million output tokens",
                                        "example": 4,
                                        "type": "number",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "inputPrice",
                                      "outputPrice"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "additionalProperties": false
                            },
                            "provider": {
                              "type": "string",
                              "minLength": 1
                            },
                            "model": {
                              "type": "string",
                              "minLength": 1
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "scope": {
                              "default": "system",
                              "type": "string",
                              "enum": [
                                "system",
                                "team"
                              ]
                            },
                            "sortOrder": {
                              "description": "Display rank within the same scope (smaller numbers appear first)",
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "tmbId": {
                              "anyOf": [
                                {
                                  "example": "68ee0bd23d17260b7829b137",
                                  "description": "ObjectId",
                                  "type": "string",
                                  "pattern": "^[0-9a-fA-F]{24}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "teamId": {
                              "anyOf": [
                                {
                                  "example": "68ee0bd23d17260b7829b137",
                                  "description": "ObjectId",
                                  "type": "string",
                                  "pattern": "^[0-9a-fA-F]{24}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "isActive": {
                              "type": "boolean"
                            },
                            "isUpcomingDeprecation": {
                              "description": "Whether the model is scheduled for deprecation",
                              "example": true,
                              "type": "boolean"
                            },
                            "requestUrl": {
                              "type": "string"
                            },
                            "requestAuth": {
                              "type": "string"
                            },
                            "testMode": {
                              "type": "boolean"
                            },
                            "type": {
                              "type": "string",
                              "const": "llm"
                            },
                            "config": {
                              "type": "object",
                              "properties": {
                                "maxContext": {
                                  "type": "number"
                                },
                                "maxResponse": {
                                  "type": "number"
                                },
                                "quoteMaxToken": {
                                  "type": "number"
                                },
                                "maxTemperature": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "showTopP": {
                                  "type": "boolean"
                                },
                                "responseFormatList": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "showStopSign": {
                                  "type": "boolean"
                                },
                                "censor": {
                                  "type": "boolean"
                                },
                                "vision": {
                                  "type": "boolean"
                                },
                                "audio": {
                                  "type": "boolean"
                                },
                                "video": {
                                  "type": "boolean"
                                },
                                "reasoning": {
                                  "type": "boolean"
                                },
                                "reasoningEffort": {
                                  "type": "boolean"
                                },
                                "functionCall": {
                                  "type": "boolean"
                                },
                                "toolChoice": {
                                  "type": "boolean"
                                },
                                "defaultSystemChatPrompt": {
                                  "type": "string"
                                },
                                "defaultConfig": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                "fieldMap": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                }
                              },
                              "required": [
                                "maxContext",
                                "maxResponse",
                                "quoteMaxToken"
                              ],
                              "additionalProperties": false
                            },
                            "modelId": {
                              "type": "string"
                            },
                            "avatar": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "provider",
                            "model",
                            "name",
                            "scope",
                            "type",
                            "config",
                            "modelId"
                          ],
                          "additionalProperties": false
                        },
                        "vlmModel": {
                          "description": "Vision-Language Model (VLM)",
                          "type": "object",
                          "properties": {
                            "pricing": {
                              "description": "Tiered LLM pricing per million tokens; omitted if free",
                              "example": {
                                "tiers": [
                                  {
                                    "inputPrice": 2,
                                    "outputPrice": 4
                                  }
                                ]
                              },
                              "type": "object",
                              "properties": {
                                "tiers": {
                                  "description": "LLM pricing tier (lower bound derives from the previous tier upper bound)",
                                  "maxItems": 5,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "maxInputTokensK": {
                                        "description": "Upper input limit for this tier in thousands of tokens. Omit for unlimited",
                                        "example": 32,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "inputPrice": {
                                        "description": "Credit price per million input tokens",
                                        "example": 2,
                                        "type": "number",
                                        "minimum": 0
                                      },
                                      "outputPrice": {
                                        "description": "Credit price per million output tokens",
                                        "example": 4,
                                        "type": "number",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "inputPrice",
                                      "outputPrice"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "additionalProperties": false
                            },
                            "provider": {
                              "type": "string",
                              "minLength": 1
                            },
                            "model": {
                              "type": "string",
                              "minLength": 1
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "scope": {
                              "default": "system",
                              "type": "string",
                              "enum": [
                                "system",
                                "team"
                              ]
                            },
                            "sortOrder": {
                              "description": "Display rank within the same scope (smaller numbers appear first)",
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "tmbId": {
                              "anyOf": [
                                {
                                  "example": "68ee0bd23d17260b7829b137",
                                  "description": "ObjectId",
                                  "type": "string",
                                  "pattern": "^[0-9a-fA-F]{24}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "teamId": {
                              "anyOf": [
                                {
                                  "example": "68ee0bd23d17260b7829b137",
                                  "description": "ObjectId",
                                  "type": "string",
                                  "pattern": "^[0-9a-fA-F]{24}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "isActive": {
                              "type": "boolean"
                            },
                            "isUpcomingDeprecation": {
                              "description": "Whether the model is scheduled for deprecation",
                              "example": true,
                              "type": "boolean"
                            },
                            "requestUrl": {
                              "type": "string"
                            },
                            "requestAuth": {
                              "type": "string"
                            },
                            "testMode": {
                              "type": "boolean"
                            },
                            "type": {
                              "type": "string",
                              "const": "llm"
                            },
                            "config": {
                              "type": "object",
                              "properties": {
                                "maxContext": {
                                  "type": "number"
                                },
                                "maxResponse": {
                                  "type": "number"
                                },
                                "quoteMaxToken": {
                                  "type": "number"
                                },
                                "maxTemperature": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "showTopP": {
                                  "type": "boolean"
                                },
                                "responseFormatList": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "showStopSign": {
                                  "type": "boolean"
                                },
                                "censor": {
                                  "type": "boolean"
                                },
                                "vision": {
                                  "type": "boolean"
                                },
                                "audio": {
                                  "type": "boolean"
                                },
                                "video": {
                                  "type": "boolean"
                                },
                                "reasoning": {
                                  "type": "boolean"
                                },
                                "reasoningEffort": {
                                  "type": "boolean"
                                },
                                "functionCall": {
                                  "type": "boolean"
                                },
                                "toolChoice": {
                                  "type": "boolean"
                                },
                                "defaultSystemChatPrompt": {
                                  "type": "string"
                                },
                                "defaultConfig": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                "fieldMap": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                }
                              },
                              "required": [
                                "maxContext",
                                "maxResponse",
                                "quoteMaxToken"
                              ],
                              "additionalProperties": false
                            },
                            "modelId": {
                              "type": "string"
                            },
                            "avatar": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "provider",
                            "model",
                            "name",
                            "scope",
                            "type",
                            "config",
                            "modelId"
                          ],
                          "additionalProperties": false
                        },
                        "permission": {
                          "description": "Serialized permission object JSON structure",
                          "type": "object",
                          "properties": {
                            "role": {
                              "description": "Permission role bitmask value",
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "isOwner": {
                              "description": "Whether the caller has owner permission",
                              "type": "boolean"
                            },
                            "hasManagePer": {
                              "description": "Whether the caller has manage permission",
                              "type": "boolean"
                            },
                            "hasWritePer": {
                              "description": "Whether the caller has write permission",
                              "type": "boolean"
                            },
                            "hasReadPer": {
                              "description": "Whether the caller has read permission",
                              "type": "boolean"
                            },
                            "hasManageRole": {
                              "description": "Whether manage role bit is set",
                              "type": "boolean"
                            },
                            "hasWriteRole": {
                              "description": "Whether write role bit is set",
                              "type": "boolean"
                            },
                            "hasReadRole": {
                              "description": "Whether read role bit is set",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "role",
                            "isOwner",
                            "hasManagePer",
                            "hasWritePer",
                            "hasReadPer",
                            "hasManageRole",
                            "hasWriteRole",
                            "hasReadRole"
                          ],
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "_id",
                        "teamId",
                        "tmbId",
                        "updateTime",
                        "inheritPermission",
                        "avatar",
                        "name",
                        "intro",
                        "type",
                        "status",
                        "hasTrainingTask",
                        "permission"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/delete": {
      "delete": {
        "summary": "Delete Dataset",
        "description": "Delete a dataset or folder and all nested child datasets (requires owner permission).",
        "tags": [
          "Datasets"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "schema": {
              "example": "68ad85a7463006c963799a05",
              "description": "Dataset ID",
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "required": true,
            "description": "Dataset ID",
            "examples": {
              "default": {
                "value": "68ad85a7463006c963799a05",
                "x-disabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully deleted dataset",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/update": {
      "put": {
        "summary": "Update Dataset",
        "description": "Update dataset metadata, model settings, sync configuration, or move it to another folder.",
        "tags": [
          "Datasets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "example": "68ad85a7463006c963799a05",
                    "description": "Dataset ID",
                    "type": "string",
                    "pattern": "^[0-9a-fA-F]{24}$"
                  },
                  "parentId": {
                    "example": "68ad85a7463006c963799a05",
                    "description": "Parent folder ID; pass `null` to move to the root directory",
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([0-9a-fA-F]{24})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "example": "My Dataset",
                    "description": "Dataset name",
                    "type": "string"
                  },
                  "avatar": {
                    "example": "/imgs/dataset/avatar.png",
                    "description": "Dataset avatar URL",
                    "type": "string"
                  },
                  "intro": {
                    "example": "A knowledge base dataset for storing product documentation.",
                    "description": "Dataset introduction",
                    "type": "string"
                  },
                  "agentModelId": {
                    "description": "Dataset Agent model ID; omitted leaves unchanged, cannot be cleared",
                    "type": "string",
                    "minLength": 1
                  },
                  "agentModel": {
                    "description": "Legacy dataset Agent model identifier; used only when `agentModelId` is omitted",
                    "deprecated": true,
                    "type": "string",
                    "minLength": 1
                  },
                  "vlmModelId": {
                    "description": "VLM model ID; omitted leaves unchanged, `null` or empty string clears it",
                    "example": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "vlmModel": {
                    "description": "Legacy VLM model identifier; used only when `vlmModelId` is omitted (`null` or empty string clears it)",
                    "deprecated": true,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "websiteConfig": {
                    "description": "Website dataset configuration",
                    "type": "object",
                    "properties": {
                      "url": {
                        "description": "Website URL",
                        "type": "string"
                      },
                      "selector": {
                        "description": "CSS selector for website scraping",
                        "type": "string"
                      }
                    },
                    "required": [
                      "url",
                      "selector"
                    ]
                  },
                  "externalReadUrl": {
                    "description": "External source URL",
                    "type": "string"
                  },
                  "apiDatasetServer": {
                    "description": "Third-party dataset server configuration (API / Lark / Yuque / DingTalk)",
                    "type": "object",
                    "properties": {
                      "apiServer": {
                        "description": "API dataset server configuration",
                        "type": "object",
                        "properties": {
                          "baseUrl": {
                            "type": "string"
                          },
                          "authorization": {
                            "type": "string"
                          },
                          "basePath": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "baseUrl"
                        ]
                      },
                      "feishuServer": {
                        "description": "Lark (Feishu) server configuration",
                        "type": "object",
                        "properties": {
                          "appId": {
                            "type": "string"
                          },
                          "appSecret": {
                            "type": "string"
                          },
                          "folderToken": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "appId",
                          "folderToken"
                        ]
                      },
                      "yuqueServer": {
                        "description": "Yuque server configuration",
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "token": {
                            "type": "string"
                          },
                          "basePath": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "userId"
                        ]
                      },
                      "dingtalkServer": {
                        "description": "DingTalk dataset configuration",
                        "type": "object",
                        "properties": {
                          "appKey": {
                            "type": "string"
                          },
                          "appSecret": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "operatorId": {
                            "type": "string"
                          },
                          "workspaceId": {
                            "type": "string"
                          },
                          "rootNodeId": {
                            "type": "string"
                          },
                          "workspaceName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "appKey",
                          "userId"
                        ]
                      }
                    }
                  },
                  "autoSync": {
                    "description": "Whether auto-sync is enabled",
                    "type": "boolean"
                  },
                  "chunkSettings": {
                    "description": "Chunking configuration",
                    "type": "object",
                    "properties": {
                      "trainingType": {
                        "description": "Training mode",
                        "type": "string",
                        "enum": [
                          "chunk",
                          "qa",
                          "imageParse",
                          "backup",
                          "template",
                          "auto"
                        ]
                      },
                      "chunkTriggerType": {
                        "description": "Chunk trigger mode",
                        "type": "string",
                        "enum": [
                          "minSize",
                          "forceChunk",
                          "maxSize"
                        ]
                      },
                      "chunkTriggerMinSize": {
                        "description": "Minimum size threshold to trigger chunking",
                        "type": "number"
                      },
                      "dataEnhanceCollectionName": {
                        "description": "Prepend collection name to chunks",
                        "type": "boolean"
                      },
                      "imageIndex": {
                        "description": "Enable image indexing",
                        "type": "boolean"
                      },
                      "autoIndexes": {
                        "description": "Auto-generate vector indexes",
                        "type": "boolean"
                      },
                      "indexPrefixTitle": {
                        "description": "Prefix title for indexes",
                        "type": "boolean"
                      },
                      "chunkSettingMode": {
                        "description": "Chunk setting preset (`auto`, `custom`, or `intelligent`)",
                        "type": "string",
                        "enum": [
                          "auto",
                          "custom",
                          "intelligent"
                        ]
                      },
                      "chunkSplitMode": {
                        "description": "Chunk splitting mode",
                        "type": "string",
                        "enum": [
                          "paragraph",
                          "size",
                          "char"
                        ]
                      },
                      "paragraphChunkAIMode": {
                        "description": "AI paragraph chunking mode",
                        "type": "string",
                        "enum": [
                          "auto",
                          "force",
                          "forbid"
                        ]
                      },
                      "paragraphChunkDeep": {
                        "description": "Paragraph heading split depth",
                        "type": "number"
                      },
                      "paragraphChunkMinSize": {
                        "description": "Minimum paragraph chunk size",
                        "type": "number"
                      },
                      "chunkSize": {
                        "description": "Target chunk size",
                        "type": "number"
                      },
                      "chunkSplitter": {
                        "description": "Custom primary chunk separator",
                        "type": "string"
                      },
                      "indexSize": {
                        "description": "Vector index chunk size",
                        "type": "number"
                      },
                      "qaPrompt": {
                        "description": "Custom prompt for Q&A extraction",
                        "type": "string"
                      }
                    }
                  },
                  "sangforFileParseConfig": {
                    "description": "External PDF parsing switches (headers/footers, appendix, image OCR, chart-to-table); applies only to `customPdfParse` for newly parsed files",
                    "type": "object",
                    "properties": {
                      "keep_header_footer": {
                        "description": "Whether to keep page headers and footers (default `false`, strips headers/footers)",
                        "type": "boolean"
                      },
                      "keep_appendix": {
                        "description": "Whether to keep appendix sections (default `true`)",
                        "type": "boolean"
                      },
                      "image_analysis": {
                        "description": "Whether to retain OCR/image recognition results including stamps (default `false`)",
                        "type": "boolean"
                      },
                      "chart_analysis": {
                        "description": "Whether to keep chart-to-table extraction results alongside original images (default `false`)",
                        "type": "boolean"
                      }
                    }
                  }
                },
                "required": [
                  "id"
                ]
              },
              "example": {
                "id": "68ad85a7463006c963799a05"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully updated dataset",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/create": {
      "post": {
        "summary": "Create Empty Collection or Folder",
        "description": "Create an empty virtual dataset collection or folder.",
        "tags": [
          "Create Collections"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "datasetId": {
                    "description": "Dataset ID",
                    "type": "string"
                  },
                  "parentId": {
                    "description": "Parent folder ID",
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([0-9a-fA-F]{24})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "description": "Collection name",
                    "type": "string"
                  },
                  "type": {
                    "description": "Collection type (`folder` or `virtual` manual collection)",
                    "type": "string",
                    "enum": [
                      "folder",
                      "virtual"
                    ]
                  },
                  "tags": {
                    "description": "List of collection tags. String items map to legacy `default_tag` tags; object items `{ tag, value }` resolve by tag name.",
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "tag": {
                              "type": "string"
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          },
                          "required": [
                            "tag",
                            "value"
                          ]
                        }
                      ]
                    }
                  },
                  "inheritPermission": {
                    "example": true,
                    "description": "Whether to inherit parent permissions (default `true`, applies only when `type=folder`). `true` inherits from parent/dataset; `false` creates an isolated folder with creator `owner` permission only (requires collection-level permissions enabled on the dataset, otherwise returns `collectionPermissionDisabled`).",
                    "type": "boolean"
                  }
                },
                "required": [
                  "datasetId",
                  "name",
                  "type"
                ]
              },
              "example": {
                "datasetId": "string",
                "name": "string",
                "type": "folder"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully returned the newly created collection ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/create/localFile": {
      "post": {
        "summary": "Create Collection from Local File",
        "description": "Upload a local file via `multipart/form-data` (`file` binary part + JSON-serialized `data` part), store it in S3, create the collection, and trigger training.",
        "tags": [
          "Create Collections"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "encoding": {
                "data": {
                  "contentType": "application/json"
                }
              },
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "format": "binary",
                    "description": "Uploaded binary file",
                    "type": "string"
                  },
                  "data": {
                    "description": "Collection parameters passed as a serialized JSON string",
                    "type": "object",
                    "properties": {
                      "trainingType": {
                        "description": "Training mode",
                        "type": "string",
                        "enum": [
                          "chunk",
                          "qa",
                          "imageParse",
                          "backup",
                          "template",
                          "auto"
                        ]
                      },
                      "chunkTriggerType": {
                        "description": "Chunk trigger mode",
                        "type": "string",
                        "enum": [
                          "minSize",
                          "forceChunk",
                          "maxSize"
                        ]
                      },
                      "chunkTriggerMinSize": {
                        "description": "Minimum size threshold to trigger chunking",
                        "type": "number"
                      },
                      "dataEnhanceCollectionName": {
                        "description": "Prepend collection name to chunks",
                        "type": "boolean"
                      },
                      "imageIndex": {
                        "description": "Enable image indexing",
                        "type": "boolean"
                      },
                      "autoIndexes": {
                        "description": "Auto-generate vector indexes",
                        "type": "boolean"
                      },
                      "indexPrefixTitle": {
                        "description": "Prefix title for indexes",
                        "type": "boolean"
                      },
                      "chunkSettingMode": {
                        "description": "Chunk setting preset (`auto`, `custom`, or `intelligent`)",
                        "type": "string",
                        "enum": [
                          "auto",
                          "custom",
                          "intelligent"
                        ]
                      },
                      "chunkSplitMode": {
                        "description": "Chunk splitting mode",
                        "type": "string",
                        "enum": [
                          "paragraph",
                          "size",
                          "char"
                        ]
                      },
                      "paragraphChunkAIMode": {
                        "description": "AI paragraph chunking mode",
                        "type": "string",
                        "enum": [
                          "auto",
                          "force",
                          "forbid"
                        ]
                      },
                      "paragraphChunkDeep": {
                        "description": "Paragraph heading split depth",
                        "type": "number"
                      },
                      "paragraphChunkMinSize": {
                        "description": "Minimum paragraph chunk size",
                        "type": "number"
                      },
                      "chunkSize": {
                        "description": "Target chunk size",
                        "type": "number"
                      },
                      "chunkSplitter": {
                        "description": "Custom primary chunk separator",
                        "type": "string"
                      },
                      "indexSize": {
                        "description": "Vector index chunk size",
                        "type": "number"
                      },
                      "qaPrompt": {
                        "description": "Custom prompt for Q&A extraction",
                        "type": "string"
                      },
                      "parentId": {
                        "description": "Parent folder ID",
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^([0-9a-fA-F]{24})?$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "metadata": {
                        "description": "Metadata",
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "customPdfParse": {
                        "description": "Custom PDF parser",
                        "type": "boolean"
                      },
                      "datasetId": {
                        "description": "Dataset ID",
                        "type": "string"
                      },
                      "tags": {
                        "description": "List of collection tags. String items map to legacy `default_tag` tags; object items `{ tag, value }` resolve by tag name.",
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "tag": {
                                  "type": "string"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "tag",
                                "value"
                              ]
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "datasetId"
                    ]
                  }
                },
                "required": [
                  "file",
                  "data"
                ]
              },
              "example": {
                "file": "string",
                "data": {
                  "datasetId": "string"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully returned collection ID and chunk insertion results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/create/link": {
      "post": {
        "summary": "Create Collection from Link",
        "description": "Fetch content from a specified web URL, create a collection, and trigger indexing training.",
        "tags": [
          "Create Collections"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "trainingType": {
                    "description": "Training mode",
                    "type": "string",
                    "enum": [
                      "chunk",
                      "qa",
                      "imageParse",
                      "backup",
                      "template",
                      "auto"
                    ]
                  },
                  "chunkTriggerType": {
                    "description": "Chunk trigger mode",
                    "type": "string",
                    "enum": [
                      "minSize",
                      "forceChunk",
                      "maxSize"
                    ]
                  },
                  "chunkTriggerMinSize": {
                    "description": "Minimum size threshold to trigger chunking",
                    "type": "number"
                  },
                  "dataEnhanceCollectionName": {
                    "description": "Prepend collection name to chunks",
                    "type": "boolean"
                  },
                  "imageIndex": {
                    "description": "Enable image indexing",
                    "type": "boolean"
                  },
                  "autoIndexes": {
                    "description": "Auto-generate vector indexes",
                    "type": "boolean"
                  },
                  "indexPrefixTitle": {
                    "description": "Prefix title for indexes",
                    "type": "boolean"
                  },
                  "chunkSettingMode": {
                    "description": "Chunk setting preset (`auto`, `custom`, or `intelligent`)",
                    "type": "string",
                    "enum": [
                      "auto",
                      "custom",
                      "intelligent"
                    ]
                  },
                  "chunkSplitMode": {
                    "description": "Chunk splitting mode",
                    "type": "string",
                    "enum": [
                      "paragraph",
                      "size",
                      "char"
                    ]
                  },
                  "paragraphChunkAIMode": {
                    "description": "AI paragraph chunking mode",
                    "type": "string",
                    "enum": [
                      "auto",
                      "force",
                      "forbid"
                    ]
                  },
                  "paragraphChunkDeep": {
                    "description": "Paragraph heading split depth",
                    "type": "number"
                  },
                  "paragraphChunkMinSize": {
                    "description": "Minimum paragraph chunk size",
                    "type": "number"
                  },
                  "chunkSize": {
                    "description": "Target chunk size",
                    "type": "number"
                  },
                  "chunkSplitter": {
                    "description": "Custom primary chunk separator",
                    "type": "string"
                  },
                  "indexSize": {
                    "description": "Vector index chunk size",
                    "type": "number"
                  },
                  "qaPrompt": {
                    "description": "Custom prompt for Q&A extraction",
                    "type": "string"
                  },
                  "parentId": {
                    "description": "Parent folder ID",
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([0-9a-fA-F]{24})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metadata": {
                    "description": "Metadata",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "customPdfParse": {
                    "description": "Custom PDF parser",
                    "type": "boolean"
                  },
                  "datasetId": {
                    "description": "Dataset ID",
                    "type": "string"
                  },
                  "tags": {
                    "description": "List of collection tags. String items map to legacy `default_tag` tags; object items `{ tag, value }` resolve by tag name.",
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "tag": {
                              "type": "string"
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          },
                          "required": [
                            "tag",
                            "value"
                          ]
                        }
                      ]
                    }
                  },
                  "link": {
                    "description": "Source web page URL",
                    "type": "string",
                    "format": "uri"
                  }
                },
                "required": [
                  "datasetId",
                  "link"
                ]
              },
              "example": {
                "datasetId": "string",
                "link": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully returned collection ID and chunk insertion results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/create/text": {
      "post": {
        "summary": "Create Collection from Text",
        "description": "Store raw text content as a file, create a collection, and trigger indexing training.",
        "tags": [
          "Create Collections"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "trainingType": {
                    "description": "Training mode",
                    "type": "string",
                    "enum": [
                      "chunk",
                      "qa",
                      "imageParse",
                      "backup",
                      "template",
                      "auto"
                    ]
                  },
                  "chunkTriggerType": {
                    "description": "Chunk trigger mode",
                    "type": "string",
                    "enum": [
                      "minSize",
                      "forceChunk",
                      "maxSize"
                    ]
                  },
                  "chunkTriggerMinSize": {
                    "description": "Minimum size threshold to trigger chunking",
                    "type": "number"
                  },
                  "dataEnhanceCollectionName": {
                    "description": "Prepend collection name to chunks",
                    "type": "boolean"
                  },
                  "imageIndex": {
                    "description": "Enable image indexing",
                    "type": "boolean"
                  },
                  "autoIndexes": {
                    "description": "Auto-generate vector indexes",
                    "type": "boolean"
                  },
                  "indexPrefixTitle": {
                    "description": "Prefix title for indexes",
                    "type": "boolean"
                  },
                  "chunkSettingMode": {
                    "description": "Chunk setting preset (`auto`, `custom`, or `intelligent`)",
                    "type": "string",
                    "enum": [
                      "auto",
                      "custom",
                      "intelligent"
                    ]
                  },
                  "chunkSplitMode": {
                    "description": "Chunk splitting mode",
                    "type": "string",
                    "enum": [
                      "paragraph",
                      "size",
                      "char"
                    ]
                  },
                  "paragraphChunkAIMode": {
                    "description": "AI paragraph chunking mode",
                    "type": "string",
                    "enum": [
                      "auto",
                      "force",
                      "forbid"
                    ]
                  },
                  "paragraphChunkDeep": {
                    "description": "Paragraph heading split depth",
                    "type": "number"
                  },
                  "paragraphChunkMinSize": {
                    "description": "Minimum paragraph chunk size",
                    "type": "number"
                  },
                  "chunkSize": {
                    "description": "Target chunk size",
                    "type": "number"
                  },
                  "chunkSplitter": {
                    "description": "Custom primary chunk separator",
                    "type": "string"
                  },
                  "indexSize": {
                    "description": "Vector index chunk size",
                    "type": "number"
                  },
                  "qaPrompt": {
                    "description": "Custom prompt for Q&A extraction",
                    "type": "string"
                  },
                  "parentId": {
                    "description": "Parent folder ID",
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([0-9a-fA-F]{24})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metadata": {
                    "description": "Metadata",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "customPdfParse": {
                    "description": "Custom PDF parser",
                    "type": "boolean"
                  },
                  "datasetId": {
                    "description": "Dataset ID",
                    "type": "string"
                  },
                  "tags": {
                    "description": "List of collection tags. String items map to legacy `default_tag` tags; object items `{ tag, value }` resolve by tag name.",
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "tag": {
                              "type": "string"
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          },
                          "required": [
                            "tag",
                            "value"
                          ]
                        }
                      ]
                    }
                  },
                  "name": {
                    "description": "Collection name",
                    "type": "string"
                  },
                  "text": {
                    "description": "Raw text content",
                    "type": "string"
                  }
                },
                "required": [
                  "datasetId",
                  "name",
                  "text"
                ]
              },
              "example": {
                "datasetId": "string",
                "name": "string",
                "text": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully returned collection ID and chunk insertion results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/create/apiCollection": {
      "post": {
        "summary": "Create Collection from API Dataset (V1)",
        "description": "Import a single file from a third-party API dataset by `apiFileId` and create a collection.",
        "deprecated": true,
        "tags": [
          "Create Collections"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "trainingType": {
                    "description": "Training mode",
                    "type": "string",
                    "enum": [
                      "chunk",
                      "qa",
                      "imageParse",
                      "backup",
                      "template",
                      "auto"
                    ]
                  },
                  "chunkTriggerType": {
                    "description": "Chunk trigger mode",
                    "type": "string",
                    "enum": [
                      "minSize",
                      "forceChunk",
                      "maxSize"
                    ]
                  },
                  "chunkTriggerMinSize": {
                    "description": "Minimum size threshold to trigger chunking",
                    "type": "number"
                  },
                  "dataEnhanceCollectionName": {
                    "description": "Prepend collection name to chunks",
                    "type": "boolean"
                  },
                  "imageIndex": {
                    "description": "Enable image indexing",
                    "type": "boolean"
                  },
                  "autoIndexes": {
                    "description": "Auto-generate vector indexes",
                    "type": "boolean"
                  },
                  "indexPrefixTitle": {
                    "description": "Prefix title for indexes",
                    "type": "boolean"
                  },
                  "chunkSettingMode": {
                    "description": "Chunk setting preset (`auto`, `custom`, or `intelligent`)",
                    "type": "string",
                    "enum": [
                      "auto",
                      "custom",
                      "intelligent"
                    ]
                  },
                  "chunkSplitMode": {
                    "description": "Chunk splitting mode",
                    "type": "string",
                    "enum": [
                      "paragraph",
                      "size",
                      "char"
                    ]
                  },
                  "paragraphChunkAIMode": {
                    "description": "AI paragraph chunking mode",
                    "type": "string",
                    "enum": [
                      "auto",
                      "force",
                      "forbid"
                    ]
                  },
                  "paragraphChunkDeep": {
                    "description": "Paragraph heading split depth",
                    "type": "number"
                  },
                  "paragraphChunkMinSize": {
                    "description": "Minimum paragraph chunk size",
                    "type": "number"
                  },
                  "chunkSize": {
                    "description": "Target chunk size",
                    "type": "number"
                  },
                  "chunkSplitter": {
                    "description": "Custom primary chunk separator",
                    "type": "string"
                  },
                  "indexSize": {
                    "description": "Vector index chunk size",
                    "type": "number"
                  },
                  "qaPrompt": {
                    "description": "Custom prompt for Q&A extraction",
                    "type": "string"
                  },
                  "parentId": {
                    "description": "Parent folder ID",
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([0-9a-fA-F]{24})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metadata": {
                    "description": "Metadata",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "customPdfParse": {
                    "description": "Custom PDF parser",
                    "type": "boolean"
                  },
                  "datasetId": {
                    "description": "Dataset ID",
                    "type": "string"
                  },
                  "tags": {
                    "description": "List of collection tags. String items map to legacy `default_tag` tags; object items `{ tag, value }` resolve by tag name.",
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "tag": {
                              "type": "string"
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          },
                          "required": [
                            "tag",
                            "value"
                          ]
                        }
                      ]
                    }
                  },
                  "name": {
                    "description": "Collection name",
                    "type": "string"
                  },
                  "apiFileId": {
                    "description": "External API file ID",
                    "type": "string"
                  }
                },
                "required": [
                  "datasetId",
                  "name",
                  "apiFileId"
                ]
              },
              "example": {
                "datasetId": "string",
                "name": "string",
                "apiFileId": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "successCount": {
                          "description": "Number of collections newly created in this request",
                          "type": "number"
                        },
                        "failedCount": {
                          "description": "Number of nodes that failed or were skipped due to cascading",
                          "type": "number"
                        }
                      },
                      "required": [
                        "successCount",
                        "failedCount"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/getDownloadTicket": {
      "post": {
        "summary": "Create Collection Download Ticket",
        "description": "Validate access permissions and issue a short-lived single-use ticket for batch downloading dataset collections.",
        "tags": [
          "Collections"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "datasetId": {
                    "example": "68ad85a7463006c963799a05",
                    "description": "Dataset ID",
                    "type": "string",
                    "pattern": "^[0-9a-fA-F]{24}$"
                  },
                  "collectionIds": {
                    "example": [
                      "68ad85a7463006c963799a06"
                    ],
                    "description": "List of collection IDs to download",
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "example": "68ee0bd23d17260b7829b137",
                      "description": "ObjectId",
                      "type": "string",
                      "pattern": "^[0-9a-fA-F]{24}$"
                    }
                  }
                },
                "required": [
                  "datasetId",
                  "collectionIds"
                ]
              },
              "example": {
                "datasetId": "68ad85a7463006c963799a05",
                "collectionIds": [
                  "68ad85a7463006c963799a06"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully returned short-lived single-use download ticket",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "ticket": {
                          "example": "01JZZ8B7M5Y7QJX9J7S5V7QJ4F",
                          "description": "Short-lived single-use download ticket",
                          "type": "string",
                          "minLength": 1
                        },
                        "expiresAt": {
                          "example": "2026-09-22T10:00:00.000Z",
                          "description": "Ticket expiration timestamp",
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                        }
                      },
                      "required": [
                        "ticket",
                        "expiresAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/batchDownload": {
      "get": {
        "summary": "Download Collections Archive",
        "description": "Stream original source files for validated collections as a ZIP archive using a short-lived ticket.",
        "tags": [
          "Collections"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "ticket",
            "schema": {
              "example": "01JZZ8B7M5Y7QJX9J7S5V7QJ4F",
              "description": "Short-lived single-use ticket issued by the download ticket endpoint",
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Short-lived single-use ticket issued by the download ticket endpoint",
            "examples": {
              "default": {
                "value": "01JZZ8B7M5Y7QJX9J7S5V7QJ4F",
                "x-disabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully returned ZIP archive stream",
            "content": {
              "application/zip": {
                "schema": {
                  "format": "binary",
                  "description": "ZIP archive binary stream",
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/delete": {
      "post": {
        "x-required-parameter-alternatives": [
          [
            {
              "in": "body",
              "name": "id"
            }
          ],
          [
            {
              "in": "body",
              "name": "collectionIds"
            }
          ],
          [
            {
              "in": "body",
              "name": "datasetId"
            },
            {
              "in": "body",
              "name": "apiFileIds"
            }
          ],
          [
            {
              "in": "query",
              "name": "id"
            }
          ]
        ],
        "summary": "Delete Dataset Collections",
        "description": "Delete one or more collections and their child collections. Choose one body selector: `body.id` (single), `body.collectionIds` (batch), or `body.datasetId` + `body.apiFileIds` (external API dataset IDs). Owner permission is required (collaborators with manage/write cannot delete). Returns collection-not-found if no `apiFileIds` match. Legacy `query.id` remains supported for compatibility (takes precedence over valid body if both are sent, though deprecated in favor of `body.id`).",
        "tags": [
          "Collections"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "schema": {
              "example": "68ad85a7463006c963799a05",
              "description": "Legacy single collection ID query parameter (deprecated; use `body.id` instead)",
              "deprecated": true,
              "type": "string"
            },
            "description": "Legacy single collection ID query parameter (deprecated; use `body.id` instead)",
            "required": false,
            "examples": {
              "default": {
                "value": "68ad85a7463006c963799a05",
                "x-disabled": true
              }
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "Delete by Collection ID",
                    "description": "Delete a single collection and all nested child collections",
                    "type": "object",
                    "properties": {
                      "id": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "Collection ID to delete along with all child collections",
                            "type": "string",
                            "minLength": 1
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "title": "Delete by Collection ID List",
                    "description": "Batch delete multiple collections and all nested child collections",
                    "type": "object",
                    "properties": {
                      "collectionIds": {
                        "allOf": [
                          {
                            "example": [
                              "68ad85a7463006c963799a05"
                            ],
                            "description": "List of collection IDs to delete along with their child collections",
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      }
                    },
                    "required": [
                      "collectionIds"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "title": "Delete by API File IDs",
                    "description": "For external integrations targeting files/folders by `apiFileId` inside a dataset, deleting matched collections and their children.",
                    "type": "object",
                    "properties": {
                      "datasetId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "Target dataset ID backed by an API file store",
                            "type": "string",
                            "minLength": 1
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "apiFileIds": {
                        "allOf": [
                          {
                            "example": [
                              "6893c04c0a1c3e0012a3b4c5"
                            ],
                            "description": "List of external API file or folder IDs; returns not-found if none match",
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "datasetId",
                      "apiFileIds"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "title": "Legacy `query.id` Compatibility",
                    "description": "Allows an empty body when targeting via deprecated `query.id`; rejected if no target selector is provided.",
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                ]
              },
              "example": {
                "id": "68ad85a7463006c963799a05"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully deleted collection(s)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/detail": {
      "get": {
        "summary": "Get Collection Details",
        "description": "Retrieve detailed collection metadata including index counts, error counts, and file details (requires dataset and collection read access).",
        "tags": [
          "Collections"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "schema": {
              "description": "Collection ID",
              "type": "string"
            },
            "required": true,
            "description": "Collection ID",
            "examples": {
              "default": {
                "value": "string",
                "x-disabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully returned collection details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/listV2": {
      "post": {
        "summary": "List Dataset Collections (V2)",
        "description": "List collections in a dataset with pagination, search, and tag filters (requires dataset read permission and parent folder read permission when `parentId` is specified). When collection-level permissions are enabled, results are filtered per collection with effective permissions returned.",
        "tags": [
          "Collections"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "Offset Pagination",
                    "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                    "type": "object",
                    "properties": {
                      "offset": {
                        "x-fastgpt-union-group": {
                          "id": "pagination",
                          "label": "Pagination Parameters"
                        },
                        "x-fastgpt-union-parameter": {
                          "label": "Pagination Parameters",
                          "position": "first"
                        },
                        "example": 0,
                        "description": "0-based offset",
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "pageSize": {
                        "allOf": [
                          {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "Pagination Parameters"
                            },
                            "example": 20,
                            "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                            "default": 20,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 500
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "Pagination Parameters",
                          "position": "last"
                        }
                      },
                      "datasetId": {
                        "description": "Dataset ID",
                        "type": "string"
                      },
                      "parentId": {
                        "description": "Parent folder ID",
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "searchText": {
                        "description": "Search query text",
                        "default": "",
                        "type": "string",
                        "maxLength": 100
                      },
                      "selectFolder": {
                        "description": "Return folders only",
                        "default": false,
                        "type": "boolean"
                      },
                      "tagFilters": {
                        "description": "Filter by tag values (OR across values of the same tag, AND across distinct tags)",
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "tagId": {
                              "example": "68ad85a7463006c963799a05",
                              "description": "Tag ID",
                              "type": "string",
                              "pattern": "^[0-9a-fA-F]{24}$"
                            },
                            "values": {
                              "example": [
                                "PRD"
                              ],
                              "description": "Selected tag values (strings for text/select, numbers for numeric, UTC millisecond timestamps for dates; OR across values of the same tag)",
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "number"
                                  }
                                ]
                              }
                            }
                          },
                          "required": [
                            "tagId",
                            "values"
                          ]
                        }
                      },
                      "sortBy": {
                        "description": "Sort field supporting name, creation time, and update time",
                        "example": "name",
                        "default": "updateTime",
                        "type": "string",
                        "enum": [
                          "name",
                          "createTime",
                          "updateTime"
                        ]
                      },
                      "sortOrder": {
                        "description": "Sort direction",
                        "example": "asc",
                        "default": "desc",
                        "type": "string",
                        "enum": [
                          "asc",
                          "desc"
                        ]
                      },
                      "simple": {
                        "description": "Simple mode (skips total item counts)",
                        "default": false,
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "offset",
                      "datasetId"
                    ]
                  },
                  {
                    "title": "Page-Number Pagination",
                    "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                    "type": "object",
                    "properties": {
                      "pageNum": {
                        "x-fastgpt-union-group": {
                          "id": "pagination",
                          "label": "Pagination Parameters"
                        },
                        "x-fastgpt-union-parameter": {
                          "label": "Pagination Parameters",
                          "position": "first"
                        },
                        "example": 1,
                        "description": "1-based page number; ignored when `offset` is provided",
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "pageSize": {
                        "allOf": [
                          {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "Pagination Parameters"
                            },
                            "example": 20,
                            "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                            "default": 20,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 500
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "Pagination Parameters",
                          "position": "last"
                        }
                      },
                      "datasetId": {
                        "description": "Dataset ID",
                        "type": "string"
                      },
                      "parentId": {
                        "description": "Parent folder ID",
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "searchText": {
                        "description": "Search query text",
                        "default": "",
                        "type": "string",
                        "maxLength": 100
                      },
                      "selectFolder": {
                        "description": "Return folders only",
                        "default": false,
                        "type": "boolean"
                      },
                      "tagFilters": {
                        "description": "Filter by tag values (OR across values of the same tag, AND across distinct tags)",
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "tagId": {
                              "example": "68ad85a7463006c963799a05",
                              "description": "Tag ID",
                              "type": "string",
                              "pattern": "^[0-9a-fA-F]{24}$"
                            },
                            "values": {
                              "example": [
                                "PRD"
                              ],
                              "description": "Selected tag values (strings for text/select, numbers for numeric, UTC millisecond timestamps for dates; OR across values of the same tag)",
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "number"
                                  }
                                ]
                              }
                            }
                          },
                          "required": [
                            "tagId",
                            "values"
                          ]
                        }
                      },
                      "sortBy": {
                        "description": "Sort field supporting name, creation time, and update time",
                        "example": "name",
                        "default": "updateTime",
                        "type": "string",
                        "enum": [
                          "name",
                          "createTime",
                          "updateTime"
                        ]
                      },
                      "sortOrder": {
                        "description": "Sort direction",
                        "example": "asc",
                        "default": "desc",
                        "type": "string",
                        "enum": [
                          "asc",
                          "desc"
                        ]
                      },
                      "simple": {
                        "description": "Simple mode (skips total item counts)",
                        "default": false,
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "datasetId"
                    ]
                  }
                ]
              },
              "example": {
                "offset": 0,
                "datasetId": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully returned collection list and total count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/update": {
      "post": {
        "summary": "Update Dataset Collection",
        "description": "Update collection metadata by collection ID or `datasetId` + `externalFileId` (requires collection write permission). Changing `parentId` moves the collection, requiring manage permissions on source and target parents (plus team dataset creation permission when moving between root and a folder); `inheritPermission` is not accepted and existing inheritance mode is preserved.",
        "tags": [
          "Collections"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "anyOf": [
                  {
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "allOf": [
                          {
                            "description": "Collection ID (mutually exclusive with `datasetId` + `externalFileId`)",
                            "example": "68ee0bd23d17260b7829b137",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "parentId": {
                        "description": "Parent folder ID",
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^([0-9a-fA-F]{24})?$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "name": {
                        "description": "Collection name",
                        "type": "string"
                      },
                      "tags": {
                        "description": "Tag list (supports legacy string names or `{ tag, value }` objects)",
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "tag": {
                                  "type": "string"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "tag",
                                "value"
                              ]
                            }
                          ]
                        }
                      },
                      "forbid": {
                        "description": "Whether the collection is disabled",
                        "type": "boolean"
                      },
                      "createTime": {
                        "description": "Creation time",
                        "type": "string"
                      },
                      "datasetId": {
                        "description": "Dataset ID used together with `externalFileId`",
                        "type": "string"
                      },
                      "externalFileId": {
                        "description": "External file ID used together with `datasetId`",
                        "type": "string"
                      }
                    },
                    "title": "Identify by `id`",
                    "description": ""
                  },
                  {
                    "required": [
                      "datasetId",
                      "externalFileId"
                    ],
                    "properties": {
                      "datasetId": {
                        "allOf": [
                          {
                            "description": "Dataset ID used together with `externalFileId`",
                            "type": "string"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "externalFileId": {
                        "allOf": [
                          {
                            "description": "External file ID used together with `datasetId`",
                            "type": "string"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      },
                      "id": {
                        "description": "Collection ID (mutually exclusive with `datasetId` + `externalFileId`)",
                        "example": "68ee0bd23d17260b7829b137",
                        "type": "string",
                        "pattern": "^[0-9a-fA-F]{24}$"
                      },
                      "parentId": {
                        "description": "Parent folder ID",
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^([0-9a-fA-F]{24})?$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "name": {
                        "description": "Collection name",
                        "type": "string"
                      },
                      "tags": {
                        "description": "Tag list (supports legacy string names or `{ tag, value }` objects)",
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "tag": {
                                  "type": "string"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "tag",
                                "value"
                              ]
                            }
                          ]
                        }
                      },
                      "forbid": {
                        "description": "Whether the collection is disabled",
                        "type": "boolean"
                      },
                      "createTime": {
                        "description": "Creation time",
                        "type": "string"
                      }
                    },
                    "title": "Identify by `datasetId` & `externalFileId`",
                    "description": ""
                  }
                ]
              },
              "example": {
                "id": "68ee0bd23d17260b7829b137"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully updated collection metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/data/v2/list": {
      "post": {
        "summary": "List Dataset Data Items",
        "description": "Query paginated data items inside a collection with keyword search and signed image preview URLs.",
        "tags": [
          "Dataset Data"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "Offset Pagination",
                    "description": "Specify the 0-based starting offset; when both `offset` and `pageNum` are provided, `offset` takes precedence.",
                    "type": "object",
                    "properties": {
                      "offset": {
                        "x-fastgpt-union-group": {
                          "id": "pagination",
                          "label": "Pagination Parameters"
                        },
                        "x-fastgpt-union-parameter": {
                          "label": "Pagination Parameters",
                          "position": "first"
                        },
                        "example": 0,
                        "description": "0-based offset",
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "pageSize": {
                        "allOf": [
                          {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "Pagination Parameters"
                            },
                            "example": 20,
                            "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                            "default": 20,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 500
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "Pagination Parameters",
                          "position": "last"
                        }
                      },
                      "collectionId": {
                        "example": "68ad85a7463006c963799a06",
                        "description": "Collection ID",
                        "type": "string",
                        "pattern": "^[0-9a-fA-F]{24}$"
                      },
                      "searchText": {
                        "example": "FastGPT",
                        "description": "Search keyword matching `q` and `a` fields",
                        "type": "string"
                      }
                    },
                    "required": [
                      "offset",
                      "collectionId"
                    ]
                  },
                  {
                    "title": "Page-Number Pagination",
                    "description": "Paginate by page number (starts at page 1); `pageSize` controls items per page.",
                    "type": "object",
                    "properties": {
                      "pageNum": {
                        "x-fastgpt-union-group": {
                          "id": "pagination",
                          "label": "Pagination Parameters"
                        },
                        "x-fastgpt-union-parameter": {
                          "label": "Pagination Parameters",
                          "position": "first"
                        },
                        "example": 1,
                        "description": "1-based page number; ignored when `offset` is provided",
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "pageSize": {
                        "allOf": [
                          {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "Pagination Parameters"
                            },
                            "example": 20,
                            "description": "Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500).",
                            "default": 20,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 500
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "Pagination Parameters",
                          "position": "last"
                        }
                      },
                      "collectionId": {
                        "example": "68ad85a7463006c963799a06",
                        "description": "Collection ID",
                        "type": "string",
                        "pattern": "^[0-9a-fA-F]{24}$"
                      },
                      "searchText": {
                        "example": "FastGPT",
                        "description": "Search keyword matching `q` and `a` fields",
                        "type": "string"
                      }
                    },
                    "required": [
                      "collectionId"
                    ]
                  }
                ]
              },
              "example": {
                "offset": 0,
                "collectionId": "68ad85a7463006c963799a06"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully returned paginated data items",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "default": 0,
                          "type": "number"
                        },
                        "list": {
                          "default": [],
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "_id": {
                                "description": "Data item ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "datasetId": {
                                "description": "Dataset ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "collectionId": {
                                "description": "Collection ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "q": {
                                "description": "Primary chunk content / question",
                                "type": "string"
                              },
                              "a": {
                                "description": "Supplementary answer / text",
                                "type": "string"
                              },
                              "imageId": {
                                "description": "Image ID",
                                "type": "string"
                              },
                              "imageSize": {
                                "description": "Image size in bytes",
                                "type": "number"
                              },
                              "imagePreviewUrl": {
                                "description": "Image preview URL",
                                "type": "string"
                              },
                              "chunkIndex": {
                                "description": "Chunk index",
                                "type": "number"
                              },
                              "indexStatus": {
                                "description": "Index status (absent on legacy already-indexed records)",
                                "type": "string",
                                "enum": [
                                  "indexing",
                                  "indexed",
                                  "error",
                                  "rebuildIndexPending",
                                  "rebuildIndexRunning",
                                  "rebuildIndexFailed",
                                  "rebuildSynonymPending",
                                  "rebuildSynonymRunning",
                                  "rebuildSynonymFailed"
                                ]
                              },
                              "indexErrorMsg": {
                                "description": "Indexing error details",
                                "type": "string"
                              },
                              "updated": {
                                "description": "Whether the chunk has been updated since citation",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "_id",
                              "datasetId",
                              "collectionId"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "total",
                        "list"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/data/detail": {
      "get": {
        "summary": "Get Dataset Data Item Details",
        "description": "Retrieve detailed content and vector indexes for a single dataset data item.",
        "tags": [
          "Dataset Data"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "schema": {
              "example": "68ad85a7463006c963799a05",
              "description": "Data item ID",
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "required": true,
            "description": "Data item ID",
            "examples": {
              "default": {
                "value": "68ad85a7463006c963799a05",
                "x-disabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully returned data item details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "q": {
                          "description": "Primary chunk content / question",
                          "type": "string"
                        },
                        "a": {
                          "description": "Supplementary answer / text",
                          "type": "string"
                        },
                        "imageId": {
                          "description": "Image ID",
                          "type": "string"
                        },
                        "id": {
                          "description": "Data item ID",
                          "example": "68ee0bd23d17260b7829b137",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        },
                        "teamId": {
                          "description": "Team ID",
                          "example": "68ee0bd23d17260b7829b137",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        },
                        "datasetId": {
                          "description": "Dataset ID",
                          "example": "68ee0bd23d17260b7829b137",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        },
                        "collectionId": {
                          "description": "Collection ID",
                          "example": "68ee0bd23d17260b7829b137",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        },
                        "imagePreivewUrl": {
                          "description": "Image preview URL",
                          "type": "string"
                        },
                        "updateTime": {
                          "description": "Update time",
                          "type": "string"
                        },
                        "sourceName": {
                          "description": "Source name",
                          "type": "string"
                        },
                        "sourceId": {
                          "description": "Source ID",
                          "type": "string"
                        },
                        "chunkIndex": {
                          "description": "Chunk index",
                          "type": "number"
                        },
                        "indexes": {
                          "description": "Vector indexes",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "description": "Index type (external callers omit or use `custom`; other types are system-generated)",
                                "default": "custom",
                                "type": "string",
                                "enum": [
                                  "default",
                                  "imageEmbedding",
                                  "summary",
                                  "question",
                                  "image",
                                  "custom"
                                ]
                              },
                              "dataId": {
                                "description": "Optional vector store ID used to reuse matching indexes without re-embedding",
                                "type": "string"
                              },
                              "text": {
                                "description": "Indexed text content by default; for `imageEmbedding`, the image `objectKey` or URL",
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "dataId",
                              "text"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "indexStatus": {
                          "description": "Index status (absent on legacy already-indexed records)",
                          "type": "string",
                          "enum": [
                            "indexing",
                            "indexed",
                            "error",
                            "rebuildIndexPending",
                            "rebuildIndexRunning",
                            "rebuildIndexFailed",
                            "rebuildSynonymPending",
                            "rebuildSynonymRunning",
                            "rebuildSynonymFailed"
                          ]
                        },
                        "indexErrorMsg": {
                          "description": "Indexing error details",
                          "type": "string"
                        },
                        "imageDescMap": {
                          "description": "Image description mapping",
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "isOwner": {
                          "description": "Whether the caller is the owner",
                          "type": "boolean"
                        },
                        "metadata": {
                          "description": "Custom metadata",
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "q",
                        "id",
                        "teamId",
                        "datasetId",
                        "collectionId",
                        "updateTime",
                        "sourceName",
                        "chunkIndex",
                        "indexes",
                        "isOwner"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/data/update": {
      "put": {
        "summary": "Update Dataset Data Item",
        "description": "Update `q`, `a`, and custom vector indexes for a dataset data item, triggering re-embedding.",
        "tags": [
          "Dataset Data"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dataId": {
                    "example": "68ad85a7463006c963799a05",
                    "description": "Data item ID",
                    "type": "string",
                    "pattern": "^[0-9a-fA-F]{24}$"
                  },
                  "q": {
                    "example": "What is FastGPT?",
                    "description": "Primary chunk content / question",
                    "type": "string"
                  },
                  "a": {
                    "example": "FastGPT is an AI Agent building platform.",
                    "description": "Supplementary answer / text",
                    "type": "string"
                  },
                  "indexes": {
                    "description": "Vector index list",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "description": "Index type (external callers omit or use `custom`; other types are system-generated)",
                          "default": "custom",
                          "type": "string",
                          "enum": [
                            "default",
                            "imageEmbedding",
                            "summary",
                            "question",
                            "image",
                            "custom"
                          ]
                        },
                        "text": {
                          "description": "Indexed text content by default; for `imageEmbedding`, the image `objectKey` or URL",
                          "type": "string"
                        },
                        "dataId": {
                          "example": "68ad85a7463006c963799a05",
                          "description": "Optional vector store ID used to reuse matching indexes without re-embedding",
                          "type": "string"
                        }
                      },
                      "required": [
                        "text"
                      ]
                    }
                  },
                  "imageId": {
                    "description": "Image ID",
                    "type": "string"
                  },
                  "indexPrefix": {
                    "description": "Prefix title for indexes",
                    "type": "string"
                  }
                },
                "required": [
                  "dataId",
                  "q"
                ]
              },
              "example": {
                "dataId": "68ad85a7463006c963799a05",
                "q": "What is FastGPT?"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "q": {
                          "example": "![image.png](/api/system/file/d/alias.exp.sig)",
                          "description": "Display primary question/text with internal S3 image links signed",
                          "type": "string"
                        },
                        "a": {
                          "example": "FastGPT is an AI Agent building platform.",
                          "description": "Display supplementary answer/text with internal S3 image links signed",
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/data/delete": {
      "delete": {
        "summary": "Delete Dataset Data Item",
        "description": "Delete a specified dataset data item (requires write permission).",
        "tags": [
          "Dataset Data"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "schema": {
              "example": "68ad85a7463006c963799a05",
              "description": "Data item ID",
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "required": true,
            "description": "Data item ID",
            "examples": {
              "default": {
                "value": "68ad85a7463006c963799a05",
                "x-disabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Deleted successfully",
                      "not": {}
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/data/pushData": {
      "post": {
        "summary": "Push Data Items to Training Queue",
        "description": "Batch insert up to 200 data items into the collection training queue.",
        "tags": [
          "Dataset Data"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "collectionId": {
                    "example": "68ad85a7463006c963799a06",
                    "description": "Collection ID",
                    "type": "string",
                    "pattern": "^[0-9a-fA-F]{24}$"
                  },
                  "data": {
                    "description": "List of data items (up to 200 per request)",
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "q": {
                          "example": "What is FastGPT?",
                          "description": "Primary chunk content / question",
                          "type": "string"
                        },
                        "a": {
                          "description": "Supplementary answer / text",
                          "type": "string"
                        },
                        "imageId": {
                          "description": "Image ID",
                          "type": "string"
                        },
                        "chunkIndex": {
                          "example": 0,
                          "description": "Chunk index",
                          "type": "number"
                        },
                        "indexes": {
                          "description": "Additional vector indexes",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "description": "Index type (external callers omit or use `custom`; other types are system-generated)",
                                "default": "custom",
                                "type": "string",
                                "enum": [
                                  "default",
                                  "imageEmbedding",
                                  "summary",
                                  "question",
                                  "image",
                                  "custom"
                                ]
                              },
                              "text": {
                                "description": "Indexed text content by default; for `imageEmbedding`, the image `objectKey` or URL",
                                "type": "string"
                              }
                            },
                            "required": [
                              "text"
                            ]
                          }
                        },
                        "metadata": {
                          "description": "Custom metadata",
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        }
                      }
                    }
                  },
                  "trainingType": {
                    "description": "Training mode",
                    "type": "string",
                    "enum": [
                      "chunk",
                      "qa",
                      "imageParse",
                      "backup",
                      "template",
                      "auto"
                    ]
                  },
                  "indexSize": {
                    "description": "Index chunk size limit",
                    "type": "number"
                  },
                  "autoIndexes": {
                    "description": "Whether to auto-generate vector indexes",
                    "type": "boolean"
                  },
                  "imageIndex": {
                    "description": "Whether to generate image indexes",
                    "type": "boolean"
                  },
                  "prompt": {
                    "description": "Custom prompt",
                    "type": "string"
                  },
                  "billId": {
                    "description": "Optional training billing ID; created automatically when omitted",
                    "type": "string"
                  },
                  "trainingMode": {
                    "description": "Training mode",
                    "deprecated": true,
                    "type": "string",
                    "enum": [
                      "chunk",
                      "qa",
                      "imageParse",
                      "backup",
                      "template",
                      "auto"
                    ]
                  }
                },
                "required": [
                  "collectionId",
                  "data"
                ]
              },
              "example": {
                "collectionId": "68ad85a7463006c963799a06",
                "data": [
                  {}
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully returned inserted item count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Response payload. Exact schema is not declared in this OpenAPI contract; refer to the response description."
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/batch/move": {
      "post": {
        "summary": "Batch Move Datasets",
        "description": "Batch move datasets or folders; permissions, depth limits, and permission inheritance are enforced by the dataset service.",
        "tags": [
          "Datasets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Batch move resources; cycle detection, folder depth, and permission checks are enforced by the resource module.",
                "type": "object",
                "properties": {
                  "ids": {
                    "description": "List of resource IDs to operate on",
                    "example": [
                      "68ad85a7463006c963799a05"
                    ],
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "example": "68ee0bd23d17260b7829b137",
                      "description": "ObjectId",
                      "type": "string",
                      "pattern": "^[0-9a-fA-F]{24}$"
                    }
                  },
                  "parentId": {
                    "description": "Target parent folder ID; pass `null` to move to root",
                    "example": "68ad85a7463006c963799a06",
                    "anyOf": [
                      {
                        "example": "68ee0bd23d17260b7829b137",
                        "description": "ObjectId",
                        "type": "string",
                        "pattern": "^[0-9a-fA-F]{24}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "ids",
                  "parentId"
                ]
              },
              "example": {
                "ids": [
                  "68ad85a7463006c963799a05"
                ],
                "parentId": "68ee0bd23d17260b7829b137"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully moved datasets",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Batch resource operation result",
                      "type": "object",
                      "properties": {
                        "successIds": {
                          "description": "List of requested resource IDs processed successfully",
                          "example": [
                            "68ad85a7463006c963799a05"
                          ],
                          "type": "array",
                          "items": {
                            "example": "68ee0bd23d17260b7829b137",
                            "description": "ObjectId",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        },
                        "failedIds": {
                          "description": "List of requested resource IDs that failed",
                          "example": [],
                          "type": "array",
                          "items": {
                            "example": "68ee0bd23d17260b7829b137",
                            "description": "ObjectId",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        },
                        "affectedIds": {
                          "description": "List of resource IDs actually affected (deletions may include removed child IDs)",
                          "example": [
                            "68ad85a7463006c963799a05"
                          ],
                          "type": "array",
                          "items": {
                            "example": "68ee0bd23d17260b7829b137",
                            "description": "ObjectId",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        }
                      },
                      "required": [
                        "successIds",
                        "failedIds",
                        "affectedIds"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/batch/delete": {
      "post": {
        "summary": "Batch Delete Datasets",
        "description": "Batch delete datasets or folders; subtree handling and async cleanup are handled by the dataset service.",
        "tags": [
          "Datasets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Batch delete resources; permissions, subtree traversal, and async cleanup are handled by the resource module.",
                "type": "object",
                "properties": {
                  "ids": {
                    "description": "List of resource IDs to operate on",
                    "example": [
                      "68ad85a7463006c963799a05"
                    ],
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "example": "68ee0bd23d17260b7829b137",
                      "description": "ObjectId",
                      "type": "string",
                      "pattern": "^[0-9a-fA-F]{24}$"
                    }
                  }
                },
                "required": [
                  "ids"
                ]
              },
              "example": {
                "ids": [
                  "68ad85a7463006c963799a05"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully deleted dataset",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Batch resource operation result",
                      "type": "object",
                      "properties": {
                        "successIds": {
                          "description": "List of requested resource IDs processed successfully",
                          "example": [
                            "68ad85a7463006c963799a05"
                          ],
                          "type": "array",
                          "items": {
                            "example": "68ee0bd23d17260b7829b137",
                            "description": "ObjectId",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        },
                        "failedIds": {
                          "description": "List of requested resource IDs that failed",
                          "example": [],
                          "type": "array",
                          "items": {
                            "example": "68ee0bd23d17260b7829b137",
                            "description": "ObjectId",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        },
                        "affectedIds": {
                          "description": "List of resource IDs actually affected (deletions may include removed child IDs)",
                          "example": [
                            "68ad85a7463006c963799a05"
                          ],
                          "type": "array",
                          "items": {
                            "example": "68ee0bd23d17260b7829b137",
                            "description": "ObjectId",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        }
                      },
                      "required": [
                        "successIds",
                        "failedIds",
                        "affectedIds"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/search": {
      "post": {
        "summary": "Dataset Search",
        "description": "Search across one or more readable datasets using an API Key or login session. Vector recall requires matching active embedding models across target datasets, and results respect collection-level permissions. Choose either `result.topk` (returns top 1–100 items without token truncation) or `result.maxTokens` (truncates on complete chunks with no fixed cap); defaults to `topk=20` when omitted, and prioritizes `topk` if both are sent. Response `meta` reports effective execution parameters.",
        "tags": [
          "Dataset Search"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Structured multi-dataset search request; identity resolves from `Authorization` API Key or login session",
                "type": "object",
                "properties": {
                  "scope": {
                    "description": "Search scope",
                    "example": {
                      "datasetIds": [
                        "507f1f77bcf86cd799439011"
                      ]
                    },
                    "type": "object",
                    "properties": {
                      "datasetIds": {
                        "description": "Target dataset IDs (max 100; deduplicated server-side with per-dataset read permission checks)",
                        "example": [
                          "507f1f77bcf86cd799439011"
                        ],
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "example": "68ee0bd23d17260b7829b137",
                          "description": "ObjectId",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      },
                      "filter": {
                        "description": "Collection and tag filters (requires server-side filter support)",
                        "example": {
                          "collectionIds": [
                            "507f1f77bcf86cd799439012"
                          ]
                        },
                        "type": "object",
                        "properties": {
                          "collectionIds": {
                            "description": "Restrict search to these collections or folders (intersected with other filters)",
                            "example": [
                              "507f1f77bcf86cd799439011"
                            ],
                            "minItems": 1,
                            "maxItems": 500,
                            "type": "array",
                            "items": {
                              "example": "68ee0bd23d17260b7829b137",
                              "description": "ObjectId",
                              "type": "string",
                              "pattern": "^[0-9a-fA-F]{24}$"
                            }
                          },
                          "createTime": {
                            "description": "Collection creation time range",
                            "example": {
                              "gte": "2026-01-01T00:00:00Z"
                            },
                            "type": "object",
                            "properties": {
                              "gte": {
                                "description": "Inclusive lower bound of creation time",
                                "example": "2026-01-01T00:00:00Z",
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              "lte": {
                                "description": "Inclusive upper bound of creation time",
                                "example": "2026-12-31T23:59:59Z",
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              }
                            },
                            "additionalProperties": false
                          },
                          "tags": {
                            "description": "Tag filter conditions; `and` and `or` groups are intersected",
                            "example": {
                              "and": [
                                {
                                  "tag": "department",
                                  "op": "$eq",
                                  "value": "support"
                                }
                              ]
                            },
                            "type": "object",
                            "properties": {
                              "and": {
                                "description": "Tag conditions where all entries must match (AND)",
                                "example": [
                                  {
                                    "tag": "department",
                                    "op": "$eq",
                                    "value": "support"
                                  }
                                ],
                                "minItems": 1,
                                "maxItems": 50,
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "Whether the tag value is empty",
                                              "example": "$notEmpty",
                                              "type": "string",
                                              "enum": [
                                                "$empty",
                                                "$notEmpty"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "only"
                                          }
                                        },
                                        "tag": {
                                          "description": "Tag name",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "Scalar comparison operator",
                                              "example": "$eq",
                                              "type": "string",
                                              "enum": [
                                                "$eq",
                                                "$ne",
                                                "$gt",
                                                "$lt",
                                                "$gte",
                                                "$lte"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "value": {
                                          "allOf": [
                                            {
                                              "description": "Tag comparison value",
                                              "example": "support",
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "number"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "tag": {
                                          "description": "Tag name",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "Containment comparison operator",
                                              "example": "$contains",
                                              "type": "string",
                                              "enum": [
                                                "$contains",
                                                "$notContains"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "value": {
                                          "allOf": [
                                            {
                                              "description": "Matched text or option value",
                                              "example": "support",
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                {
                                                  "minItems": 1,
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "tag": {
                                          "description": "Tag name",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "Text matching operator",
                                              "example": "$startsWith",
                                              "type": "string",
                                              "enum": [
                                                "$startsWith",
                                                "$endsWith",
                                                "$regex"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "value": {
                                          "allOf": [
                                            {
                                              "description": "Text string or regular expression",
                                              "example": "support",
                                              "type": "string",
                                              "minLength": 1
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "tag": {
                                          "description": "Tag name",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "Array comparison operator",
                                              "example": "$in",
                                              "type": "string",
                                              "enum": [
                                                "$is",
                                                "$isNot",
                                                "$in",
                                                "$notIn"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "value": {
                                          "allOf": [
                                            {
                                              "description": "List of matched options",
                                              "example": [
                                                "support",
                                                "sales"
                                              ],
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "tag": {
                                          "description": "Tag name",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    }
                                  ],
                                  "type": "object"
                                }
                              },
                              "or": {
                                "description": "Tag conditions where at least one entry must match (OR)",
                                "example": [
                                  {
                                    "tag": "department",
                                    "op": "$eq",
                                    "value": "sales"
                                  }
                                ],
                                "minItems": 1,
                                "maxItems": 50,
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "Whether the tag value is empty",
                                              "example": "$notEmpty",
                                              "type": "string",
                                              "enum": [
                                                "$empty",
                                                "$notEmpty"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "only"
                                          }
                                        },
                                        "tag": {
                                          "description": "Tag name",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "Scalar comparison operator",
                                              "example": "$eq",
                                              "type": "string",
                                              "enum": [
                                                "$eq",
                                                "$ne",
                                                "$gt",
                                                "$lt",
                                                "$gte",
                                                "$lte"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "value": {
                                          "allOf": [
                                            {
                                              "description": "Tag comparison value",
                                              "example": "support",
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "number"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "tag": {
                                          "description": "Tag name",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "Containment comparison operator",
                                              "example": "$contains",
                                              "type": "string",
                                              "enum": [
                                                "$contains",
                                                "$notContains"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "value": {
                                          "allOf": [
                                            {
                                              "description": "Matched text or option value",
                                              "example": "support",
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                {
                                                  "minItems": 1,
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "tag": {
                                          "description": "Tag name",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "Text matching operator",
                                              "example": "$startsWith",
                                              "type": "string",
                                              "enum": [
                                                "$startsWith",
                                                "$endsWith",
                                                "$regex"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "value": {
                                          "allOf": [
                                            {
                                              "description": "Text string or regular expression",
                                              "example": "support",
                                              "type": "string",
                                              "minLength": 1
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "tag": {
                                          "description": "Tag name",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "Array comparison operator",
                                              "example": "$in",
                                              "type": "string",
                                              "enum": [
                                                "$is",
                                                "$isNot",
                                                "$in",
                                                "$notIn"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "value": {
                                          "allOf": [
                                            {
                                              "description": "List of matched options",
                                              "example": [
                                                "support",
                                                "sales"
                                              ],
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "tag": {
                                          "description": "Tag name",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    }
                                  ],
                                  "type": "object"
                                }
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "datasetIds"
                    ],
                    "additionalProperties": false
                  },
                  "query": {
                    "description": "Search query input",
                    "example": {
                      "text": "How do I create a dataset?"
                    },
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "text": {
                            "allOf": [
                              {
                                "description": "Query text (max 10,000 chars after trimming); at least one of `text` or `queryImageUrls` is required",
                                "example": "How do I create a dataset?",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 10000
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "first"
                            }
                          },
                          "imageKeys": {
                            "allOf": [
                              {
                                "default": [],
                                "description": "Temporary object keys for team-uploaded query images (max 10)",
                                "example": [
                                  "temp/teamId/search-image.png"
                                ],
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "last"
                            }
                          }
                        },
                        "required": [
                          "text"
                        ],
                        "additionalProperties": false,
                        "description": ""
                      },
                      {
                        "type": "object",
                        "properties": {
                          "imageKeys": {
                            "allOf": [
                              {
                                "description": "Temporary object keys for team-uploaded query images (max 10)",
                                "example": [
                                  "temp/teamId/search-image.png"
                                ],
                                "minItems": 1,
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "first"
                            }
                          },
                          "text": {
                            "allOf": [
                              {
                                "default": "",
                                "description": "Query text (max 10,000 chars after trimming); at least one of `text` or `queryImageUrls` is required",
                                "example": "How do I create a dataset?",
                                "type": "string",
                                "maxLength": 10000
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "last"
                            }
                          }
                        },
                        "required": [
                          "imageKeys"
                        ],
                        "additionalProperties": false,
                        "description": ""
                      }
                    ]
                  },
                  "retrieval": {
                    "description": "Recall configuration",
                    "example": {
                      "mode": "mixedRecall",
                      "embeddingWeight": 0.5
                    },
                    "default": {},
                    "type": "object",
                    "properties": {
                      "mode": {
                        "description": "`embedding`, `fullTextRecall`, or `mixedRecall`",
                        "example": "mixedRecall",
                        "default": "embedding",
                        "type": "string",
                        "enum": [
                          "embedding",
                          "fullTextRecall",
                          "mixedRecall"
                        ]
                      },
                      "embeddingWeight": {
                        "description": "Embedding fusion weight in mixed recall",
                        "example": 0.5,
                        "default": 0.5,
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    },
                    "additionalProperties": false
                  },
                  "rerank": {
                    "description": "Rerank configuration; do not pass model or weight when disabled",
                    "example": {
                      "enabled": false
                    },
                    "default": {
                      "enabled": false
                    },
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "allOf": [
                              {
                                "description": "Disable Rerank",
                                "example": false,
                                "type": "boolean",
                                "const": false
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          }
                        },
                        "required": [
                          "enabled"
                        ],
                        "additionalProperties": false,
                        "description": ""
                      },
                      {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "allOf": [
                              {
                                "description": "Enable Rerank",
                                "example": true,
                                "type": "boolean",
                                "const": true
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "first"
                            }
                          },
                          "modelId": {
                            "allOf": [
                              {
                                "description": "Rerank model ID; uses the default accessible model if omitted",
                                "example": "model-identifier",
                                "type": "string",
                                "minLength": 1
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "middle"
                            }
                          },
                          "candidateNum": {
                            "allOf": [
                              {
                                "description": "Rerank candidate pool size (`10–100`; defaults to `100`)",
                                "example": 100,
                                "type": "integer",
                                "minimum": 10,
                                "maximum": 100
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "middle"
                            }
                          },
                          "weight": {
                            "allOf": [
                              {
                                "description": "Fusion weight for rerank scores",
                                "example": 0.5,
                                "default": 0.5,
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "last"
                            }
                          }
                        },
                        "required": [
                          "enabled"
                        ],
                        "additionalProperties": false,
                        "description": ""
                      }
                    ],
                    "type": "object"
                  },
                  "queryExtension": {
                    "description": "Query extension configuration",
                    "example": {
                      "enabled": false
                    },
                    "default": {
                      "enabled": false
                    },
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "allOf": [
                              {
                                "description": "Disable Query Extension",
                                "example": false,
                                "type": "boolean",
                                "const": false
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          }
                        },
                        "required": [
                          "enabled"
                        ],
                        "additionalProperties": false,
                        "description": ""
                      },
                      {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "allOf": [
                              {
                                "description": "Enable Query Extension",
                                "example": true,
                                "type": "boolean",
                                "const": true
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "first"
                            }
                          },
                          "modelId": {
                            "allOf": [
                              {
                                "description": "Rerank model ID; uses the default accessible model if omitted",
                                "example": "model-identifier",
                                "type": "string",
                                "minLength": 1
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "middle"
                            }
                          },
                          "background": {
                            "allOf": [
                              {
                                "description": "Background context helping the model interpret the query",
                                "example": "FastGPT Documentation",
                                "default": "",
                                "type": "string",
                                "maxLength": 100000
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "last"
                            }
                          }
                        },
                        "required": [
                          "enabled"
                        ],
                        "additionalProperties": false,
                        "description": ""
                      }
                    ],
                    "type": "object"
                  },
                  "result": {
                    "description": "Specify either `topk` or `maxTokens`; defaults to `topk=20` with no token budget",
                    "example": {
                      "topk": 20,
                      "similarity": 0
                    },
                    "default": {},
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "maxTokens": {
                            "allOf": [
                              {
                                "description": "Total token budget across returned chunks (no fixed cap; preserves complete chunks, so the final chunk may exceed the budget)",
                                "example": 25000,
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 9007199254740991
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "similarity": {
                            "description": "Minimum similarity score threshold (applied when `usingSimilarityFilter` is enabled)",
                            "example": 0,
                            "default": 0,
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          }
                        },
                        "required": [
                          "maxTokens"
                        ],
                        "additionalProperties": false,
                        "description": ""
                      },
                      {
                        "type": "object",
                        "properties": {
                          "topk": {
                            "allOf": [
                              {
                                "description": "Return top `k` ranked results (`1–100`; defaults to `20` when neither budget is set)",
                                "example": 20,
                                "default": 20,
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "similarity": {
                            "description": "Minimum similarity score threshold (applied when `usingSimilarityFilter` is enabled)",
                            "example": 0,
                            "default": 0,
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          }
                        },
                        "additionalProperties": false,
                        "description": ""
                      }
                    ]
                  },
                  "usageScene": {
                    "description": "Billing label: `search` for Dataset Search or `searchTest` for Search Test (does not affect retrieval or permissions)",
                    "example": "search",
                    "default": "search",
                    "type": "string",
                    "enum": [
                      "search",
                      "searchTest"
                    ]
                  }
                },
                "required": [
                  "scope",
                  "query"
                ],
                "additionalProperties": false
              },
              "example": {
                "scope": {
                  "datasetIds": [
                    "507f1f77bcf86cd799439011"
                  ]
                },
                "query": {
                  "text": "How do I create a dataset?"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Matched chunks and effective search metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "description": "Merged, ranked chunk matches and effective execution metadata",
                      "type": "object",
                      "properties": {
                        "list": {
                          "description": "Merged and ranked dataset chunks",
                          "example": [],
                          "type": "array",
                          "items": {
                            "description": "Dataset search result item",
                            "type": "object",
                            "properties": {
                              "q": {
                                "description": "Primary chunk content / question",
                                "type": "string"
                              },
                              "a": {
                                "description": "Supplementary answer / text",
                                "type": "string"
                              },
                              "imageId": {
                                "description": "Image ID",
                                "type": "string"
                              },
                              "id": {
                                "description": "Data item ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "datasetId": {
                                "description": "Dataset ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "collectionId": {
                                "description": "Collection ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "imagePreivewUrl": {
                                "description": "Image preview URL",
                                "type": "string"
                              },
                              "updateTime": {
                                "description": "Update time",
                                "type": "string"
                              },
                              "sourceName": {
                                "description": "Source name",
                                "type": "string"
                              },
                              "sourceId": {
                                "description": "Source ID",
                                "type": "string"
                              },
                              "chunkIndex": {
                                "description": "Chunk index",
                                "type": "number"
                              },
                              "indexStatus": {
                                "description": "Index status (absent on legacy already-indexed records)",
                                "type": "string",
                                "enum": [
                                  "indexing",
                                  "indexed",
                                  "error",
                                  "rebuildIndexPending",
                                  "rebuildIndexRunning",
                                  "rebuildIndexFailed",
                                  "rebuildSynonymPending",
                                  "rebuildSynonymRunning",
                                  "rebuildSynonymFailed"
                                ]
                              },
                              "indexErrorMsg": {
                                "description": "Indexing error details",
                                "type": "string"
                              },
                              "imageDescMap": {
                                "description": "Image description mapping",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {
                                  "type": "string"
                                }
                              },
                              "score": {
                                "description": "Retrieval score breakdown list",
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "description": "Score type",
                                      "type": "string",
                                      "enum": [
                                        "embedding",
                                        "fullText",
                                        "reRank",
                                        "rrf"
                                      ]
                                    },
                                    "value": {
                                      "description": "Score value",
                                      "type": "number"
                                    },
                                    "index": {
                                      "description": "Index",
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "value",
                                    "index"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "metadata": {
                                "description": "Custom metadata",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "retrievalRank": {
                                "description": "Retrieval rank",
                                "type": "number"
                              },
                              "synonymMappings": {
                                "description": "Mapping from original terms appearing in chunks or user questions to canonical terms",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "q",
                              "id",
                              "datasetId",
                              "collectionId",
                              "updateTime",
                              "sourceName",
                              "chunkIndex",
                              "score"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "meta": {
                          "type": "object",
                          "properties": {
                            "durationMs": {
                              "description": "Search latency in milliseconds",
                              "example": 128,
                              "type": "number",
                              "minimum": 0
                            },
                            "usingSimilarityFilter": {
                              "description": "Whether similarity filtering was applied",
                              "example": true,
                              "type": "boolean"
                            },
                            "usingReRank": {
                              "description": "Whether reranking was executed",
                              "example": false,
                              "type": "boolean"
                            },
                            "queryExtensionModelId": {
                              "description": "Model ID used for query extension",
                              "example": "model-identifier",
                              "type": "string"
                            }
                          },
                          "required": [
                            "durationMs",
                            "usingSimilarityFilter",
                            "usingReRank"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "list",
                        "meta"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/ai/model/summary": {
      "post": {
        "summary": "Get Model Display Summaries",
        "description": "Return model names, icons, types, and availability status for the current identity or app baseline without execution credentials.",
        "tags": [
          "Models"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "modelIds": {
                    "description": "Stable model IDs to look up (max 100)",
                    "example": [
                      "68ad85a7463006c963799a01"
                    ],
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "appId": {
                    "description": "Optional application ID; treats models in the app baseline as permitted",
                    "example": "68ad85a7463006c963799a05",
                    "type": "string",
                    "pattern": "^[0-9a-fA-F]{24}$"
                  },
                  "outLinkAuthData": {
                    "description": "Share-link auth payload; evaluates model permissions under the publisher identity",
                    "example": {
                      "shareId": "share-id",
                      "outLinkUid": "out-link-user-id"
                    },
                    "type": "object",
                    "properties": {
                      "shareId": {
                        "description": "Share link ID",
                        "type": "string",
                        "minLength": 1
                      },
                      "outLinkUid": {
                        "description": "External share user ID",
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "shareId",
                      "outLinkUid"
                    ]
                  }
                },
                "required": [
                  "modelIds"
                ]
              },
              "example": {
                "modelIds": [
                  "68ad85a7463006c963799a01"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Display status entries for active, inactive, deprecated, or unauthorized models",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "models": {
                          "description": "Model display summaries returned in request order",
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "status": {
                                    "allOf": [
                                      {
                                        "description": "Model not found",
                                        "type": "string",
                                        "const": "deleted"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "only"
                                    }
                                  },
                                  "modelId": {
                                    "description": "Stable model ID",
                                    "example": "68ad85a7463006c963799a01",
                                    "type": "string"
                                  },
                                  "isUpcomingDeprecation": {
                                    "description": "Whether the model is scheduled for deprecation",
                                    "example": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "modelId",
                                  "status"
                                ],
                                "additionalProperties": false,
                                "description": ""
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "allOf": [
                                      {
                                        "description": "Model type for app resource validation; may be omitted in legacy responses",
                                        "example": "llm",
                                        "type": "string",
                                        "enum": [
                                          "llm",
                                          "embedding",
                                          "tts",
                                          "stt",
                                          "rerank"
                                        ]
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "first"
                                    }
                                  },
                                  "name": {
                                    "allOf": [
                                      {
                                        "description": "Model display name (also shown in unauthorized notices)",
                                        "example": "GPT-5",
                                        "type": "string"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "avatar": {
                                    "allOf": [
                                      {
                                        "description": "Model logo URL",
                                        "example": "/icon/logo.svg",
                                        "type": "string"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "status": {
                                    "allOf": [
                                      {
                                        "description": "Availability status for the current identity (`unauthorized` takes precedence over `inactive`)",
                                        "example": "active",
                                        "type": "string",
                                        "enum": [
                                          "active",
                                          "disabled",
                                          "forbidden"
                                        ]
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "last"
                                    }
                                  },
                                  "modelId": {
                                    "description": "Stable model ID",
                                    "example": "68ad85a7463006c963799a01",
                                    "type": "string"
                                  },
                                  "isUpcomingDeprecation": {
                                    "description": "Whether the model is scheduled for deprecation",
                                    "example": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "modelId",
                                  "name",
                                  "status"
                                ],
                                "additionalProperties": false,
                                "description": ""
                              }
                            ],
                            "type": "object"
                          }
                        }
                      },
                      "required": [
                        "models"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/ai/model/list": {
      "get": {
        "summary": "List Public System Models",
        "description": "Return minimal active system model and pricing metadata for public pricing pages without authentication.",
        "tags": [
          "Models"
        ],
        "responses": {
          "200": {
            "description": "Successfully returned public system model list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "models": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "allOf": [
                                      {
                                        "example": "llm",
                                        "description": "Model type",
                                        "type": "string",
                                        "const": "llm"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "first"
                                    }
                                  },
                                  "pricing": {
                                    "allOf": [
                                      {
                                        "description": "Tiered LLM pricing per million tokens; omitted if free",
                                        "example": {
                                          "tiers": [
                                            {
                                              "inputPrice": 2,
                                              "outputPrice": 4
                                            }
                                          ]
                                        },
                                        "type": "object",
                                        "properties": {
                                          "tiers": {
                                            "description": "LLM pricing tier (lower bound derives from the previous tier upper bound)",
                                            "maxItems": 5,
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "maxInputTokensK": {
                                                  "description": "Upper input limit for this tier in thousands of tokens. Omit for unlimited",
                                                  "example": 32,
                                                  "type": "integer",
                                                  "exclusiveMinimum": 0,
                                                  "maximum": 9007199254740991
                                                },
                                                "inputPrice": {
                                                  "description": "Credit price per million input tokens",
                                                  "example": 2,
                                                  "type": "number",
                                                  "minimum": 0
                                                },
                                                "outputPrice": {
                                                  "description": "Credit price per million output tokens",
                                                  "example": 4,
                                                  "type": "number",
                                                  "minimum": 0
                                                }
                                              },
                                              "required": [
                                                "inputPrice",
                                                "outputPrice"
                                              ],
                                              "additionalProperties": false
                                            }
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "config": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "maxContext": {
                                            "type": "number"
                                          },
                                          "vision": {
                                            "type": "boolean"
                                          },
                                          "audio": {
                                            "type": "boolean"
                                          },
                                          "video": {
                                            "type": "boolean"
                                          },
                                          "reasoning": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "maxContext"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "last"
                                    }
                                  },
                                  "name": {
                                    "example": "GPT-5",
                                    "description": "Model display name",
                                    "type": "string"
                                  },
                                  "provider": {
                                    "example": "openai",
                                    "description": "Model provider identifier",
                                    "type": "string"
                                  },
                                  "testMode": {
                                    "example": false,
                                    "description": "Whether the model is in beta/test mode",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name",
                                  "provider",
                                  "type",
                                  "config"
                                ],
                                "additionalProperties": false,
                                "description": ""
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "allOf": [
                                      {
                                        "example": "embedding",
                                        "description": "Model type",
                                        "type": "string",
                                        "const": "embedding"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "first"
                                    }
                                  },
                                  "pricing": {
                                    "allOf": [
                                      {
                                        "description": "Credit price per fixed billing unit; omitted if free",
                                        "example": {
                                          "unitPrice": 2
                                        },
                                        "type": "object",
                                        "properties": {
                                          "unitPrice": {
                                            "description": "Composite credit price per million units (tokens/TTS) or per 60 seconds (STT)",
                                            "example": 2,
                                            "type": "number",
                                            "minimum": 0
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "config": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "maxToken": {
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "maxToken"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "last"
                                    }
                                  },
                                  "name": {
                                    "example": "GPT-5",
                                    "description": "Model display name",
                                    "type": "string"
                                  },
                                  "provider": {
                                    "example": "openai",
                                    "description": "Model provider identifier",
                                    "type": "string"
                                  },
                                  "testMode": {
                                    "example": false,
                                    "description": "Whether the model is in beta/test mode",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name",
                                  "provider",
                                  "type",
                                  "config"
                                ],
                                "additionalProperties": false,
                                "description": ""
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "allOf": [
                                      {
                                        "example": "rerank",
                                        "description": "Model type",
                                        "type": "string",
                                        "const": "rerank"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "first"
                                    }
                                  },
                                  "pricing": {
                                    "allOf": [
                                      {
                                        "description": "Credit price per fixed billing unit; omitted if free",
                                        "example": {
                                          "unitPrice": 2
                                        },
                                        "type": "object",
                                        "properties": {
                                          "unitPrice": {
                                            "description": "Composite credit price per million units (tokens/TTS) or per 60 seconds (STT)",
                                            "example": 2,
                                            "type": "number",
                                            "minimum": 0
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "config": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "maxToken": {
                                            "type": "number"
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "last"
                                    }
                                  },
                                  "name": {
                                    "example": "GPT-5",
                                    "description": "Model display name",
                                    "type": "string"
                                  },
                                  "provider": {
                                    "example": "openai",
                                    "description": "Model provider identifier",
                                    "type": "string"
                                  },
                                  "testMode": {
                                    "example": false,
                                    "description": "Whether the model is in beta/test mode",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name",
                                  "provider",
                                  "type",
                                  "config"
                                ],
                                "additionalProperties": false,
                                "description": ""
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "allOf": [
                                      {
                                        "example": "tts",
                                        "description": "Model type",
                                        "type": "string",
                                        "const": "tts"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "first"
                                    }
                                  },
                                  "pricing": {
                                    "allOf": [
                                      {
                                        "description": "Credit price per fixed billing unit; omitted if free",
                                        "example": {
                                          "unitPrice": 2
                                        },
                                        "type": "object",
                                        "properties": {
                                          "unitPrice": {
                                            "description": "Composite credit price per million units (tokens/TTS) or per 60 seconds (STT)",
                                            "example": 2,
                                            "type": "number",
                                            "minimum": 0
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "last"
                                    }
                                  },
                                  "name": {
                                    "example": "GPT-5",
                                    "description": "Model display name",
                                    "type": "string"
                                  },
                                  "provider": {
                                    "example": "openai",
                                    "description": "Model provider identifier",
                                    "type": "string"
                                  },
                                  "testMode": {
                                    "example": false,
                                    "description": "Whether the model is in beta/test mode",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name",
                                  "provider",
                                  "type"
                                ],
                                "additionalProperties": false,
                                "description": ""
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "allOf": [
                                      {
                                        "example": "stt",
                                        "description": "Model type",
                                        "type": "string",
                                        "const": "stt"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "first"
                                    }
                                  },
                                  "pricing": {
                                    "allOf": [
                                      {
                                        "description": "Fixed per-60s (STT) or per-million-token pricing; omitted if free",
                                        "example": {
                                          "type": "duration",
                                          "unitPrice": 2
                                        },
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "allOf": [
                                                  {
                                                    "type": "string",
                                                    "const": "duration"
                                                  }
                                                ],
                                                "x-fastgpt-union-parameter": {
                                                  "label": "",
                                                  "position": "first"
                                                }
                                              },
                                              "unitPrice": {
                                                "allOf": [
                                                  {
                                                    "description": "Credit price per 60 seconds",
                                                    "example": 0.2,
                                                    "type": "number",
                                                    "minimum": 0
                                                  }
                                                ],
                                                "x-fastgpt-union-parameter": {
                                                  "label": "",
                                                  "position": "last"
                                                }
                                              }
                                            },
                                            "required": [
                                              "type"
                                            ],
                                            "additionalProperties": false,
                                            "description": ""
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "allOf": [
                                                  {
                                                    "type": "string",
                                                    "const": "tokens"
                                                  }
                                                ],
                                                "x-fastgpt-union-parameter": {
                                                  "label": "",
                                                  "position": "first"
                                                }
                                              },
                                              "inputPrice": {
                                                "allOf": [
                                                  {
                                                    "description": "Credit price per million input tokens",
                                                    "example": 2,
                                                    "type": "number",
                                                    "minimum": 0
                                                  }
                                                ],
                                                "x-fastgpt-union-parameter": {
                                                  "label": "",
                                                  "position": "middle"
                                                }
                                              },
                                              "outputPrice": {
                                                "allOf": [
                                                  {
                                                    "description": "Credit price per million output tokens",
                                                    "example": 4,
                                                    "type": "number",
                                                    "minimum": 0
                                                  }
                                                ],
                                                "x-fastgpt-union-parameter": {
                                                  "label": "",
                                                  "position": "last"
                                                }
                                              }
                                            },
                                            "required": [
                                              "type"
                                            ],
                                            "additionalProperties": false,
                                            "description": ""
                                          }
                                        ]
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "last"
                                    }
                                  },
                                  "name": {
                                    "example": "GPT-5",
                                    "description": "Model display name",
                                    "type": "string"
                                  },
                                  "provider": {
                                    "example": "openai",
                                    "description": "Model provider identifier",
                                    "type": "string"
                                  },
                                  "testMode": {
                                    "example": false,
                                    "description": "Whether the model is in beta/test mode",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name",
                                  "provider",
                                  "type"
                                ],
                                "additionalProperties": false,
                                "description": ""
                              }
                            ],
                            "type": "object"
                          }
                        },
                        "providers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "provider": {
                                "description": "Model provider identifier",
                                "type": "string"
                              },
                              "value": {
                                "type": "object",
                                "properties": {
                                  "en": {
                                    "type": "string"
                                  },
                                  "zh-CN": {
                                    "type": "string"
                                  },
                                  "zh-Hant": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "en",
                                  "zh-CN",
                                  "zh-Hant"
                                ],
                                "additionalProperties": false
                              },
                              "avatar": {
                                "description": "Model provider icon URL",
                                "type": "string"
                              }
                            },
                            "required": [
                              "provider",
                              "value",
                              "avatar"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "models",
                        "providers"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/core/ai/model/catalog": {
      "get": {
        "summary": "Get Available Model Catalog",
        "description": "Returns available models, providers, and effective default model IDs for the authenticated member or share-link identity in a single request, with content version negotiation. Passing `orderBy=custom` orders by own team models, shared team models, and system models sorted by `rank`; omitting preserves runtime order. Members may pass `includeSourceMember=true` to attach creator details (always returning the full catalog; ignored for share links).",
        "tags": [
          "Models"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "version",
            "schema": {
              "description": "Client-cached catalog version hash",
              "type": "string",
              "minLength": 1
            },
            "description": "Client-cached catalog version hash",
            "required": false,
            "examples": {
              "default": {
                "value": "string",
                "x-disabled": true
              }
            }
          },
          {
            "in": "query",
            "name": "includeSourceMember",
            "schema": {
              "example": true,
              "description": "Attach source member metadata (members only; always returns the full catalog without version cache)",
              "type": "boolean"
            },
            "description": "Attach source member metadata (members only; always returns the full catalog without version cache)",
            "required": false,
            "examples": {
              "default": {
                "value": true,
                "x-disabled": true
              }
            }
          },
          {
            "in": "query",
            "name": "orderBy",
            "schema": {
              "example": "custom",
              "description": "Catalog display sorting: `custom` orders own team, shared team, and system models by rank; omit to keep runtime order",
              "type": "string",
              "const": "custom"
            },
            "description": "Catalog display sorting: `custom` orders own team, shared team, and system models by rank; omit to keep runtime order",
            "required": false,
            "examples": {
              "default": {
                "value": "custom",
                "x-disabled": true
              }
            }
          },
          {
            "in": "query",
            "name": "outLinkAuthData",
            "schema": {
              "example": "{\"shareId\":\"share-id\",\"outLinkUid\":\"out-link-user-id\"}",
              "description": "Share-link auth payload used to evaluate permissions via the link publisher identity",
              "type": "string"
            },
            "description": "Share-link auth payload used to evaluate permissions via the link publisher identity",
            "required": false,
            "examples": {
              "default": {
                "value": "{\"shareId\":\"share-id\",\"outLinkUid\":\"out-link-user-id\"}",
                "x-disabled": true
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the full catalog when the version changes or `includeSourceMember=true`; otherwise returns only `version`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard FastGPT HTTP JSON response envelope.",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "Business status code (200 indicates success)."
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "Status text (empty string on success)."
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "Response message (empty string on success)."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "description": "Current model catalog version hash",
                          "type": "string"
                        },
                        "data": {
                          "description": "Full catalog payload (omitted when client version matches and creator details are not requested)",
                          "type": "object",
                          "properties": {
                            "models": {
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "pricing": {
                                        "allOf": [
                                          {
                                            "description": "Tiered LLM pricing per million tokens; omitted if free",
                                            "example": {
                                              "tiers": [
                                                {
                                                  "inputPrice": 2,
                                                  "outputPrice": 4
                                                }
                                              ]
                                            },
                                            "type": "object",
                                            "properties": {
                                              "tiers": {
                                                "description": "LLM pricing tier (lower bound derives from the previous tier upper bound)",
                                                "maxItems": 5,
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "maxInputTokensK": {
                                                      "description": "Upper input limit for this tier in thousands of tokens. Omit for unlimited",
                                                      "example": 32,
                                                      "type": "integer",
                                                      "exclusiveMinimum": 0,
                                                      "maximum": 9007199254740991
                                                    },
                                                    "inputPrice": {
                                                      "description": "Credit price per million input tokens",
                                                      "example": 2,
                                                      "type": "number",
                                                      "minimum": 0
                                                    },
                                                    "outputPrice": {
                                                      "description": "Credit price per million output tokens",
                                                      "example": 4,
                                                      "type": "number",
                                                      "minimum": 0
                                                    }
                                                  },
                                                  "required": [
                                                    "inputPrice",
                                                    "outputPrice"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              }
                                            },
                                            "additionalProperties": false
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "first"
                                        }
                                      },
                                      "type": {
                                        "allOf": [
                                          {
                                            "type": "string",
                                            "const": "llm"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "middle"
                                        }
                                      },
                                      "config": {
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "maxContext": {
                                                "type": "number"
                                              },
                                              "maxResponse": {
                                                "type": "number"
                                              },
                                              "quoteMaxToken": {
                                                "type": "number"
                                              },
                                              "maxTemperature": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "showTopP": {
                                                "type": "boolean"
                                              },
                                              "responseFormatList": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                }
                                              },
                                              "showStopSign": {
                                                "type": "boolean"
                                              },
                                              "censor": {
                                                "type": "boolean"
                                              },
                                              "vision": {
                                                "type": "boolean"
                                              },
                                              "audio": {
                                                "type": "boolean"
                                              },
                                              "video": {
                                                "type": "boolean"
                                              },
                                              "reasoning": {
                                                "type": "boolean"
                                              },
                                              "reasoningEffort": {
                                                "type": "boolean"
                                              },
                                              "functionCall": {
                                                "type": "boolean"
                                              },
                                              "toolChoice": {
                                                "type": "boolean"
                                              }
                                            },
                                            "required": [
                                              "maxContext",
                                              "maxResponse",
                                              "quoteMaxToken"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "last"
                                        }
                                      },
                                      "modelId": {
                                        "description": "Stable model ID",
                                        "type": "string"
                                      },
                                      "model": {
                                        "description": "Model identifier sent to the provider API",
                                        "type": "string"
                                      },
                                      "name": {
                                        "description": "Model display name",
                                        "type": "string"
                                      },
                                      "provider": {
                                        "description": "Model provider identifier",
                                        "type": "string"
                                      },
                                      "scope": {
                                        "description": "Model scope (`system`, `team`, or shared)",
                                        "type": "string",
                                        "enum": [
                                          "system",
                                          "team"
                                        ]
                                      },
                                      "sortOrder": {
                                        "description": "Display rank within the same scope (smaller numbers appear first)",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "tmbId": {
                                        "description": "Owner team member ID of the model",
                                        "type": "string"
                                      },
                                      "sourceMember": {
                                        "description": "Creator profile (returned only for member catalog views)",
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "example": "Alice",
                                            "description": "Member name",
                                            "type": "string"
                                          },
                                          "avatar": {
                                            "description": "Member avatar",
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "status": {
                                            "example": "active",
                                            "description": "Member status",
                                            "type": "string",
                                            "enum": [
                                              "active",
                                              "leave",
                                              "forbidden"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "status"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "avatar": {
                                        "description": "Model icon URL",
                                        "type": "string"
                                      },
                                      "isActive": {
                                        "description": "Whether the model is enabled",
                                        "type": "boolean"
                                      },
                                      "isUpcomingDeprecation": {
                                        "description": "Whether the model is scheduled for deprecation",
                                        "example": true,
                                        "type": "boolean"
                                      },
                                      "testMode": {
                                        "description": "Whether the model is in beta/test mode",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "modelId",
                                      "model",
                                      "name",
                                      "provider",
                                      "scope",
                                      "type",
                                      "config"
                                    ],
                                    "additionalProperties": false,
                                    "description": ""
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "pricing": {
                                        "allOf": [
                                          {
                                            "description": "Credit price per fixed billing unit; omitted if free",
                                            "example": {
                                              "unitPrice": 2
                                            },
                                            "type": "object",
                                            "properties": {
                                              "unitPrice": {
                                                "description": "Composite credit price per million units (tokens/TTS) or per 60 seconds (STT)",
                                                "example": 2,
                                                "type": "number",
                                                "minimum": 0
                                              }
                                            },
                                            "additionalProperties": false
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "first"
                                        }
                                      },
                                      "type": {
                                        "allOf": [
                                          {
                                            "type": "string",
                                            "const": "embedding"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "middle"
                                        }
                                      },
                                      "config": {
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "defaultToken": {
                                                "type": "number"
                                              },
                                              "maxToken": {
                                                "type": "number"
                                              },
                                              "weight": {
                                                "default": 0,
                                                "type": "number"
                                              },
                                              "hidden": {
                                                "type": "boolean"
                                              },
                                              "vision": {
                                                "type": "boolean"
                                              },
                                              "normalization": {
                                                "type": "boolean"
                                              },
                                              "batchSize": {
                                                "type": "number"
                                              }
                                            },
                                            "required": [
                                              "defaultToken",
                                              "maxToken",
                                              "weight"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "last"
                                        }
                                      },
                                      "modelId": {
                                        "description": "Stable model ID",
                                        "type": "string"
                                      },
                                      "model": {
                                        "description": "Model identifier sent to the provider API",
                                        "type": "string"
                                      },
                                      "name": {
                                        "description": "Model display name",
                                        "type": "string"
                                      },
                                      "provider": {
                                        "description": "Model provider identifier",
                                        "type": "string"
                                      },
                                      "scope": {
                                        "description": "Model scope (`system`, `team`, or shared)",
                                        "type": "string",
                                        "enum": [
                                          "system",
                                          "team"
                                        ]
                                      },
                                      "sortOrder": {
                                        "description": "Display rank within the same scope (smaller numbers appear first)",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "tmbId": {
                                        "description": "Owner team member ID of the model",
                                        "type": "string"
                                      },
                                      "sourceMember": {
                                        "description": "Creator profile (returned only for member catalog views)",
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "example": "Alice",
                                            "description": "Member name",
                                            "type": "string"
                                          },
                                          "avatar": {
                                            "description": "Member avatar",
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "status": {
                                            "example": "active",
                                            "description": "Member status",
                                            "type": "string",
                                            "enum": [
                                              "active",
                                              "leave",
                                              "forbidden"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "status"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "avatar": {
                                        "description": "Model icon URL",
                                        "type": "string"
                                      },
                                      "isActive": {
                                        "description": "Whether the model is enabled",
                                        "type": "boolean"
                                      },
                                      "isUpcomingDeprecation": {
                                        "description": "Whether the model is scheduled for deprecation",
                                        "example": true,
                                        "type": "boolean"
                                      },
                                      "testMode": {
                                        "description": "Whether the model is in beta/test mode",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "modelId",
                                      "model",
                                      "name",
                                      "provider",
                                      "scope",
                                      "type",
                                      "config"
                                    ],
                                    "additionalProperties": false,
                                    "description": ""
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "pricing": {
                                        "allOf": [
                                          {
                                            "description": "Credit price per fixed billing unit; omitted if free",
                                            "example": {
                                              "unitPrice": 2
                                            },
                                            "type": "object",
                                            "properties": {
                                              "unitPrice": {
                                                "description": "Composite credit price per million units (tokens/TTS) or per 60 seconds (STT)",
                                                "example": 2,
                                                "type": "number",
                                                "minimum": 0
                                              }
                                            },
                                            "additionalProperties": false
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "first"
                                        }
                                      },
                                      "type": {
                                        "allOf": [
                                          {
                                            "type": "string",
                                            "const": "rerank"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "middle"
                                        }
                                      },
                                      "config": {
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "maxToken": {
                                                "type": "number"
                                              }
                                            },
                                            "additionalProperties": false
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "last"
                                        }
                                      },
                                      "modelId": {
                                        "description": "Stable model ID",
                                        "type": "string"
                                      },
                                      "model": {
                                        "description": "Model identifier sent to the provider API",
                                        "type": "string"
                                      },
                                      "name": {
                                        "description": "Model display name",
                                        "type": "string"
                                      },
                                      "provider": {
                                        "description": "Model provider identifier",
                                        "type": "string"
                                      },
                                      "scope": {
                                        "description": "Model scope (`system`, `team`, or shared)",
                                        "type": "string",
                                        "enum": [
                                          "system",
                                          "team"
                                        ]
                                      },
                                      "sortOrder": {
                                        "description": "Display rank within the same scope (smaller numbers appear first)",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "tmbId": {
                                        "description": "Owner team member ID of the model",
                                        "type": "string"
                                      },
                                      "sourceMember": {
                                        "description": "Creator profile (returned only for member catalog views)",
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "example": "Alice",
                                            "description": "Member name",
                                            "type": "string"
                                          },
                                          "avatar": {
                                            "description": "Member avatar",
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "status": {
                                            "example": "active",
                                            "description": "Member status",
                                            "type": "string",
                                            "enum": [
                                              "active",
                                              "leave",
                                              "forbidden"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "status"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "avatar": {
                                        "description": "Model icon URL",
                                        "type": "string"
                                      },
                                      "isActive": {
                                        "description": "Whether the model is enabled",
                                        "type": "boolean"
                                      },
                                      "isUpcomingDeprecation": {
                                        "description": "Whether the model is scheduled for deprecation",
                                        "example": true,
                                        "type": "boolean"
                                      },
                                      "testMode": {
                                        "description": "Whether the model is in beta/test mode",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "modelId",
                                      "model",
                                      "name",
                                      "provider",
                                      "scope",
                                      "type",
                                      "config"
                                    ],
                                    "additionalProperties": false,
                                    "description": ""
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "pricing": {
                                        "allOf": [
                                          {
                                            "description": "Credit price per fixed billing unit; omitted if free",
                                            "example": {
                                              "unitPrice": 2
                                            },
                                            "type": "object",
                                            "properties": {
                                              "unitPrice": {
                                                "description": "Composite credit price per million units (tokens/TTS) or per 60 seconds (STT)",
                                                "example": 2,
                                                "type": "number",
                                                "minimum": 0
                                              }
                                            },
                                            "additionalProperties": false
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "first"
                                        }
                                      },
                                      "type": {
                                        "allOf": [
                                          {
                                            "type": "string",
                                            "const": "tts"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "middle"
                                        }
                                      },
                                      "config": {
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "voices": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "label": {
                                                      "type": "string"
                                                    },
                                                    "value": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "label",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              }
                                            },
                                            "required": [
                                              "voices"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "last"
                                        }
                                      },
                                      "modelId": {
                                        "description": "Stable model ID",
                                        "type": "string"
                                      },
                                      "model": {
                                        "description": "Model identifier sent to the provider API",
                                        "type": "string"
                                      },
                                      "name": {
                                        "description": "Model display name",
                                        "type": "string"
                                      },
                                      "provider": {
                                        "description": "Model provider identifier",
                                        "type": "string"
                                      },
                                      "scope": {
                                        "description": "Model scope (`system`, `team`, or shared)",
                                        "type": "string",
                                        "enum": [
                                          "system",
                                          "team"
                                        ]
                                      },
                                      "sortOrder": {
                                        "description": "Display rank within the same scope (smaller numbers appear first)",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "tmbId": {
                                        "description": "Owner team member ID of the model",
                                        "type": "string"
                                      },
                                      "sourceMember": {
                                        "description": "Creator profile (returned only for member catalog views)",
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "example": "Alice",
                                            "description": "Member name",
                                            "type": "string"
                                          },
                                          "avatar": {
                                            "description": "Member avatar",
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "status": {
                                            "example": "active",
                                            "description": "Member status",
                                            "type": "string",
                                            "enum": [
                                              "active",
                                              "leave",
                                              "forbidden"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "status"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "avatar": {
                                        "description": "Model icon URL",
                                        "type": "string"
                                      },
                                      "isActive": {
                                        "description": "Whether the model is enabled",
                                        "type": "boolean"
                                      },
                                      "isUpcomingDeprecation": {
                                        "description": "Whether the model is scheduled for deprecation",
                                        "example": true,
                                        "type": "boolean"
                                      },
                                      "testMode": {
                                        "description": "Whether the model is in beta/test mode",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "modelId",
                                      "model",
                                      "name",
                                      "provider",
                                      "scope",
                                      "type",
                                      "config"
                                    ],
                                    "additionalProperties": false,
                                    "description": ""
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "pricing": {
                                        "allOf": [
                                          {
                                            "description": "Fixed per-60s (STT) or per-million-token pricing; omitted if free",
                                            "example": {
                                              "type": "duration",
                                              "unitPrice": 2
                                            },
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "duration"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "unitPrice": {
                                                    "allOf": [
                                                      {
                                                        "description": "Credit price per 60 seconds",
                                                        "example": 0.2,
                                                        "type": "number",
                                                        "minimum": 0
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "type"
                                                ],
                                                "additionalProperties": false,
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "tokens"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "inputPrice": {
                                                    "allOf": [
                                                      {
                                                        "description": "Credit price per million input tokens",
                                                        "example": 2,
                                                        "type": "number",
                                                        "minimum": 0
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "middle"
                                                    }
                                                  },
                                                  "outputPrice": {
                                                    "allOf": [
                                                      {
                                                        "description": "Credit price per million output tokens",
                                                        "example": 4,
                                                        "type": "number",
                                                        "minimum": 0
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "type"
                                                ],
                                                "additionalProperties": false,
                                                "description": ""
                                              }
                                            ]
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "first"
                                        }
                                      },
                                      "type": {
                                        "allOf": [
                                          {
                                            "type": "string",
                                            "const": "stt"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "middle"
                                        }
                                      },
                                      "config": {
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "properties": {},
                                            "additionalProperties": false
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "last"
                                        }
                                      },
                                      "modelId": {
                                        "description": "Stable model ID",
                                        "type": "string"
                                      },
                                      "model": {
                                        "description": "Model identifier sent to the provider API",
                                        "type": "string"
                                      },
                                      "name": {
                                        "description": "Model display name",
                                        "type": "string"
                                      },
                                      "provider": {
                                        "description": "Model provider identifier",
                                        "type": "string"
                                      },
                                      "scope": {
                                        "description": "Model scope (`system`, `team`, or shared)",
                                        "type": "string",
                                        "enum": [
                                          "system",
                                          "team"
                                        ]
                                      },
                                      "sortOrder": {
                                        "description": "Display rank within the same scope (smaller numbers appear first)",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "tmbId": {
                                        "description": "Owner team member ID of the model",
                                        "type": "string"
                                      },
                                      "sourceMember": {
                                        "description": "Creator profile (returned only for member catalog views)",
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "example": "Alice",
                                            "description": "Member name",
                                            "type": "string"
                                          },
                                          "avatar": {
                                            "description": "Member avatar",
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "status": {
                                            "example": "active",
                                            "description": "Member status",
                                            "type": "string",
                                            "enum": [
                                              "active",
                                              "leave",
                                              "forbidden"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "status"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "avatar": {
                                        "description": "Model icon URL",
                                        "type": "string"
                                      },
                                      "isActive": {
                                        "description": "Whether the model is enabled",
                                        "type": "boolean"
                                      },
                                      "isUpcomingDeprecation": {
                                        "description": "Whether the model is scheduled for deprecation",
                                        "example": true,
                                        "type": "boolean"
                                      },
                                      "testMode": {
                                        "description": "Whether the model is in beta/test mode",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "modelId",
                                      "model",
                                      "name",
                                      "provider",
                                      "scope",
                                      "type",
                                      "config"
                                    ],
                                    "additionalProperties": false,
                                    "description": ""
                                  }
                                ],
                                "type": "object"
                              }
                            },
                            "providers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "description": "Model provider identifier",
                                    "type": "string"
                                  },
                                  "value": {
                                    "type": "object",
                                    "properties": {
                                      "en": {
                                        "type": "string"
                                      },
                                      "zh-CN": {
                                        "type": "string"
                                      },
                                      "zh-Hant": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "en",
                                      "zh-CN",
                                      "zh-Hant"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "avatar": {
                                    "description": "Model provider icon URL",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "provider",
                                  "value",
                                  "avatar"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "defaultModelIds": {
                              "type": "object",
                              "properties": {
                                "llm": {
                                  "type": "string"
                                },
                                "embedding": {
                                  "type": "string"
                                },
                                "tts": {
                                  "type": "string"
                                },
                                "stt": {
                                  "type": "string"
                                },
                                "rerank": {
                                  "type": "string"
                                },
                                "datasetTextLLM": {
                                  "type": "string"
                                },
                                "datasetImageLLM": {
                                  "type": "string"
                                },
                                "chatTitleLLM": {
                                  "type": "string"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "models",
                            "providers",
                            "defaultModelIds"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "version"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key",
        "description": "Pass `Bearer <apiKey>` in the `Authorization` header. App API Keys automatically resolve their bound app so chat and companion endpoints omit `appId` (explicit `appId` or SDK suffixes cannot override key bindings). Personal keys must supply `appId` (via `body.appId` or `Bearer <apiKey>-<appId>` for OpenAI SDK compatibility; suffixes are never stored)."
      }
    }
  }
}
