{
  "openapi": "3.1.0",
  "info": {
    "title": "Nexus Backend",
    "description": "Nexus API reference generated from backend source fe1c3a07c793029d3d87191a68f89e481afd6bc8. Route availability depends on workspace configuration, access, provider setup, and licensing.",
    "version": "2026-09-08-fe1c3a07"
  },
  "paths": {
    "/password/change-password": {
      "post": {
        "summary": "Change My Password",
        "description": "Change the password for the current user.",
        "operationId": "change_my_password",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/password/reset_password": {
      "post": {
        "summary": "Admin Reset User Password",
        "description": "Reset the password for a user (admin only).",
        "operationId": "admin_reset_user_password",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserResetRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResetResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/comparison/{parent_message_id}": {
      "get": {
        "summary": "Get Comparison Worksheet",
        "operationId": "get_comparison_worksheet",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "parent_message_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Parent Message Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ComparisonWorksheetResponse"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Get Comparison Worksheet Chat Comparison  Parent Message Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Put Comparison Worksheet",
        "operationId": "put_comparison_worksheet",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "parent_message_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Parent Message Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ComparisonWorksheetPutRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComparisonWorksheetResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/get-user-chat-sessions": {
      "get": {
        "summary": "Get User Chat Sessions",
        "operationId": "get_user_chat_sessions",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "name": "only_non_project_chats",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Only Non Project Chats"
            }
          },
          {
            "name": "include_failed_chats",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Failed Chats"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Before"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatSessionsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/update-chat-session-temperature": {
      "put": {
        "summary": "Update Chat Session Temperature",
        "operationId": "update_chat_session_temperature",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateChatSessionTemperatureRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/update-chat-session-reasoning": {
      "put": {
        "summary": "Update Chat Session Reasoning",
        "operationId": "update_chat_session_reasoning",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateChatSessionReasoningRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/update-chat-session-model": {
      "put": {
        "summary": "Update Chat Session Model",
        "operationId": "update_chat_session_model",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateChatSessionThreadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/get-chat-session/{session_id}": {
      "get": {
        "summary": "Get Chat Session",
        "operationId": "get_chat_session",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "is_shared",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Is Shared"
            }
          },
          {
            "name": "include_deleted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Deleted"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatSessionDetailResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/create-chat-session": {
      "post": {
        "summary": "Create New Chat Session",
        "operationId": "create_new_chat_session",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatSessionCreationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateChatSessionID"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/rename-chat-session": {
      "put": {
        "summary": "Rename Chat Session",
        "operationId": "rename_chat_session",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRenameRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RenameChatSessionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/chat-session/{session_id}": {
      "patch": {
        "summary": "Patch Chat Session",
        "operationId": "patch_chat_session",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatSessionUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/delete-all-chat-sessions": {
      "delete": {
        "summary": "Delete All Chat Sessions",
        "operationId": "delete_all_chat_sessions",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/delete-chat-session/{session_id}": {
      "delete": {
        "summary": "Delete Chat Session By Id",
        "operationId": "delete_chat_session_by_id",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "hard_delete",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Hard Delete"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/incognito-availability": {
      "get": {
        "summary": "Get Incognito Availability",
        "description": "Whether the acting user may start an incognito chat, so the client can\nhide the toggle. The create endpoint enforces the same rule regardless.",
        "operationId": "get_incognito_availability",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IncognitoAvailabilityResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/end-incognito-session/{session_id}": {
      "post": {
        "summary": "End Incognito Session",
        "description": "Drop an incognito session's live context the moment the chat closes.\n\nThe context TTL is only the backstop for when this never arrives, such as\na hard tab close. Uploads are found by session id, so one still in flight\nwhen the user leaves, or one attached before any message created the\nsession, is queued for deletion just the same.",
        "operationId": "end_incognito_session",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/send-chat-message": {
      "post": {
        "summary": "Handle Send Chat Message",
        "description": "This endpoint is used to send a new chat message.\n\nArgs:\n    chat_message_req (SendMessageRequest): Details about the new chat message.\n        - When stream=True (default): Returns StreamingResponse with SSE\n        - When stream=False: Returns ChatFullResponse with complete data\n    request (Request): The current HTTP request context.\n    user (User): The current user, obtained via dependency injection.\n    _ (None): Rate limit check is run if user/group/global rate limits are enabled.\n\nReturns:\n    StreamingResponse | ChatFullResponse: Either streams or returns complete response.",
        "operationId": "handle_send_chat_message",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMessageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "If `stream=true`, returns `text/event-stream`.\nIf `stream=false`, returns `application/json` (ChatFullResponse).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatFullResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "stream": {
                    "summary": "Stream of NDJSON AnswerStreamPart's",
                    "value": "string"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/set-message-as-latest": {
      "put": {
        "summary": "Set Message As Latest",
        "operationId": "set_message_as_latest",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatMessageIdentifier"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/set-preferred-response": {
      "put": {
        "summary": "Set Preferred Response Endpoint",
        "description": "Set the preferred assistant response for a multi-model turn.",
        "operationId": "set_preferred_response_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPreferredResponseRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/create-chat-message-feedback": {
      "post": {
        "summary": "Create Chat Feedback",
        "operationId": "create_chat_feedback",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatFeedbackRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/remove-chat-message-feedback": {
      "delete": {
        "summary": "Remove Chat Feedback",
        "operationId": "remove_chat_feedback",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "chat_message_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Chat Message Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/max-selected-document-tokens": {
      "get": {
        "summary": "Get Max Document Tokens",
        "operationId": "get_max_document_tokens",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "persona_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Persona Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaxSelectedDocumentTokens"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/available-context-tokens/{session_id}": {
      "get": {
        "summary": "Get Available Context Tokens For Session",
        "description": "Return available context tokens for a chat session based on its persona.\n\n``model_configuration_id`` selects the model the user currently has picked\nfor the session \u2014 without it the budget reflects the persona/global\ndefault model, which can differ after a mid-session model switch.",
        "operationId": "get_available_context_tokens_for_session",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "model_configuration_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Model Configuration Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailableContextTokensResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/seed-chat-session-from-slack": {
      "post": {
        "summary": "Seed Chat From Slack",
        "operationId": "seed_chat_from_slack",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SeedChatFromSlackRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeedChatFromSlackResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/file/{file_id}": {
      "get": {
        "summary": "Fetch Chat File",
        "operationId": "fetch_chat_file",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          },
          {
            "name": "parsed",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Parsed"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/search": {
      "get": {
        "summary": "Search Chats",
        "description": "Search for chat sessions based on the provided query.\nIf no query is provided, returns recent chat sessions.",
        "operationId": "search_chats",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Query"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "title": "Page Size"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatSearchResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/chat-session/{session_id}/resume-stream": {
      "get": {
        "summary": "Resume Chat Stream",
        "description": "Replay an in-flight run's buffered stream from ``cursor`` and tail it\nlive until the run completes. Serves any pod: the buffer lives in the\nshared cache. 404 when the session has no resumable run \u2014 the client\nfalls back to refetching the session.",
        "operationId": "resume_chat_stream",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Cursor"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/chat/stop-chat-session/{chat_session_id}": {
      "post": {
        "summary": "Stop Chat Session",
        "description": "Stop a chat session by setting a stop signal.\nThis endpoint is called by the frontend when the user clicks the stop button.",
        "operationId": "stop_chat_session",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "chat_session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Chat Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Stop Chat Session Chat Stop Chat Session  Chat Session Id  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/query/valid-tags": {
      "get": {
        "summary": "Get Tags",
        "operationId": "get_tags",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "match_pattern",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Match Pattern"
            }
          },
          {
            "name": "allow_prefix",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Allow Prefix"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/DocumentSource"
                    }
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Sources"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/document/document-size-info": {
      "get": {
        "summary": "Get Document Info",
        "operationId": "get_document_info",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "document_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Document Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentInfo"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/document/chunk-info": {
      "get": {
        "summary": "Get Chunk Info",
        "operationId": "get_chunk_info",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "document_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Document Id"
            }
          },
          {
            "name": "chunk_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Chunk Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChunkInfo"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/users/admin-access": {
      "patch": {
        "summary": "Set User Admin Access Endpoint",
        "operationId": "set_user_admin_access_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserAdminAccessUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/users/craft-enabled": {
      "patch": {
        "summary": "Set User Craft Access",
        "operationId": "set_user_craft_access",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserCraftAccessUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/users/test-upsert-user": {
      "post": {
        "summary": "Test Upsert User",
        "description": "Test endpoint for upsert_saml_user. Only used for integration testing.",
        "operationId": "test_upsert_user",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestUpsertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/FullUserSnapshot"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Test Upsert User Manage Users Test Upsert User Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/users/accepted": {
      "get": {
        "summary": "List Accepted Users",
        "operationId": "list_accepted_users",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "name": "page_num",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Page Num"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 10,
              "title": "Page Size"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Is Active"
            }
          },
          {
            "name": "account_types",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/AccountType"
              },
              "default": [],
              "title": "Account Types"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedReturn_FullUserSnapshot_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/users/accepted/all": {
      "get": {
        "summary": "List All Accepted Users",
        "description": "Returns all accepted users without pagination.\nUsed by the admin Users page for client-side filtering/sorting.",
        "operationId": "list_all_accepted_users",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FullUserSnapshot"
                  },
                  "title": "Response List All Accepted Users Manage Users Accepted All Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/users/counts": {
      "get": {
        "summary": "Get User Counts",
        "operationId": "get_user_counts",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer"
                    }
                  },
                  "title": "Response Get User Counts Manage Users Counts Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/users/invited": {
      "get": {
        "summary": "List Invited Users",
        "operationId": "list_invited_users",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InvitedUserSnapshot"
                  },
                  "title": "Response List Invited Users Manage Users Invited Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/users": {
      "get": {
        "summary": "List All Users",
        "operationId": "list_all_users",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "name": "accepted_page",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accepted Page"
            }
          },
          {
            "name": "slack_users_page",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Slack Users Page"
            }
          },
          {
            "name": "invited_page",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Invited Page"
            }
          },
          {
            "name": "include_api_keys",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Api Keys"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllUsersResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/users/download": {
      "get": {
        "summary": "Download Users Csv",
        "description": "Download all users as a CSV file.",
        "operationId": "download_users_csv",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/users": {
      "put": {
        "summary": "Bulk Invite Users",
        "description": "emails are string validated. If any email fails validation, no emails are\ninvited and an exception is raised.",
        "operationId": "bulk_invite_users",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_bulk_invite_users_manage_admin_users_put"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkInviteResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/remove-invited-user": {
      "patch": {
        "summary": "Remove Invited User",
        "operationId": "remove_invited_user",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserByEmail"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "title": "Response Remove Invited User Manage Admin Remove Invited User Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/deactivate-user": {
      "patch": {
        "summary": "Deactivate User Api",
        "operationId": "deactivate_user_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserByEmail"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/delete-user": {
      "delete": {
        "summary": "Delete User",
        "operationId": "delete_user",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserByEmail"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/activate-user": {
      "patch": {
        "summary": "Activate User Api",
        "operationId": "activate_user_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserByEmail"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/valid-domains": {
      "get": {
        "summary": "Get Valid Domains",
        "operationId": "get_valid_domains",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "title": "Response Get Valid Domains Manage Admin Valid Domains Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/users": {
      "get": {
        "summary": "List All Users Basic Info",
        "operationId": "list_all_users_basic_info",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "include_api_keys",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Api Keys"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MinimalUserSnapshot"
                  },
                  "title": "Response List All Users Basic Info Users Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/me/permissions": {
      "get": {
        "summary": "Get Current User Permissions",
        "operationId": "get_current_user_permissions",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPermissionsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/me": {
      "get": {
        "summary": "Verify User Logged In",
        "operationId": "verify_user_logged_in",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserInfo"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/temperature-default": {
      "patch": {
        "summary": "Update User Temperature Default Api",
        "operationId": "update_user_temperature_default_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemperatureDefaultRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/reasoning-effort-default": {
      "patch": {
        "summary": "Update User Reasoning Effort Default Api",
        "operationId": "update_user_reasoning_effort_default_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReasoningEffortDefaultRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/temperature-override-enabled": {
      "patch": {
        "summary": "Update User Temperature Override Enabled Api",
        "operationId": "update_user_temperature_override_enabled_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "temperature_override_enabled",
            "in": "query",
            "required": true,
            "schema": {
              "type": "boolean",
              "title": "Temperature Override Enabled"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/shortcut-enabled": {
      "patch": {
        "summary": "Update User Shortcut Enabled Api",
        "operationId": "update_user_shortcut_enabled_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "shortcut_enabled",
            "in": "query",
            "required": true,
            "schema": {
              "type": "boolean",
              "title": "Shortcut Enabled"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/paste-as-tile": {
      "patch": {
        "summary": "Update User Paste As Tile Api",
        "operationId": "update_user_paste_as_tile_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "paste_as_tile",
            "in": "query",
            "required": true,
            "schema": {
              "type": "boolean",
              "title": "Paste As Tile"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auto-scroll": {
      "patch": {
        "summary": "Update User Auto Scroll Api",
        "operationId": "update_user_auto_scroll_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutoScrollRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/theme-preference": {
      "patch": {
        "summary": "Update User Theme Preference Api",
        "operationId": "update_user_theme_preference_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ThemePreferenceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/language": {
      "patch": {
        "summary": "Update User Language Api",
        "operationId": "update_user_language_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LanguageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/chat-background": {
      "patch": {
        "summary": "Update User Chat Background Api",
        "operationId": "update_user_chat_background_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatBackgroundRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/default-app-mode": {
      "patch": {
        "summary": "Update User Default App Mode Api",
        "operationId": "update_user_default_app_mode_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DefaultAppModeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/default-model": {
      "patch": {
        "summary": "Update User Default Model Api",
        "operationId": "update_user_default_model_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChosenDefaultModelRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/personalization": {
      "patch": {
        "summary": "Update User Personalization Api",
        "operationId": "update_user_personalization_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonalizationUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/pinned-assistants": {
      "patch": {
        "summary": "Set Pinned Personas Api",
        "operationId": "set_pinned_personas_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderPinnedAssistantsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/assistant-list/update/{assistant_id}": {
      "patch": {
        "summary": "Update User Assistant Visibility Api",
        "operationId": "update_user_assistant_visibility_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "assistant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Assistant Id"
            }
          },
          {
            "name": "show",
            "in": "query",
            "required": true,
            "schema": {
              "type": "boolean",
              "title": "Show"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/assistant/preferences": {
      "get": {
        "summary": "Get User Assistant Preferences",
        "description": "Fetch all assistant preferences for the user.",
        "operationId": "get_user_assistant_preferences",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "additionalProperties": {
                        "$ref": "#/components/schemas/UserSpecificAssistantPreference"
                      }
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Get User Assistant Preferences User Assistant Preferences Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/assistant/{assistant_id}/preferences": {
      "patch": {
        "summary": "Update Assistant Preferences For User Api",
        "operationId": "update_assistant_preferences_for_user_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "assistant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Assistant Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserSpecificAssistantPreference"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/files/recent": {
      "get": {
        "summary": "Get Recent Files",
        "operationId": "get_recent_files",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserFileSnapshot"
                  },
                  "title": "Response Get Recent Files User Files Recent Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/oauth-test/claims": {
      "get": {
        "summary": "Get Oauth Login Claims",
        "description": "Last captured IdP claims for the given user (defaults to the caller).\n\nAdmin-only: the raw id_token/userinfo claims can carry sensitive directory\nattributes and group memberships. Claims are captured on every OAuth/OIDC\nlogin when IDP_PROFILE_ENRICHMENT_ENABLED is set. If nothing is found, the\nuser has not logged in through the IdP since capture was enabled.",
        "operationId": "get_oauth_login_claims",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Email"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthClaimsSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/search": {
      "post": {
        "summary": "Admin Search",
        "operationId": "admin_search",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminSearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSearchResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/doc-boosts": {
      "get": {
        "summary": "Get Most Boosted Docs",
        "operationId": "get_most_boosted_docs",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "ascending",
            "in": "query",
            "required": true,
            "schema": {
              "type": "boolean",
              "title": "Ascending"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Limit"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BoostDoc"
                  },
                  "title": "Response Get Most Boosted Docs Manage Admin Doc Boosts Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Document Boost Update",
        "operationId": "document_boost_update",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoostUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/doc-hidden": {
      "post": {
        "summary": "Document Hidden Update",
        "operationId": "document_hidden_update",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HiddenUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/genai-api-key/validate": {
      "get": {
        "summary": "Validate Existing Genai Api Key",
        "operationId": "validate_existing_genai_api_key",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/deletion-attempt": {
      "post": {
        "summary": "Create Deletion Attempt For Connector Id",
        "operationId": "create_deletion_attempt_for_connector_id",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorCredentialPairIdentifier"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/indexing/failed-documents": {
      "get": {
        "summary": "Get Failed Documents",
        "description": "Get indexing errors across all connectors with optional filters.\n\nProvides a cross-connector view of document indexing failures.\nDefaults to last 30 days if no start_time is provided to avoid\nunbounded count queries.",
        "operationId": "get_failed_documents",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cc_pair_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cc Pair Id"
            }
          },
          {
            "name": "error_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Error Type"
            }
          },
          {
            "name": "start_time",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Time"
            }
          },
          {
            "name": "end_time",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Time"
            }
          },
          {
            "name": "include_resolved",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Resolved"
            }
          },
          {
            "name": "page_num",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Page Num"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 25,
              "title": "Page Size"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedReturn_IndexAttemptErrorPydantic_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/connector/google-drive/service-account-credential": {
      "put": {
        "summary": "Upsert Service Account Credential",
        "description": "Create a credential from an uploaded service account key. Each call creates a new\ncredential, so an instance can hold multiple service accounts.",
        "operationId": "upsert_service_account_credential",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GoogleServiceAccountCredentialRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectCreationIdResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/connector/gmail/service-account-credential": {
      "put": {
        "summary": "Upsert Gmail Service Account Credential",
        "description": "Create a credential from an uploaded service account key. Each call creates a new\ncredential, so an instance can hold multiple service accounts.",
        "operationId": "upsert_gmail_service_account_credential",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GoogleServiceAccountCredentialRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectCreationIdResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/connector/google-drive/check-auth/{credential_id}": {
      "get": {
        "summary": "Check Drive Tokens",
        "operationId": "check_drive_tokens",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "credential_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Credential Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthStatus"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/connector/file/upload": {
      "post": {
        "summary": "Upload Files Api",
        "operationId": "upload_files_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "unzip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Unzip"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_files_api_manage_admin_connector_file_upload_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileUploadResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/connector/{connector_id}/files": {
      "get": {
        "summary": "List Connector Files",
        "description": "List all files in a file connector.",
        "operationId": "list_connector_files",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "connector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Connector Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorFilesResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/connector/{connector_id}/files/update": {
      "post": {
        "summary": "Update Connector Files",
        "description": "Update files in a connector by adding new files and/or removing existing ones.\nThis is an atomic operation that validates, updates the connector config, and triggers indexing.",
        "operationId": "update_connector_files",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "connector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Connector Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_update_connector_files_manage_admin_connector__connector_id__files_update_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileUploadResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/connector": {
      "get": {
        "summary": "Get Connectors By Credential",
        "description": "Get a list of connectors. Allow filtering by a specific credential id.",
        "operationId": "get_connectors_by_credential",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "credential",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Credential"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectorSnapshot"
                  },
                  "title": "Response Get Connectors By Credential Manage Admin Connector Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Connector From Model",
        "operationId": "create_connector_from_model",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectCreationIdResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/connector/failed-indexing-status": {
      "get": {
        "summary": "Get Currently Failed Indexing Status",
        "operationId": "get_currently_failed_indexing_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "secondary_index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Secondary Index"
            }
          },
          {
            "name": "get_editable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "If true, return editable document sets",
              "default": false,
              "title": "Get Editable"
            },
            "description": "If true, return editable document sets"
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FailedConnectorIndexingStatus"
                  },
                  "title": "Response Get Currently Failed Indexing Status Manage Admin Connector Failed Indexing Status Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/connector/status": {
      "get": {
        "summary": "Get Connector Status",
        "operationId": "get_connector_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectorStatus"
                  },
                  "title": "Response Get Connector Status Manage Admin Connector Status Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/connector/indexing-status": {
      "post": {
        "summary": "Get Connector Indexing Status",
        "operationId": "get_connector_indexing_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IndexingStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectorIndexingStatusLiteResponse"
                  },
                  "title": "Response Get Connector Indexing Status Manage Admin Connector Indexing Status Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/connector-with-mock-credential": {
      "post": {
        "summary": "Create Connector With Mock Credential",
        "operationId": "create_connector_with_mock_credential",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/connector/{connector_id}": {
      "patch": {
        "summary": "Update Connector From Model",
        "operationId": "update_connector_from_model",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "connector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Connector Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectorSnapshot"
                    },
                    {
                      "$ref": "#/components/schemas/StatusResponse_int_"
                    }
                  ],
                  "title": "Response Update Connector From Model Manage Admin Connector  Connector Id  Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Connector By Id",
        "operationId": "delete_connector_by_id",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "connector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Connector Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse_int_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/connector/run-once": {
      "post": {
        "summary": "Connector Run Once",
        "description": "Used to trigger indexing on a set of cc_pairs associated with a\nsingle connector.",
        "operationId": "connector_run_once",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunConnectorRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse_int_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/connector/gmail/authorize/{credential_id}": {
      "get": {
        "summary": "Gmail Auth",
        "operationId": "gmail_auth",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "credential_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Credential Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthUrl"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/connector/google-drive/authorize/{credential_id}": {
      "get": {
        "summary": "Google Drive Auth",
        "operationId": "google_drive_auth",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "credential_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Credential Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthUrl"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/connector/gmail/callback": {
      "get": {
        "summary": "Gmail Callback",
        "operationId": "gmail_callback",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "State"
            }
          },
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Code"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/connector/google-drive/callback": {
      "get": {
        "summary": "Google Drive Callback",
        "operationId": "google_drive_callback",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "State"
            }
          },
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Code"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/connector": {
      "get": {
        "summary": "Get Connectors",
        "operationId": "get_connectors",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectorSnapshot"
                  },
                  "title": "Response Get Connectors Manage Connector Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/indexed-sources": {
      "get": {
        "summary": "Get Indexed Sources",
        "operationId": "get_indexed_sources",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndexedSourcesResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/connector/{connector_id}": {
      "get": {
        "summary": "Get Connector By Id",
        "operationId": "get_connector_by_id",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "connector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Connector Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectorSnapshot"
                    },
                    {
                      "$ref": "#/components/schemas/StatusResponse_int_"
                    }
                  ],
                  "title": "Response Get Connector By Id Manage Connector  Connector Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/connector-request": {
      "post": {
        "summary": "Submit Connector Request",
        "description": "Submit a connector request for Cloud deployments.\nTracks via PostHog telemetry and sends email to hello@onyx.app.",
        "operationId": "submit_connector_request",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorRequestSubmission"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/connector-status": {
      "get": {
        "summary": "Get Basic Connector Indexing Status",
        "operationId": "get_basic_connector_indexing_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BasicCCPairInfo"
                  },
                  "title": "Response Get Basic Connector Indexing Status Manage Connector Status Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/credential": {
      "get": {
        "summary": "List Credentials Admin",
        "description": "Lists all public credentials",
        "operationId": "list_credentials_admin",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CredentialSnapshot"
                  },
                  "title": "Response List Credentials Admin Manage Admin Credential Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/similar-credentials/{source_type}": {
      "get": {
        "summary": "Get Cc Source Full Info",
        "operationId": "get_cc_source_full_info",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "source_type",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/DocumentSource"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CredentialSnapshot"
                  },
                  "title": "Response Get Cc Source Full Info Manage Admin Similar Credentials  Source Type  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/credential/{credential_id}": {
      "delete": {
        "summary": "Delete Credential By Id Admin",
        "description": "Same as the user endpoint, but can delete any credential (not just the user's own)",
        "operationId": "delete_credential_by_id_admin",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "credential_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Credential Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update Credential Data",
        "operationId": "update_credential_data",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "credential_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Credential Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CredentialDataUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialBase"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/credential/swap": {
      "put": {
        "summary": "Swap Credentials For Connector",
        "operationId": "swap_credentials_for_connector",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CredentialSwapRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/credential": {
      "post": {
        "summary": "Create Credential From Model",
        "operationId": "create_credential_from_model",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CredentialBase"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectCreationIdResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List Credentials",
        "operationId": "list_credentials",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CredentialSnapshot"
                  },
                  "title": "Response List Credentials Manage Credential Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/credential/private-key": {
      "post": {
        "summary": "Create Credential With Private Key",
        "operationId": "create_credential_with_private_key",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_create_credential_with_private_key_manage_credential_private_key_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectCreationIdResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/credential/{credential_id}": {
      "get": {
        "summary": "Get Credential By Id",
        "operationId": "get_credential_by_id",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "credential_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Credential Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/CredentialSnapshot"
                    },
                    {
                      "$ref": "#/components/schemas/StatusResponse_int_"
                    }
                  ],
                  "title": "Response Get Credential By Id Manage Credential  Credential Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Credential From Model",
        "operationId": "update_credential_from_model",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "credential_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Credential Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CredentialBase"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/CredentialSnapshot"
                    },
                    {
                      "$ref": "#/components/schemas/StatusResponse_int_"
                    }
                  ],
                  "title": "Response Update Credential From Model Manage Credential  Credential Id  Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Credential By Id",
        "operationId": "delete_credential_by_id",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "credential_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Credential Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/credential/private-key/{credential_id}": {
      "put": {
        "summary": "Update Credential Private Key",
        "operationId": "update_credential_private_key",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "credential_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Credential Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_update_credential_private_key_manage_admin_credential_private_key__credential_id__put"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialBase"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/credential/force/{credential_id}": {
      "delete": {
        "summary": "Force Delete Credential By Id",
        "operationId": "force_delete_credential_by_id",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "credential_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Credential Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/credential/{credential_id}/capability-check": {
      "post": {
        "summary": "Trigger Capability Check",
        "description": "Marks the scope RUNNING, enqueues the check run, and returns the row.\n\nAccepted-style: the run happens on a worker and the caller polls the GET;\nthe previous report stays readable meanwhile. A run already RUNNING within\nthe staleness bound makes this a no-op returning the standing row. A\nconnector-scoped trigger requires the pairing to be visible to the caller.",
        "operationId": "trigger_capability_check",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "credential_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Credential Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CapabilityCheckRunRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapabilityReportSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/credential/{credential_id}/capability-report": {
      "get": {
        "summary": "Get Capability Report",
        "description": "Returns the stored report row for one scope, or None before any run.\n\n``connector_id`` selects the connector-scoped row; without it the\nconfig-less credential-scoped row is returned. A connector-scoped row the\ncaller may not see reads as absent.",
        "operationId": "get_capability_report",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "credential_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Credential Id"
            }
          },
          {
            "name": "connector_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Connector Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/CapabilityReportSnapshot"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Get Capability Report Manage Admin Credential  Credential Id  Capability Report Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/credential/capability-reports": {
      "get": {
        "summary": "List Capability Reports For Source",
        "description": "Returns the source's report rows visible to the caller, newest first.",
        "operationId": "list_capability_reports_for_source",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/DocumentSource"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CapabilityReportSnapshot"
                  },
                  "title": "Response List Capability Reports For Source Manage Admin Credential Capability Reports Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/input_prompt": {
      "get": {
        "summary": "List Input Prompts",
        "operationId": "list_input_prompts",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "include_public",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Include Public"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InputPromptSnapshot"
                  },
                  "title": "Response List Input Prompts Input Prompt Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Input Prompt",
        "operationId": "create_input_prompt",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInputPromptRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InputPromptSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/input_prompt/{input_prompt_id}": {
      "get": {
        "summary": "Get Input Prompt",
        "operationId": "get_input_prompt",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "input_prompt_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Input Prompt Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InputPromptSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch Input Prompt",
        "operationId": "patch_input_prompt",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "input_prompt_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Input Prompt Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateInputPromptRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InputPromptSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Input Prompt",
        "operationId": "delete_input_prompt",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "input_prompt_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Input Prompt Id"
            }
          },
          {
            "name": "delete_public",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Delete Public"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/input_prompt/{input_prompt_id}/hide": {
      "post": {
        "summary": "Hide Input Prompt For User",
        "description": "Endpoint that marks a seed (or any) prompt as disabled for the current user,\nso it won't show up in their subsequent queries.",
        "operationId": "hide_input_prompt_for_user",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "input_prompt_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Input Prompt Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/input_prompt/{input_prompt_id}": {
      "delete": {
        "summary": "Delete Public Input Prompt",
        "operationId": "delete_public_input_prompt",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "input_prompt_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Input Prompt Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/cc-pair/{cc_pair_id}/index-attempts": {
      "get": {
        "summary": "Get Cc Pair Index Attempts",
        "operationId": "get_cc_pair_index_attempts",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cc_pair_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Cc Pair Id"
            }
          },
          {
            "name": "page_num",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Page Num"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 10,
              "title": "Page Size"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedReturn_IndexAttemptSnapshot_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/index-attempt/{index_attempt_id}/stage-metrics": {
      "get": {
        "summary": "Get Index Attempt Stage Metrics",
        "description": "Return the per-stage timing breakdown for a single ``IndexAttempt``.\n\nReturned in pipeline (enum declaration) order. The frontend renders this\norder verbatim for the default \"Pipeline order\" sort and re-sorts\nclient-side for the \"Time taken\" sort. Auth: caller must have at least\nread access to the cc-pair that owns the attempt.",
        "operationId": "get_index_attempt_stage_metrics",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "index_attempt_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Index Attempt Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndexAttemptStageMetricsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/cc-pair/{cc_pair_id}/permission-sync-attempts": {
      "get": {
        "summary": "Get Cc Pair Permission Sync Attempts",
        "description": "Recent doc-permission sync attempts for a cc-pair, paginated.\n\nReturns ``applicable=False`` when the source does not run a separate\ndoc-permission sync job (e.g. Salesforce, where ACLs are pulled inline\nduring indexing). The frontend uses ``applicable`` to distinguish\n\"this kind of sync isn't applicable\" from \"no attempts yet\".",
        "operationId": "get_cc_pair_permission_sync_attempts",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cc_pair_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Cc Pair Id"
            }
          },
          {
            "name": "page_num",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Page Num"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 10,
              "title": "Page Size"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CCPairSyncAttemptsResponse_DocPermissionSyncAttemptSnapshot_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/cc-pair/{cc_pair_id}/external-group-sync-attempts": {
      "get": {
        "summary": "Get Cc Pair External Group Sync Attempts",
        "description": "Recent external-group sync attempts a viewer of this cc-pair would\nexpect to see, paginated.\n\nReturns ``applicable=False`` when the source does not run a separate\nexternal-group sync job. For sources whose group sync is logically\nsource-wide (Confluence, Jira), attempts triggered against any sibling\ncc-pair sharing the source are included \u2014 see\n``get_relevant_external_group_sync_attempts_for_cc_pair``.",
        "operationId": "get_cc_pair_external_group_sync_attempts",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cc_pair_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Cc Pair Id"
            }
          },
          {
            "name": "page_num",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Page Num"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 10,
              "title": "Page Size"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CCPairSyncAttemptsResponse_ExternalGroupSyncAttemptSnapshot_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/cc-pair/{cc_pair_id}": {
      "get": {
        "summary": "Get Cc Pair Full Info",
        "operationId": "get_cc_pair_full_info",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cc_pair_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Cc Pair Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CCPairFullInfo"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/cc-pair/{cc_pair_id}/status": {
      "put": {
        "summary": "Update Cc Pair Status",
        "description": "This method returns nearly immediately. It simply sets some signals and\noptimistically assumes any running background processes will clean themselves up.\nThis is done to improve the perceived end user experience.\n\nReturns HTTPStatus.OK if everything finished.",
        "operationId": "update_cc_pair_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cc_pair_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Cc Pair Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CCStatusUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/cc-pair/{cc_pair_id}/name": {
      "put": {
        "summary": "Update Cc Pair Name",
        "operationId": "update_cc_pair_name",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cc_pair_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Cc Pair Id"
            }
          },
          {
            "name": "new_name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "New Name"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse_int_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/cc-pair/{cc_pair_id}/property": {
      "put": {
        "summary": "Update Cc Pair Property",
        "operationId": "update_cc_pair_property",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cc_pair_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Cc Pair Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CCPropertyUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse_int_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/cc-pair/{cc_pair_id}/last_pruned": {
      "get": {
        "summary": "Get Cc Pair Last Pruned",
        "operationId": "get_cc_pair_last_pruned",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cc_pair_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Cc Pair Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Get Cc Pair Last Pruned Manage Admin Cc Pair  Cc Pair Id  Last Pruned Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/cc-pair/{cc_pair_id}/prune": {
      "post": {
        "summary": "Prune Cc Pair",
        "description": "Triggers pruning on a particular cc_pair immediately",
        "operationId": "prune_cc_pair",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cc_pair_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Cc Pair Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse_list_int__"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/cc-pair/{cc_pair_id}/get-docs-sync-status": {
      "get": {
        "summary": "Get Docs Sync Status",
        "operationId": "get_docs_sync_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cc_pair_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Cc Pair Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DocumentSyncStatus"
                  },
                  "title": "Response Get Docs Sync Status Manage Admin Cc Pair  Cc Pair Id  Get Docs Sync Status Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/cc-pair/{cc_pair_id}/errors": {
      "get": {
        "summary": "Get Cc Pair Indexing Errors",
        "description": "Gives back all errors for a given CC Pair. Allows pagination based on page and page_size params.\n\nArgs:\n    cc_pair_id: ID of the connector-credential pair to get errors for\n    include_resolved: Whether to include resolved errors in the results\n    page_num: Page number for pagination, starting at 0\n    page_size: Number of errors to return per page\n    _: Current user, must be curator or admin\n    db_session: Database session\n\nReturns:\n    Paginated list of indexing errors for the CC pair.",
        "operationId": "get_cc_pair_indexing_errors",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cc_pair_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Cc Pair Id"
            }
          },
          {
            "name": "include_resolved",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Resolved"
            }
          },
          {
            "name": "page_num",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Page Num"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 10,
              "title": "Page Size"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedReturn_IndexAttemptErrorPydantic_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/connector/{connector_id}/credential/{credential_id}": {
      "put": {
        "summary": "Associate Credential To Connector",
        "description": "NOTE(rkuo): internally discussed and the consensus is this endpoint\nand create_connector_with_mock_credential should be combined.\n\nThe intent of this endpoint is to handle connectors that actually need credentials.",
        "operationId": "associate_credential_to_connector",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "connector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Connector Id"
            }
          },
          {
            "name": "credential_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Credential Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorCredentialPairMetadata"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse_int_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Dissociate Credential From Connector",
        "operationId": "dissociate_credential_from_connector",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "connector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Connector Id"
            }
          },
          {
            "name": "credential_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Credential Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse_int_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/indexing/targeted-reindex": {
      "post": {
        "summary": "Submit Targeted Reindex",
        "operationId": "submit_targeted_reindex",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TargetedReindexRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TargetedReindexResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/indexing/targeted-reindex/{job_id}": {
      "get": {
        "summary": "Get Targeted Reindex Status",
        "operationId": "get_targeted_reindex_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Job Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TargetedReindexJobStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/projects": {
      "get": {
        "summary": "Get Projects",
        "operationId": "get_projects",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserProjectSnapshot"
                  },
                  "title": "Response Get Projects User Projects Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/projects/create": {
      "post": {
        "summary": "Create Project",
        "operationId": "create_project",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Name"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserProjectSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/projects/file/upload": {
      "post": {
        "summary": "Upload User Files",
        "operationId": "upload_user_files",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_user_files_user_projects_file_upload_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategorizedFilesSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/projects/{project_id}": {
      "get": {
        "summary": "Get Project",
        "operationId": "get_project",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserProjectSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Project",
        "operationId": "update_project",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserProjectSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Project",
        "operationId": "delete_project",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/projects/files/{project_id}": {
      "get": {
        "summary": "Get Files In Project",
        "operationId": "get_files_in_project",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserFileSnapshot"
                  },
                  "title": "Response Get Files In Project User Projects Files  Project Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/projects/{project_id}/files/{file_id}": {
      "delete": {
        "summary": "Unlink User File From Project",
        "description": "Unlink an existing user file from a specific project for the current user.\n\nDoes not delete the underlying file; only removes the association.",
        "operationId": "unlink_user_file_from_project",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          },
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "File Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Link User File To Project",
        "description": "Link an existing user file to a specific project for the current user.\n\nCreates the association in the Project__UserFile join table if it does not exist.\nReturns the linked user file snapshot.",
        "operationId": "link_user_file_to_project",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          },
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "File Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserFileSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/projects/{project_id}/instructions": {
      "get": {
        "summary": "Get Project Instructions",
        "operationId": "get_project_instructions",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectInstructionsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Upsert Project Instructions",
        "description": "Create or update this project's instructions stored on the project itself.",
        "operationId": "upsert_project_instructions",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertProjectInstructionsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectInstructionsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/projects/{project_id}/details": {
      "get": {
        "summary": "Get Project Details",
        "operationId": "get_project_details",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectPayload"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/projects/file/{file_id}": {
      "delete": {
        "summary": "Delete User File",
        "description": "Delete a user file belonging to the current user.\n\nThis will also remove any project associations for the file.",
        "operationId": "delete_user_file",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "File Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserFileDeleteResult"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get User File",
        "description": "Fetch a single user file by ID for the current user.\n\nIncludes files in any status (including FAILED) to allow status polling.",
        "operationId": "get_user_file",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "File Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserFileSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/projects/file/statuses": {
      "post": {
        "summary": "Get User File Statuses",
        "description": "Fetch statuses for a set of user file IDs owned by the current user.\n\nIncludes files in any status so the client can detect transitions to FAILED.",
        "operationId": "get_user_file_statuses",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserFileIdsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserFileSnapshot"
                  },
                  "title": "Response Get User File Statuses User Projects File Statuses Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/projects/{project_id}/move_chat_session": {
      "post": {
        "summary": "Move Chat Session",
        "operationId": "move_chat_session",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatSessionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/projects/remove_chat_session": {
      "post": {
        "summary": "Remove Chat Session",
        "operationId": "remove_chat_session",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatSessionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/projects/session/{chat_session_id}/token-count": {
      "get": {
        "summary": "Get Chat Session Project Token Count",
        "description": "Return sum of token_count for all user files in the project linked to the given chat session.\n\nIf the chat session has no project, returns 0.",
        "operationId": "get_chat_session_project_token_count",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "chat_session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Chat Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenCountResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/projects/session/{chat_session_id}/files": {
      "get": {
        "summary": "Get Chat Session Project Files",
        "description": "Return user files for the project linked to the given chat session.\n\nIf the chat session has no project, returns an empty list.\nOnly returns files owned by the current user and not FAILED.",
        "operationId": "get_chat_session_project_files",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "chat_session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Chat Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserFileSnapshot"
                  },
                  "title": "Response Get Chat Session Project Files User Projects Session  Chat Session Id  Files Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/projects/{project_id}/token-count": {
      "get": {
        "summary": "Get Project Total Token Count",
        "description": "Return sum of token_count for all user files in the given project for the current user.",
        "operationId": "get_project_total_token_count",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenCountResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/webapp-preview": {
      "get": {
        "summary": "Issue Webapp Preview",
        "operationId": "issue_webapp_preview",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/preview/exchange": {
      "get": {
        "summary": "Preview Exchange Bootstrap",
        "operationId": "preview_exchange_bootstrap",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      },
      "post": {
        "summary": "Exchange Webapp Preview",
        "operationId": "exchange_webapp_preview",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/webapp/{path}": {
      "get": {
        "summary": "Get Webapp",
        "operationId": "get_webapp",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "path",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Path"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/webapp": {
      "get": {
        "summary": "Get Webapp",
        "operationId": "get_webapp",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "",
              "title": "Path"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions": {
      "get": {
        "summary": "List Sessions",
        "description": "List all build sessions for the current user.",
        "operationId": "list_sessions",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Session",
        "description": "Create or get an existing empty build session.\n\nReserve \u2192 reconcile \u2192 finalize: the sandbox and session identities are\ncommitted before external provisioning, so a failed or interrupted\nattempt leaves durable, repairable state (a later request converges on\nthe same IDs) rather than rolling back to nothing.\n\nThe Redis lock only reduces duplicate provisioning work for concurrent\nrequests; correctness comes from the committed reservation and the\nattempt-number condition on status writes.",
        "operationId": "create_session",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetailedSessionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}": {
      "get": {
        "summary": "Get Session Details",
        "description": "Get details of a specific build session.\n\nReturns session_loaded_in_sandbox to indicate if the session workspace\nexists in the running sandbox.",
        "operationId": "get_session_details",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "check_workspace",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Check Workspace"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetailedSessionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Session",
        "description": "Delete a build session and all associated data.\n\nThis endpoint is atomic - if sandbox termination fails, the session\nis NOT deleted (transaction is rolled back).",
        "operationId": "delete_session",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/skills/reload": {
      "post": {
        "summary": "Reload Session Skills",
        "operationId": "reload_session_skills",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionSkillsStateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/sandbox-status": {
      "get": {
        "summary": "Get Sandbox Status",
        "description": "Lightweight DB-only read of the user's sandbox status for the frontend sleep poll.",
        "operationId": "get_sandbox_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/pre-provisioned-check": {
      "get": {
        "summary": "Check Pre Provisioned Session",
        "description": "Check if a pre-provisioned session is still valid (empty).\n\nUsed by the frontend to poll and detect when another tab has used\nthe session. A session is considered valid if it has no messages yet.\n\nReturns:\n    - valid=True, session_id=<id> if the session is still empty\n    - valid=False, session_id=None if the session has messages or doesn't exist",
        "operationId": "check_pre_provisioned_session",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreProvisionedCheckResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/generate-name": {
      "post": {
        "summary": "Generate Session Name",
        "description": "Generate a session name using LLM based on the first user message.",
        "operationId": "generate_session_name",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNameGenerateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/name": {
      "put": {
        "summary": "Update Session Name",
        "description": "Update the name of a build session.",
        "operationId": "update_session_name",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/public": {
      "patch": {
        "summary": "Set Session Public",
        "description": "Set the sharing scope of a build session's webapp.",
        "operationId": "set_session_public",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetSessionSharingRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetSessionSharingResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/restore": {
      "post": {
        "summary": "Restore Session",
        "description": "Restore the sandbox (re-provisioning if asleep) and load the session\nworkspace. Serialized against create and reap via the per-user\nsession-flow lock; returns 409 if another flow holds it.",
        "operationId": "restore_session",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetailedSessionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/snapshot": {
      "post": {
        "summary": "Create Session Snapshot",
        "description": "Snapshot the owned session's outputs/attachments and record it. Returns\n204 when there is nothing to snapshot (no outputs) or snapshots are\ndisabled.",
        "operationId": "create_session_snapshot",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/opencode-history-snapshot": {
      "post": {
        "summary": "Create Session Opencode History Snapshot",
        "description": "Snapshot sandbox-global opencode history for the owned session.",
        "operationId": "create_session_opencode_history_snapshot",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpencodeHistorySnapshotResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/artifacts": {
      "get": {
        "summary": "List Artifacts",
        "description": "List artifacts generated in the session.",
        "operationId": "list_artifacts",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ArtifactResponse"
                  },
                  "title": "Response List Artifacts Build Sessions  Session Id  Artifacts Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/files": {
      "get": {
        "summary": "List Directory",
        "description": "List files and directories in the sandbox.\n\nArgs:\n    session_id: The session ID\n    path: Relative path from sandbox root (empty string for root)\n\nReturns:\n    DirectoryListing with sorted entries (directories first, then files)",
        "operationId": "list_directory",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "",
              "title": "Path"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DirectoryListing"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/artifacts/{path}": {
      "get": {
        "summary": "Download Artifact",
        "description": "Download a specific artifact file.",
        "operationId": "download_artifact",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "path",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Path"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/export-docx/{path}": {
      "get": {
        "summary": "Export Docx",
        "description": "Export a markdown file as DOCX.",
        "operationId": "export_docx",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "path",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Path"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/pptx-preview/{path}": {
      "get": {
        "summary": "Get Pptx Preview",
        "description": "Generate slide image previews for a PowerPoint file.",
        "operationId": "get_pptx_preview",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "path",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Path"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PptxPreviewResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/webapp-info": {
      "get": {
        "summary": "Get Webapp Info",
        "description": "Get webapp information for a session.\n\nReturns whether a webapp exists, its URL, and the sandbox status.",
        "operationId": "get_webapp_info",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebappInfo"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/webapp-download": {
      "get": {
        "summary": "Download Webapp",
        "description": "Download the webapp directory as a zip file.\n\nReturns the entire outputs/web directory as a zip archive.",
        "operationId": "download_webapp",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/download-directory/{path}": {
      "get": {
        "summary": "Download Directory",
        "description": "Download a directory as a zip file.\n\nReturns the specified directory as a zip archive.",
        "operationId": "download_directory",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "path",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Path"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/upload": {
      "post": {
        "summary": "Upload File Endpoint",
        "description": "Upload a file to the session's sandbox.\n\nThe file will be placed in the sandbox's attachments directory.",
        "operationId": "upload_file_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_file_endpoint_build_sessions__session_id__upload_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/onyx__server__features__build__models__UploadResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/files/{path}": {
      "delete": {
        "summary": "Delete File Endpoint",
        "description": "Delete a file from the session's sandbox.\n\nArgs:\n    session_id: The session ID\n    path: Relative path to the file (e.g., \"attachments/doc.pdf\")",
        "operationId": "delete_file_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "path",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Path"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/scheduled-run-context": {
      "get": {
        "summary": "Get Session Scheduled Run Context",
        "description": "Return the scheduled-task context for a session, if any.\n\nThe web UI calls this on every session view; a 200 response means\n\"render the banner above the transcript and apply scheduled-run state\".\nA 404 means \"this is an interactive session, behave normally\".",
        "operationId": "get_session_scheduled_run_context",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledRunContextResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/scheduled-run-events": {
      "get": {
        "summary": "Get Session Scheduled Run Events",
        "description": "Stream live ACP events for a running scheduled-origin Craft session.",
        "operationId": "get_session_scheduled_run_events",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/messages": {
      "get": {
        "summary": "List Messages",
        "description": "Get all messages for a build session.",
        "operationId": "list_messages",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/send-message": {
      "post": {
        "summary": "Send Message",
        "description": "Start an interactive Craft turn in the background.",
        "operationId": "send_message",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InteractiveTurnResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/subagents/{subagent_session_id}/send-message": {
      "post": {
        "summary": "Send Subagent Message",
        "description": "Send a follow-up message to a subagent's child opencode session and\nstream the response.\n\nThe subagent session must be a child opencode session spawned under this\nbuild session; a bogus id surfaces as an upstream error event in the SSE\nstream. Returns a Server-Sent Events (SSE) stream, mirroring\n/sessions/{session_id}/send-message.",
        "operationId": "send_subagent_message",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "subagent_session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Subagent Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubagentMessageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/interrupt": {
      "post": {
        "summary": "Interrupt Message",
        "description": "Interrupt the in-flight agent turn for a session.\n\nInterrupts the opencode-serve turn inside the sandbox; attached turn-event\nstreams then terminate through their normal completion path.",
        "operationId": "interrupt_message",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageInterruptResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/turns/active": {
      "get": {
        "summary": "Get Active Interactive Turn",
        "description": "Return the active interactive turn for a Craft session, if any.",
        "operationId": "get_active_interactive_turn",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/InteractiveTurnResponse"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Get Active Interactive Turn Build Sessions  Session Id  Turns Active Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/sessions/{session_id}/turns/{turn_id}/events": {
      "get": {
        "summary": "Get Interactive Turn Events",
        "description": "Attach to live opencode events for an active interactive turn.",
        "operationId": "get_interactive_turn_events",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "turn_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Turn Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/user-library/tree": {
      "get": {
        "summary": "Get Library Tree",
        "description": "Get user's uploaded files as a tree structure.",
        "operationId": "get_library_tree",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LibraryEntryResponse"
                  },
                  "title": "Response Get Library Tree Build User Library Tree Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/user-library/upload": {
      "post": {
        "summary": "Upload Files",
        "description": "Upload files as raw binary (no text extraction) for sandbox access.",
        "operationId": "upload_files",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_files_build_user_library_upload_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/onyx__server__features__build__user_library__api__UploadResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/user-library/upload-zip": {
      "post": {
        "summary": "Upload Zip",
        "description": "Upload and extract a zip file, preserving directory structure.",
        "operationId": "upload_zip",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_zip_build_user_library_upload_zip_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/onyx__server__features__build__user_library__api__UploadResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/user-library/directories": {
      "post": {
        "summary": "Create Directory",
        "description": "Create a virtual directory (document record only, no S3 object).",
        "operationId": "create_directory",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDirectoryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryEntryResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/user-library/files/{document_id}": {
      "delete": {
        "summary": "Delete File",
        "description": "Delete a file from the file store and the document table.",
        "operationId": "delete_file",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Document Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteFileResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/scheduled-tasks": {
      "get": {
        "summary": "List Scheduled Tasks",
        "description": "List the caller's scheduled tasks, newest first.",
        "operationId": "list_scheduled_tasks",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledTaskListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Task",
        "description": "Create a new scheduled task.\n\nPipeline:\n  1. Compile ``editor_mode`` + ``editor_payload`` to a canonical cron.\n  2. Insert via ``create_scheduled_task`` (which computes ``next_run_at``\n     when the task is created ACTIVE).\n  3. If ``run_immediately`` is set, insert a ``manual_run_now`` run row\n     and enqueue the executor. Does NOT touch ``next_run_at``.",
        "operationId": "create_task",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduledTaskCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledTaskDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/scheduled-tasks/{task_id}": {
      "get": {
        "summary": "Get Task",
        "description": "Fetch one task + the next 3 fire times for the UI preview.",
        "operationId": "get_task",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Task Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledTaskDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch Task",
        "description": "Apply a partial update.\n\nIf ``editor_mode`` + ``editor_payload`` are provided, the cron is\nrecompiled before being handed to ``update_scheduled_task``. The DB op\nhandles ``next_run_at`` recomputation (schedule change, pause/resume) on\nits own.",
        "operationId": "patch_task",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Task Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduledTaskPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledTaskDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Task",
        "description": "Soft-delete a task. Idempotent \u2014 calling on a missing or already-\ndeleted task is a no-op (matches ``soft_delete_scheduled_task``).",
        "operationId": "delete_task",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Task Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/scheduled-tasks/{task_id}/run-now": {
      "post": {
        "summary": "Run Now",
        "description": "Fire a one-off ``manual_run_now`` execution.\n\nAllowed on PAUSED tasks. Does NOT mutate ``next_run_at`` \u2014 that's\nthe dispatcher's job for recurring fires.",
        "operationId": "run_now",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Task Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunNowResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/scheduled-tasks/{task_id}/runs": {
      "get": {
        "summary": "List Task Runs",
        "description": "Paginated run history for a task, newest first.\n\n``cursor`` is the ``started_at`` (ISO-8601) of the last row returned by\nthe previous page. ``next_cursor`` is ``None`` when the last page is\nreached.\n\nRaises ``OnyxError(NOT_FOUND)`` when the task is missing, soft-deleted,\nor owned by another user (ownership check happens inside the DB op).",
        "operationId": "list_task_runs",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Task Id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/apps/{external_app_id}/credentials": {
      "post": {
        "summary": "Upsert User Credentials",
        "description": "Set or replace the calling user's credentials for the given external app.\n\nReturns 404 if no app with `external_app_id` exists.",
        "operationId": "upsert_user_credentials",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "external_app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "External App Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertUserCredentialsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Disconnect User From External App",
        "description": "Disconnect the calling user and disable the app's associated skills.",
        "operationId": "disconnect_user_from_external_app",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "external_app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "External App Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/apps": {
      "get": {
        "summary": "List External Apps",
        "description": "List enabled external apps with the calling user's credential state: the\nkeys the user must supply, the values already stored, and an\n``authenticated`` flag. Org credentials and the raw auth template aren't\nexposed.",
        "operationId": "list_external_apps",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExternalAppUserResponse"
                  },
                  "title": "Response List External Apps Build Apps Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/apps/connect/{request_id}/decision": {
      "post": {
        "summary": "Resolve Connect App Request",
        "description": "Answer a pending ``connect_app`` request: load the stashed context and\nanswer opencode on the user's sandbox \u2014 connected (allow) / declined\n(reject). Idempotent; an expired or already-answered request is a no-op.",
        "operationId": "resolve_connect_app_request",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "request_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Request Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectAppDecisionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/apps/{external_app_id}/oauth/start": {
      "get": {
        "summary": "Start External App Oauth",
        "operationId": "start_external_app_oauth",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "external_app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "External App Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthStartResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/apps/oauth/callback": {
      "post": {
        "summary": "Handle External App Oauth Callback",
        "operationId": "handle_external_app_oauth_callback",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthCallbackRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/onyx__server__features__build__external_apps__models__OAuthCallbackResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/debug/opencode-logs/stream": {
      "get": {
        "summary": "Stream Opencode Logs",
        "description": "Server-Sent Events stream of the user's sandbox pod's\n``sandbox`` (opencode-serve) container logs, following live.\n\nEach event is a single JSON object ``{\"line\": \"...\"}`` so the FE can\nextend the shape later without renegotiating the stream format.\nCloses cleanly on client disconnect (GeneratorExit) \u2014 the underlying\nkubernetes-client log stream is generator-based and stops on close.",
        "operationId": "stream_opencode_logs",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/approvals/sessions/{session_id}/live": {
      "get": {
        "summary": "List Live Approvals",
        "description": "Pending approvals created within the proxy's wait window.\n\nOlder undecided rows are treated as orphaned (proxy gone) and excluded.",
        "operationId": "list_live_approvals",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/approvals/{approval_id}/decision": {
      "post": {
        "summary": "Submit Decision",
        "description": "Record the caller's decision on a pending approval request.",
        "operationId": "submit_decision",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "approval_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Approval Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecisionBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/approvals/{approval_id}/session-grant": {
      "post": {
        "summary": "Submit Session Grant",
        "description": "Approve this request and similar app/action requests for the session.",
        "operationId": "submit_session_grant",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "approval_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Approval Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/admin/apps/built-in": {
      "post": {
        "summary": "Create Built In External App",
        "description": "Create a built-in external app. Built-in providers only (CUSTOM rejected);\ncustom apps use ``POST /admin/apps/custom``, updates use ``PATCH``. On cloud,\nOnyx-managed built-ins are Onyx-provisioned and can't be created here.",
        "operationId": "create_built_in_external_app",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBuiltInExternalAppRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalAppAdminResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/admin/apps/{external_app_id}": {
      "patch": {
        "summary": "Update External App Admin",
        "description": "Partial update of any app (404 if absent). ``None`` fields are left\nuntouched. For Onyx-managed built-ins (cloud) the gateway-config fields\nare Onyx-owned and ignored \u2014 only ``enabled`` and ``action_policies`` apply.",
        "operationId": "update_external_app_admin",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "external_app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "External App Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateExternalAppRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalAppAdminResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete External App Admin",
        "description": "Delete an app and its provider-owned skills. Associated custom skills\nare detached and left disabled. Returns 404 if the app is absent.",
        "operationId": "delete_external_app_admin",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "external_app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "External App Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/admin/apps/custom": {
      "post": {
        "summary": "Create Custom External App",
        "description": "Create a CUSTOM gateway without creating or ingesting a skill.",
        "operationId": "create_custom_external_app",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomExternalAppRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalAppAdminResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/admin/apps": {
      "get": {
        "summary": "List External Apps Admin",
        "description": "List all external apps with admin-only fields (org credentials, auth template).",
        "operationId": "list_external_apps_admin",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExternalAppAdminResponse"
                  },
                  "title": "Response List External Apps Admin Build Admin Apps Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/admin/apps/built-in/options": {
      "get": {
        "summary": "List Built In External Apps",
        "description": "Backend-defined presets for the admin \"Configure\" UI.",
        "operationId": "list_built_in_external_apps",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BuiltInExternalAppDescriptor"
                  },
                  "title": "Response List Built In External Apps Build Admin Apps Built In Options Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/build/admin/base-instructions": {
      "get": {
        "summary": "Get Base Instructions",
        "description": "The base AGENTS.md template, so admins can see what their workspace\ninstructions are appended to. Dynamic sections appear as placeholders.",
        "operationId": "get_base_instructions",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BaseInstructionsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/image-generation/generate": {
      "post": {
        "summary": "Generate Image",
        "operationId": "generate_image",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageGenerationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageGenerationResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/document-set": {
      "post": {
        "summary": "Create Document Set",
        "operationId": "create_document_set",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentSetCreationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "title": "Response Create Document Set Manage Admin Document Set Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch Document Set",
        "operationId": "patch_document_set",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentSetUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/document-set/{document_set_id}": {
      "delete": {
        "summary": "Delete Document Set",
        "operationId": "delete_document_set",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "document_set_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Document Set Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get Document Set",
        "description": "Read one document set.\n\nThe listing is scoped to the caller, so a client managing a single set had\nto fetch every set and filter. This returns the same shape as the listing.",
        "operationId": "get_document_set",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "document_set_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Document Set Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentSetSummary"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/document-set": {
      "get": {
        "summary": "List Document Sets For User",
        "operationId": "list_document_sets_for_user",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "get_editable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "If true, return editable document sets",
              "default": false,
              "title": "Get Editable"
            },
            "description": "If true, return editable document sets"
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DocumentSetSummary"
                  },
                  "title": "Response List Document Sets For User Manage Document Set Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/document-set-public": {
      "get": {
        "summary": "Document Set Public",
        "operationId": "document_set_public",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckDocSetPublicRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckDocSetPublicResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/hierarchy-nodes": {
      "get": {
        "summary": "List Accessible Hierarchy Nodes",
        "operationId": "list_accessible_hierarchy_nodes",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/DocumentSource"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HierarchyNodesResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/hierarchy-nodes/documents": {
      "post": {
        "summary": "List Accessible Hierarchy Node Documents",
        "operationId": "list_accessible_hierarchy_node_documents",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HierarchyNodeDocumentsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HierarchyNodeDocumentsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/hierarchy-nodes/search": {
      "get": {
        "summary": "Search Hierarchy Nodes",
        "operationId": "search_hierarchy_nodes",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Query"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DocumentSource"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HierarchyNodeSearchResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search": {
      "post": {
        "summary": "Search",
        "description": "Search the Onyx index and get back ranked document sections.\n\nRuns the same multi-stage retrieval as the Search action in chat \u2014 query\nexpansion, hybrid retrieval, reranking and section merging \u2014 and returns the\nranked sections without generating an answer. Results are ordered most\nrelevant first and are always filtered by the calling user's document\npermissions.",
        "operationId": "search",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search-settings/set-new-search-settings": {
      "post": {
        "summary": "Set New Search Settings",
        "description": "Creates a new SearchSettings row and cancels the previous secondary indexing\nif any exists.",
        "operationId": "set_new_search_settings",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchSettingsCreationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdReturn"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search-settings/cancel-new-embedding": {
      "post": {
        "summary": "Cancel New Embedding",
        "operationId": "cancel_new_embedding",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search-settings/delete-search-settings": {
      "delete": {
        "summary": "Delete Search Settings Endpoint",
        "operationId": "delete_search_settings_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchSettingsDeleteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search-settings/get-current-search-settings": {
      "get": {
        "summary": "Get Current Search Settings Endpoint",
        "operationId": "get_current_search_settings_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedSearchSettings"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search-settings/get-secondary-search-settings": {
      "get": {
        "summary": "Get Secondary Search Settings Endpoint",
        "operationId": "get_secondary_search_settings_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SavedSearchSettings"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Get Secondary Search Settings Endpoint Search Settings Get Secondary Search Settings Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search-settings/reindex-progress": {
      "get": {
        "summary": "Get Reindex Progress",
        "operationId": "get_reindex_progress",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReindexProgressCounts"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search-settings/reindex-errors": {
      "get": {
        "summary": "Get Reindex Errors",
        "operationId": "get_reindex_errors",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReindexErrorRow"
                  },
                  "title": "Response Get Reindex Errors Search Settings Reindex Errors Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search-settings/reindex/port/resume": {
      "post": {
        "summary": "Resume Paused Port",
        "operationId": "resume_paused_port",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PortActionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortActionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search-settings/get-all-search-settings": {
      "get": {
        "summary": "Get All Search Settings",
        "operationId": "get_all_search_settings",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FullModelVersionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search-settings/update-inference-settings": {
      "post": {
        "summary": "Update Saved Search Settings",
        "operationId": "update_saved_search_settings",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavedSearchSettings"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContextualRagModelUpdateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search-settings/unstructured-api-key-set": {
      "get": {
        "summary": "Unstructured Api Key Set",
        "operationId": "unstructured_api_key_set",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean",
                  "title": "Response Unstructured Api Key Set Search Settings Unstructured Api Key Set Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search-settings/upsert-unstructured-api-key": {
      "put": {
        "summary": "Upsert Unstructured Api Key",
        "operationId": "upsert_unstructured_api_key",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "unstructured_api_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Unstructured Api Key"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search-settings/delete-unstructured-api-key": {
      "delete": {
        "summary": "Delete Unstructured Api Key Endpoint",
        "operationId": "delete_unstructured_api_key_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/slack-app/channel": {
      "post": {
        "summary": "Create Slack Channel Config",
        "operationId": "create_slack_channel_config",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SlackChannelConfigCreationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackChannelConfig"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List Slack Channel Configs",
        "operationId": "list_slack_channel_configs",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SlackChannelConfig"
                  },
                  "title": "Response List Slack Channel Configs Manage Admin Slack App Channel Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/slack-app/channel/{slack_channel_config_id}": {
      "patch": {
        "summary": "Patch Slack Channel Config",
        "operationId": "patch_slack_channel_config",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slack_channel_config_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Slack Channel Config Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SlackChannelConfigCreationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackChannelConfig"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Slack Channel Config",
        "operationId": "delete_slack_channel_config",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slack_channel_config_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Slack Channel Config Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/slack-app/bots": {
      "post": {
        "summary": "Create Bot",
        "operationId": "create_bot",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SlackBotCreationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackBot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List Bots",
        "operationId": "list_bots",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SlackBot"
                  },
                  "title": "Response List Bots Manage Admin Slack App Bots Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/slack-app/bots/{slack_bot_id}": {
      "patch": {
        "summary": "Patch Bot",
        "operationId": "patch_bot",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slack_bot_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Slack Bot Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SlackBotCreationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackBot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Bot",
        "operationId": "delete_bot",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slack_bot_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Slack Bot Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get Bot By Id",
        "operationId": "get_bot_by_id",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slack_bot_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Slack Bot Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackBot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/slack-app/bots/{bot_id}/config": {
      "get": {
        "summary": "List Bot Configs",
        "operationId": "list_bot_configs",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "bot_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Bot Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SlackChannelConfig"
                  },
                  "title": "Response List Bot Configs Manage Admin Slack App Bots  Bot Id  Config Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/discord-bot/config": {
      "get": {
        "summary": "Get Bot Config",
        "description": "Get Discord bot config. Returns 403 on Cloud or if env vars set.",
        "operationId": "get_bot_config",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscordBotConfigResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Bot Request",
        "description": "Create Discord bot config. Returns 403 on Cloud or if env vars set.",
        "operationId": "create_bot_request",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscordBotConfigCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscordBotConfigResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Bot Config Endpoint",
        "description": "Delete Discord bot config.\n\nAlso deletes the Discord service API key since the bot is being removed.",
        "operationId": "delete_bot_config_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Delete Bot Config Endpoint Manage Admin Discord Bot Config Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/discord-bot/service-api-key": {
      "delete": {
        "summary": "Delete Service Api Key Endpoint",
        "description": "Delete the Discord service API key.\n\nThis endpoint allows manual deletion of the service API key used by the\nDiscord bot to authenticate with the Onyx API. The key is also automatically\ndeleted when:\n- Bot config is deleted (self-hosted)\n- All guild configs are deleted (Cloud)",
        "operationId": "delete_service_api_key_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Delete Service Api Key Endpoint Manage Admin Discord Bot Service Api Key Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/discord-bot/guilds": {
      "get": {
        "summary": "List Guild Configs",
        "description": "List all guild configs (pending and registered).",
        "operationId": "list_guild_configs",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DiscordGuildConfigResponse"
                  },
                  "title": "Response List Guild Configs Manage Admin Discord Bot Guilds Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Guild Request",
        "description": "Create new guild config with registration key. Key shown once.",
        "operationId": "create_guild_request",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscordGuildConfigCreateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/discord-bot/guilds/{config_id}": {
      "get": {
        "summary": "Get Guild Config",
        "description": "Get specific guild config.",
        "operationId": "get_guild_config",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "config_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Config Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscordGuildConfigResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Guild Request",
        "description": "Update guild config.",
        "operationId": "update_guild_request",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "config_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Config Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscordGuildConfigUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscordGuildConfigResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Guild Request",
        "description": "Delete guild config (invalidates registration key).\n\nOn Cloud, if this was the last guild config, also deletes the service API key.",
        "operationId": "delete_guild_request",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "config_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Config Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Delete Guild Request Manage Admin Discord Bot Guilds  Config Id  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/discord-bot/guilds/{config_id}/channels": {
      "get": {
        "summary": "List Channel Configs",
        "description": "List whitelisted channels for a guild.",
        "operationId": "list_channel_configs",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "config_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Config Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DiscordChannelConfigResponse"
                  },
                  "title": "Response List Channel Configs Manage Admin Discord Bot Guilds  Config Id  Channels Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/discord-bot/guilds/{guild_config_id}/channels/{channel_config_id}": {
      "patch": {
        "summary": "Update Channel Request",
        "description": "Update channel config.",
        "operationId": "update_channel_request",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "guild_config_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Guild Config Id"
            }
          },
          {
            "name": "channel_config_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Channel Config Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscordChannelConfigUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscordChannelConfigResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/persona/{persona_id}/public": {
      "patch": {
        "summary": "Patch User Persona Public Status",
        "operationId": "patch_user_persona_public_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "persona_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Persona Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IsPublicRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/persona": {
      "post": {
        "summary": "Create Persona",
        "operationId": "create_persona",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonaUpsertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonaSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List Personas",
        "operationId": "list_personas",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "include_deleted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Deleted"
            }
          },
          {
            "name": "persona_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "title": "Persona Ids"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MinimalPersonaSnapshot"
                  },
                  "title": "Response List Personas Persona Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/persona/{persona_id}": {
      "patch": {
        "summary": "Update Persona",
        "operationId": "update_persona",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "persona_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Persona Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonaUpsertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonaSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Persona",
        "operationId": "delete_persona",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "persona_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Persona Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get Persona",
        "operationId": "get_persona",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "persona_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Persona Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FullPersonaSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/persona/labels": {
      "get": {
        "summary": "Get Labels",
        "operationId": "get_labels",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PersonaLabelResponse"
                  },
                  "title": "Response Get Labels Persona Labels Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Label",
        "description": "Create a new assistant label",
        "operationId": "create_label",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonaLabelCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonaLabelResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/persona/{persona_id}/share": {
      "patch": {
        "summary": "Share Persona",
        "operationId": "share_persona",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "persona_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Persona Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonaShareRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/persona/{persona_id}/transfer-ownership": {
      "post": {
        "summary": "Transfer Persona Ownership Endpoint",
        "operationId": "transfer_persona_ownership_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "persona_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Persona Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferPersonaOwnershipRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/persona/{persona_id}/share/me": {
      "delete": {
        "summary": "Leave Persona Shares",
        "operationId": "leave_persona_shares",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "persona_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Persona Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/persona/{persona_id}/avatar": {
      "get": {
        "summary": "Get Persona Avatar",
        "operationId": "get_persona_avatar",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "persona_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Persona Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/persona/{persona_id}/listed": {
      "patch": {
        "summary": "Patch Persona Visibility",
        "operationId": "patch_persona_visibility",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "persona_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Persona Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IsListedRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/persona/{persona_id}/featured": {
      "patch": {
        "summary": "Patch Persona Featured Status",
        "operationId": "patch_persona_featured_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "persona_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Persona Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IsFeaturedRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/persona": {
      "get": {
        "summary": "List Personas Admin",
        "operationId": "list_personas_admin",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "include_deleted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Deleted"
            }
          },
          {
            "name": "get_editable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "If true, return editable personas",
              "default": false,
              "title": "Get Editable"
            },
            "description": "If true, return editable personas"
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PersonaSnapshot"
                  },
                  "title": "Response List Personas Admin Admin Persona Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/persona/{persona_id}/undelete": {
      "patch": {
        "summary": "Undelete Persona",
        "operationId": "undelete_persona",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "persona_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Persona Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/persona/upload-image": {
      "post": {
        "summary": "Upload File",
        "operationId": "upload_file",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_file_admin_persona_upload_image_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Upload File Admin Persona Upload Image Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/persona/label/{label_id}": {
      "patch": {
        "summary": "Patch Persona Label",
        "operationId": "patch_persona_label",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "label_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Label Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonaLabelPatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Label",
        "operationId": "delete_label",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "label_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Label Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/agents": {
      "get": {
        "summary": "Get Agents Paginated",
        "description": "Paginated endpoint for listing agents available to the user.\n\nReturns items for the requested page plus total count.\nPersonas are ordered by display_priority (ASC, nulls last) then by ID (ASC).\n\nNOTE: persona_ids filter is not supported with pagination. Use the\nnon-paginated endpoint if filtering by specific IDs is needed.",
        "operationId": "get_agents_paginated",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "page_num",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Page number (0-indexed).",
              "default": 0,
              "title": "Page Num"
            },
            "description": "Page number (0-indexed)."
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "description": "Items per page.",
              "default": 10,
              "title": "Page Size"
            },
            "description": "Items per page."
          },
          {
            "name": "include_deleted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "If true, includes deleted personas.",
              "default": false,
              "title": "Include Deleted"
            },
            "description": "If true, includes deleted personas."
          },
          {
            "name": "get_editable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "If true, only returns editable personas.",
              "default": false,
              "title": "Get Editable"
            },
            "description": "If true, only returns editable personas."
          },
          {
            "name": "include_default",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "If true, includes builtin/default personas.",
              "default": true,
              "title": "Include Default"
            },
            "description": "If true, includes builtin/default personas."
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedReturn_MinimalPersonaSnapshot_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/agents/display-priorities": {
      "patch": {
        "summary": "Patch Agents Display Priorities",
        "operationId": "patch_agents_display_priorities",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisplayPriorityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/agents": {
      "get": {
        "summary": "Get Agents Admin Paginated",
        "description": "Paginated endpoint for listing agents (formerly personas) (admin view).\n\nReturns items for the requested page plus total count.\nAgents are ordered by display_priority (ASC, nulls last) then by ID (ASC).",
        "operationId": "get_agents_admin_paginated",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "page_num",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Page number (0-indexed).",
              "default": 0,
              "title": "Page Num"
            },
            "description": "Page number (0-indexed)."
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "description": "Items per page.",
              "default": 10,
              "title": "Page Size"
            },
            "description": "Items per page."
          },
          {
            "name": "include_deleted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "If true, includes deleted personas.",
              "default": false,
              "title": "Include Deleted"
            },
            "description": "If true, includes deleted personas."
          },
          {
            "name": "get_editable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "If true, only returns editable personas.",
              "default": false,
              "title": "Get Editable"
            },
            "description": "If true, only returns editable personas."
          },
          {
            "name": "include_default",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "If true, includes builtin/default personas.",
              "default": true,
              "title": "Include Default"
            },
            "description": "If true, includes builtin/default personas."
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedReturn_PersonaSnapshot_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/default-assistant/configuration": {
      "get": {
        "summary": "Get Default Assistant Configuration",
        "description": "Get the current default assistant configuration.\n\nReturns:\n    DefaultAssistantConfiguration with current tool IDs and system prompt",
        "operationId": "get_default_assistant_configuration",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultAssistantConfiguration"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/default-assistant": {
      "patch": {
        "summary": "Update Default Assistant",
        "description": "Update the default assistant configuration.\n\nArgs:\n    update_request: Request with optional tool_ids and system_prompt\n\nReturns:\n    Updated DefaultAssistantConfiguration\n\nRaises:\n    400: If invalid tool IDs are provided\n    404: If default assistant not found",
        "operationId": "update_default_assistant",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DefaultAssistantUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultAssistantConfiguration"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/notifications": {
      "get": {
        "summary": "Get Notifications Api",
        "description": "Get a page of notifications for the current user, optionally filtered to a\nsingle notif_type and/or a minimum severity (min_severity returns rows at\nthat severity or louder \u2014 the banner queue asks for WARNING and up).\n\nNote: the first unfiltered page runs the generic create-checks. A filtered\nrequest skips them, except that SYSTEM_ANNOUNCEMENT and\nLICENSE_EXPIRY_WARNING are ensured whenever they could appear in the\nresponse: always on their type filter, and throttled per user on\nseverity-only requests (the banner queue's polled fetch).\n\nExamples of checks that create new notifications:\n- Checking for new release notes the user hasn't seen\n- Checking for misconfigurations due to version changes\n- Explicitly announcing breaking changes",
        "operationId": "get_notifications_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "page_num",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Page Num"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 50,
              "minimum": 1,
              "default": 10,
              "title": "Page Size"
            }
          },
          {
            "name": "notif_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/NotificationType"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Notif Type"
            }
          },
          {
            "name": "min_severity",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/NotificationSeverity"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Severity"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedNotifications"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/notifications/summary": {
      "get": {
        "summary": "Get Notifications Summary Api",
        "operationId": "get_notifications_summary_api",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationSummary"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/notifications/dismiss-all": {
      "post": {
        "summary": "Dismiss All Notifications Endpoint",
        "operationId": "dismiss_all_notifications_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/notifications/{notification_id}/dismiss": {
      "post": {
        "summary": "Dismiss Notification Endpoint",
        "operationId": "dismiss_notification_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "notification_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Notification Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/banner": {
      "get": {
        "summary": "Get Admin Banner Config",
        "operationId": "get_admin_banner_config",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AdminBanner"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Get Admin Banner Config Admin Banner Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Upsert Admin Banner",
        "operationId": "upsert_admin_banner",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminBannerUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminBanner"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Admin Banner",
        "operationId": "delete_admin_banner",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/tool/openapi": {
      "get": {
        "summary": "List Openapi Tools",
        "operationId": "list_openapi_tools",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ToolSnapshot"
                  },
                  "title": "Response List Openapi Tools Tool Openapi Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/tool/{tool_id}": {
      "get": {
        "summary": "Get Custom Tool",
        "operationId": "get_custom_tool",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tool_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Tool Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/tool": {
      "get": {
        "summary": "List Tools",
        "operationId": "list_tools",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ToolSnapshot"
                  },
                  "title": "Response List Tools Tool Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tool/custom": {
      "post": {
        "summary": "Create Custom Tool",
        "operationId": "create_custom_tool",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomToolCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tool/custom/{tool_id}": {
      "put": {
        "summary": "Update Custom Tool",
        "operationId": "update_custom_tool",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tool_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Tool Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomToolUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Custom Tool",
        "operationId": "delete_custom_tool",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tool_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Tool Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tool/status": {
      "patch": {
        "summary": "Update Tools Status",
        "description": "Enable or disable one or more tools.\n\nPass a single tool ID in the list to update one tool, or multiple IDs for\nbulk updates.",
        "operationId": "update_tools_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ToolStatusUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolStatusUpdateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tool/custom/validate": {
      "post": {
        "summary": "Validate Tool",
        "operationId": "validate_tool",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateToolRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidateToolResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/oauth-config/initiate": {
      "post": {
        "summary": "Initiate Oauth Flow",
        "description": "Initiate OAuth flow for the current user.\n\nReturns an authorization URL that the frontend should redirect the user to.",
        "operationId": "initiate_oauth_flow",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthInitiateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthInitiateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/oauth-config/callback": {
      "post": {
        "summary": "Handle Oauth Callback",
        "description": "Handle OAuth callback after user authorizes the application.\n\nExchanges the authorization code for an access token and stores it.\nAccepts code and state as query parameters (standard OAuth flow).",
        "operationId": "handle_oauth_callback",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Code"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "State"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/onyx__server__features__oauth_config__models__OAuthCallbackResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/oauth-config/{oauth_config_id}/token": {
      "delete": {
        "summary": "Revoke Oauth Token",
        "description": "Revoke (delete) the current user's OAuth token for a specific OAuth config.",
        "operationId": "revoke_oauth_token",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "oauth_config_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Oauth Config Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Revoke Oauth Token Oauth Config  Oauth Config Id  Token Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/oauth-config/create": {
      "post": {
        "summary": "Create Oauth Config Endpoint",
        "description": "Create a new OAuth configuration. A scoped manager may create one and link it to an\naction they created; get/update/delete are then owner-or-admin.",
        "operationId": "create_oauth_config_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthConfigCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthConfigSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/oauth-config": {
      "get": {
        "summary": "List Oauth Configs",
        "description": "List all OAuth configurations (admin only).",
        "operationId": "list_oauth_configs",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OAuthConfigSnapshot"
                  },
                  "title": "Response List Oauth Configs Admin Oauth Config Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/oauth-config/{oauth_config_id}": {
      "get": {
        "summary": "Get Oauth Config Endpoint",
        "description": "Retrieve a single OAuth configuration (owner or admin).",
        "operationId": "get_oauth_config_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "oauth_config_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Oauth Config Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthConfigSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update Oauth Config Endpoint",
        "description": "Update an OAuth configuration (owner or admin).",
        "operationId": "update_oauth_config_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "oauth_config_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Oauth Config Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthConfigUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthConfigSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Oauth Config Endpoint",
        "description": "Delete an OAuth configuration (owner or admin).",
        "operationId": "delete_oauth_config_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "oauth_config_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Oauth Config Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Delete Oauth Config Endpoint Admin Oauth Config  Oauth Config Id  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user-oauth-token/status": {
      "get": {
        "summary": "Get User Oauth Token Status",
        "description": "Get the OAuth token status for the current user across all OAuth configs.\n\nReturns information about which OAuth configs the user has authenticated with\nand whether their tokens are expired.",
        "operationId": "get_user_oauth_token_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OAuthTokenStatus"
                  },
                  "title": "Response Get User Oauth Token Status User Oauth Token Status Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/health/ready": {
      "get": {
        "summary": "Readiness",
        "description": "Readiness probe. Wire this to readinessProbe and to load balancers.\n\nSync endpoints run in the anyio threadpool, so a saturated pool means the\nserver cannot serve real traffic even though the event loop still turns.\nThis handler stays async on purpose: a sync handler would borrow a token of\nthe pool it is measuring, adding load exactly when there is none to spare,\nand would queue rather than answer. Liveness lives at /health.",
        "operationId": "readiness",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "summary": "Healthcheck",
        "description": "Liveness probe. Answers only \"is this process still running\".\n\nDeliberately checks nothing else. Liveness failures restart the container,\nand saturation is load-induced and correlated across replicas, so gating\nrestarts on it would turn a slowdown into an outage. Use /health/ready for\nthat.",
        "operationId": "healthcheck",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          }
        }
      }
    },
    "/auth/type": {
      "get": {
        "summary": "Get Auth Type",
        "operationId": "get_auth_type",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthConfigResponse"
                }
              }
            }
          }
        }
      }
    },
    "/version": {
      "get": {
        "summary": "Get Version",
        "operationId": "get_version",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionResponse"
                }
              }
            }
          }
        }
      }
    },
    "/versions": {
      "get": {
        "summary": "Get Versions",
        "description": "Fetches the latest stable and beta versions of Onyx Docker images.\nSince DockerHub does not explicitly flag stable and beta images,\nthis endpoint can be used to programmatically check for new images.",
        "operationId": "get_versions",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllVersions"
                }
              }
            }
          }
        }
      }
    },
    "/onyx-api/connector-docs/{cc_pair_id}": {
      "get": {
        "summary": "Get Docs By Connector Credential Pair",
        "operationId": "get_docs_by_connector_credential_pair",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cc_pair_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Cc Pair Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DocMinimalInfo"
                  },
                  "title": "Response Get Docs By Connector Credential Pair Onyx Api Connector Docs  Cc Pair Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/onyx-api/ingestion": {
      "get": {
        "summary": "Get Ingestion Docs",
        "operationId": "get_ingestion_docs",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DocMinimalInfo"
                  },
                  "title": "Response Get Ingestion Docs Onyx Api Ingestion Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Upsert Ingestion Doc",
        "operationId": "upsert_ingestion_doc",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngestionDocument"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestionResult"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/onyx-api/ingestion/{document_id}": {
      "delete": {
        "summary": "Delete Ingestion Doc",
        "operationId": "delete_ingestion_doc",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Document Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/settings": {
      "get": {
        "summary": "Fetch Settings",
        "description": "Settings and notifications are stuffed into this single endpoint to reduce number of\nPostgres calls",
        "operationId": "fetch_settings",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserSettings"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/settings": {
      "patch": {
        "summary": "Admin Patch Settings",
        "operationId": "admin_patch_settings",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Settings"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Settings"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/security": {
      "get": {
        "summary": "Get Security Settings Endpoint",
        "operationId": "get_security_settings_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecuritySettings"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Put Security Settings Endpoint",
        "operationId": "put_security_settings_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecuritySettings"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/security/pinned-fields": {
      "get": {
        "summary": "Get Pinned Fields Endpoint",
        "description": "Fields currently pinned by env vars, so the UI can lock their inputs.",
        "operationId": "get_pinned_fields_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "title": "Response Get Pinned Fields Endpoint Admin Security Pinned Fields Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/sso/provider-type": {
      "get": {
        "summary": "List Supported Sso Provider Types",
        "description": "Provider types this deployment can serve, so the admin UI never offers a\ntype the create endpoint would reject.",
        "operationId": "list_supported_sso_provider_types",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SSOProviderType"
                  },
                  "title": "Response List Supported Sso Provider Types Admin Sso Provider Type Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/sso/provider": {
      "get": {
        "summary": "List Sso Providers",
        "operationId": "list_sso_providers",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SSOProviderResponse"
                  },
                  "title": "Response List Sso Providers Admin Sso Provider Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Sso Provider Endpoint",
        "operationId": "create_sso_provider_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSOProviderCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOProviderResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/sso/provider/{provider_id}": {
      "patch": {
        "summary": "Update Sso Provider Endpoint",
        "operationId": "update_sso_provider_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSOProviderUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOProviderResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/sso/provider/{provider_id}/enabled": {
      "post": {
        "summary": "Set Sso Provider Enabled Endpoint",
        "operationId": "set_sso_provider_enabled_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSOProviderEnabledRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOProviderResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/sso/domain/records": {
      "post": {
        "summary": "Sso Domain Records Endpoint",
        "description": "The TXT record and status for the domains an admin is configuring, so\nverification can be shown before the provider is saved.",
        "operationId": "sso_domain_records_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSODomainRecordsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOLoginDomainsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/sso/domain/verify-dns": {
      "post": {
        "summary": "Verify Sso Domain Via Dns Endpoint",
        "operationId": "verify_sso_domain_via_dns_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSODomainVerifyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOLoginDomainsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/custom-provider-names": {
      "get": {
        "summary": "Fetch Custom Provider Names",
        "description": "Returns the sorted list of LiteLLM provider names that can be used\nwith the custom provider modal (i.e. everything that is not already\ncovered by a well-known provider modal).",
        "operationId": "fetch_custom_provider_names",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomProviderOption"
                  },
                  "title": "Response Fetch Custom Provider Names Admin Llm Custom Provider Names Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/built-in/options": {
      "get": {
        "summary": "Fetch Llm Options",
        "operationId": "fetch_llm_options",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WellKnownLLMProviderDescriptor"
                  },
                  "title": "Response Fetch Llm Options Admin Llm Built In Options Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/built-in/options/{provider_name}": {
      "get": {
        "summary": "Fetch Llm Provider Options",
        "operationId": "fetch_llm_provider_options",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Provider Name"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WellKnownLLMProviderDescriptor"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/test": {
      "post": {
        "summary": "Test Llm Configuration",
        "description": "Test LLM configuration settings",
        "operationId": "test_llm_configuration",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestLLMRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/test/default": {
      "post": {
        "summary": "Test Default Provider",
        "operationId": "test_default_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/provider": {
      "get": {
        "summary": "List Llm Providers",
        "operationId": "list_llm_providers",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "include_image_gen",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Image Gen"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMProviderResponse_LLMProviderView_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Put Llm Provider",
        "operationId": "put_llm_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "is_creation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "True if creating a new one, False if updating an existing provider",
              "default": false,
              "title": "Is Creation"
            },
            "description": "True if creating a new one, False if updating an existing provider"
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LLMProviderUpsertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMProviderView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/provider/{provider_id}": {
      "get": {
        "summary": "Get Llm Provider",
        "description": "Read one provider without listing (and decrypting) every provider.",
        "operationId": "get_llm_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMProviderView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Llm Provider",
        "operationId": "delete_llm_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Provider Id"
            }
          },
          {
            "name": "force",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Force"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/default": {
      "post": {
        "summary": "Set Provider As Default",
        "operationId": "set_provider_as_default",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DefaultModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/default-vision": {
      "post": {
        "summary": "Set Provider As Default Vision",
        "operationId": "set_provider_as_default_vision",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DefaultModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/default-chat-naming": {
      "post": {
        "summary": "Set Provider As Default Chat Naming",
        "operationId": "set_provider_as_default_chat_naming",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DefaultModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Clear Default Chat Naming",
        "description": "Clear the dedicated naming model; auto-naming falls back to the\nsession's model.",
        "operationId": "clear_default_chat_naming",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/default-craft": {
      "post": {
        "summary": "Set Provider As Default Craft",
        "operationId": "set_provider_as_default_craft",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DefaultModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Clear Default Craft",
        "description": "Clear the Craft default; Craft sessions fall back to the chat default.",
        "operationId": "clear_default_craft",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/auto-config": {
      "get": {
        "summary": "Get Auto Config",
        "description": "Get the current Auto mode configuration from GitHub.\n\nReturns the available models and default configurations for each\nsupported provider type when using Auto mode.",
        "operationId": "get_auto_config",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Auto Config Admin Llm Auto Config Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/vision-providers": {
      "get": {
        "summary": "Get Vision Capable Providers",
        "description": "Return a list of LLM providers and their models that support image input",
        "operationId": "get_vision_capable_providers",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMProviderResponse_VisionProviderResponse_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/provider-contextual-cost": {
      "get": {
        "summary": "Get Provider Contextual Cost",
        "description": "Get the cost of Re-indexing all documents for contextual retrieval.\n\nSee https://docs.litellm.ai/docs/completion/token_usage#5-cost_per_token\nThis includes:\n- The cost of invoking the LLM on each chunk-document pair to get\n  - the doc_summary\n  - the chunk_context\n- The per-token cost of the LLM used to generate the doc_summary and chunk_context",
        "operationId": "get_provider_contextual_cost",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LLMCost"
                  },
                  "title": "Response Get Provider Contextual Cost Admin Llm Provider Contextual Cost Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/bedrock/available-models": {
      "post": {
        "summary": "Get Bedrock Available Models",
        "description": "Fetch available Bedrock models for a specific region and credentials.\n\nReturns model IDs with display names from AWS. Prefers inference profiles\n(for cross-region support) over base models when available.",
        "operationId": "get_bedrock_available_models",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BedrockModelsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BedrockFinalModelResponse"
                  },
                  "title": "Response Get Bedrock Available Models Admin Llm Bedrock Available Models Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/ollama/available-models": {
      "post": {
        "summary": "Get Ollama Available Models",
        "description": "Fetch the list of available models from an Ollama server.",
        "operationId": "get_ollama_available_models",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OllamaModelsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OllamaFinalModelResponse"
                  },
                  "title": "Response Get Ollama Available Models Admin Llm Ollama Available Models Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/openrouter/available-models": {
      "post": {
        "summary": "Get Openrouter Available Models",
        "description": "Fetch available models from OpenRouter `/models` endpoint.\n\nParses id, name (display), context_length, and architecture.input_modalities.",
        "operationId": "get_openrouter_available_models",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenRouterModelsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpenRouterFinalModelResponse"
                  },
                  "title": "Response Get Openrouter Available Models Admin Llm Openrouter Available Models Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/lm-studio/available-models": {
      "post": {
        "summary": "Get Lm Studio Available Models",
        "description": "Fetch available models from an LM Studio server.\n\nUses the LM Studio-native /api/v1/models endpoint which exposes\nrich metadata including capabilities (vision, reasoning),\ndisplay names, and context lengths.",
        "operationId": "get_lm_studio_available_models",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LMStudioModelsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LMStudioFinalModelResponse"
                  },
                  "title": "Response Get Lm Studio Available Models Admin Llm Lm Studio Available Models Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/litellm/available-models": {
      "post": {
        "summary": "Get Litellm Available Models",
        "description": "Fetch available models from LiteLLM proxy /v1/model/info endpoint.",
        "operationId": "get_litellm_available_models",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LitellmModelsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LitellmFinalModelResponse"
                  },
                  "title": "Response Get Litellm Available Models Admin Llm Litellm Available Models Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/bifrost/available-models": {
      "post": {
        "summary": "Get Bifrost Available Models",
        "description": "Fetch available models from Bifrost gateway /v1/models endpoint.",
        "operationId": "get_bifrost_available_models",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BifrostModelsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BifrostFinalModelResponse"
                  },
                  "title": "Response Get Bifrost Available Models Admin Llm Bifrost Available Models Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/nebius-tokenfactory/available-models": {
      "post": {
        "summary": "Get Nebius Tokenfactory Available Models",
        "description": "Fetch chat models from Nebius TokenFactory, with per-model context\nlength and tool/vision capabilities read straight from the source API.",
        "operationId": "get_nebius_tokenfactory_available_models",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NebiusTokenfactoryModelsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/NebiusTokenfactoryFinalModelResponse"
                  },
                  "title": "Response Get Nebius Tokenfactory Available Models Admin Llm Nebius Tokenfactory Available Models Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/openai-compatible/available-models": {
      "post": {
        "summary": "Get Openai Compatible Server Available Models",
        "description": "Fetch available models from a generic OpenAI-compatible /v1/models endpoint.",
        "operationId": "get_openai_compatible_server_available_models",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenAICompatibleModelsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpenAICompatibleFinalModelResponse"
                  },
                  "title": "Response Get Openai Compatible Server Available Models Admin Llm Openai Compatible Available Models Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/llm/portkey/available-models": {
      "post": {
        "summary": "Get Portkey Available Models",
        "description": "Fetch available models from a Portkey gateway's /v1/models endpoint.",
        "operationId": "get_portkey_available_models",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PortkeyModelsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PortkeyFinalModelResponse"
                  },
                  "title": "Response Get Portkey Available Models Admin Llm Portkey Available Models Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/kg/exposed": {
      "get": {
        "summary": "Get Kg Exposed",
        "operationId": "get_kg_exposed",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean",
                  "title": "Response Get Kg Exposed Admin Kg Exposed Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/kg/reset": {
      "put": {
        "summary": "Reset Kg",
        "operationId": "reset_kg",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceAndEntityTypeView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/kg/config": {
      "get": {
        "summary": "Get Kg Config",
        "operationId": "get_kg_config",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KGConfig"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Enable Or Disable Kg",
        "operationId": "enable_or_disable_kg",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/EnableKGConfigRequest"
                  },
                  {
                    "$ref": "#/components/schemas/DisableKGConfigRequest"
                  }
                ],
                "title": "Req"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/kg/entity-types": {
      "get": {
        "summary": "Get Kg Entity Types",
        "operationId": "get_kg_entity_types",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceAndEntityTypeView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update Kg Entity Types",
        "operationId": "update_kg_entity_types",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EntityType"
                },
                "title": "Updates"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/llm/provider": {
      "get": {
        "summary": "List Llm Provider Basics",
        "description": "Get LLM providers accessible to the current user.\n\nReturns:\n- All public providers (is_public=True) - Always included\n- Restricted providers user can access via their group memberships\n\nFor anonymous users or no_auth mode: returns only public providers\nThis ensures backward compatibility while providing better UX for authenticated users.",
        "operationId": "list_llm_provider_basics",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMProviderResponse_LLMProviderDescriptor_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/llm/persona/{persona_id}/providers": {
      "get": {
        "summary": "List Llm Providers For Persona",
        "description": "Get LLM providers for a specific persona.\n\nReturns providers that the user can access when using this persona:\n- Public providers (respecting persona restrictions if set)\n- Restricted providers user can access via group/persona restrictions\n\nThis endpoint is used for background fetching of restricted providers\nand should NOT block the UI.",
        "operationId": "list_llm_providers_for_persona",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "persona_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Persona Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMProviderResponse_LLMProviderDescriptor_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/code-interpreter/health": {
      "get": {
        "summary": "Get Code Interpreter Health",
        "operationId": "get_code_interpreter_health",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeInterpreterServerHealth"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/code-interpreter": {
      "get": {
        "summary": "Get Code Interpreter",
        "operationId": "get_code_interpreter",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeInterpreterServer"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update Code Interpreter",
        "operationId": "update_code_interpreter",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CodeInterpreterServer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/image-generation/test": {
      "post": {
        "summary": "Test Image Generation",
        "description": "Test if an API key is valid for image generation.\n\nMakes a minimal image generation request to verify credentials using LiteLLM.\n\nTwo modes:\n1. Direct: api_key + provider provided\n2. From existing provider: source_llm_provider_id provided (fetches API key from DB)",
        "operationId": "test_image_generation",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestImageGenerationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/image-generation/config": {
      "post": {
        "summary": "Create Config",
        "description": "Create a new image generation configuration.\n\nBoth modes create a new LLM provider + model config + image config:\n\n1. Clone mode: source_llm_provider_id provided\n   \u2192 Extract api key from existing provider, create new provider\n\n2. New credentials mode: api_key + provider provided\n   \u2192 Create new provider with given credentials",
        "operationId": "create_config",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageGenerationConfigCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageGenerationConfigView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get All Configs",
        "description": "Get all image generation configurations.",
        "operationId": "get_all_configs",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ImageGenerationConfigView"
                  },
                  "title": "Response Get All Configs Admin Image Generation Config Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/image-generation/config/{image_provider_id}/credentials": {
      "get": {
        "summary": "Get Config Credentials",
        "description": "Get the credentials for an image generation config (for edit mode).\n\nReturns the unmasked API key and other credential fields.",
        "operationId": "get_config_credentials",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "image_provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Image Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageGenerationCredentials"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/image-generation/config/{image_provider_id}": {
      "put": {
        "summary": "Update Config",
        "description": "Update an image generation configuration.\n\nFlow:\n1. Get existing config and its LLM provider\n2. Rename old LLM provider to free up the name (avoids unique constraint)\n3. Create new LLM provider + model config (same as create flow)\n4. Update ImageGenerationConfig to point to new model config\n5. Delete old LLM provider (safe now - nothing references it)",
        "operationId": "update_config",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "image_provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Image Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageGenerationConfigUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageGenerationConfigView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Config",
        "description": "Delete an image generation configuration and its associated LLM provider.",
        "operationId": "delete_config",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "image_provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Image Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/image-generation/config/{image_provider_id}/default": {
      "post": {
        "summary": "Set Config As Default",
        "description": "Set a configuration as the default for image generation.",
        "operationId": "set_config_as_default",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "image_provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Image Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Unset Config As Default",
        "description": "Unset a configuration as the default for image generation.",
        "operationId": "unset_config_as_default",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "image_provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Image Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/embedding/test-embedding": {
      "post": {
        "summary": "Test Embedding Configuration",
        "operationId": "test_embedding_configuration",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestEmbeddingRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/embedding": {
      "get": {
        "summary": "List Embedding Models",
        "operationId": "list_embedding_models",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmbeddingModelDetail"
                  },
                  "title": "Response List Embedding Models Admin Embedding Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/embedding/embedding-provider": {
      "get": {
        "summary": "List Embedding Providers",
        "operationId": "list_embedding_providers",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CloudEmbeddingProvider"
                  },
                  "title": "Response List Embedding Providers Admin Embedding Embedding Provider Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Put Cloud Embedding Provider",
        "operationId": "put_cloud_embedding_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloudEmbeddingProviderCreationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloudEmbeddingProvider"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/embedding/embedding-provider/{provider_type}": {
      "get": {
        "summary": "Get Embedding Provider",
        "operationId": "get_embedding_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_type",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/EmbeddingProvider"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloudEmbeddingProvider"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Embedding Provider",
        "operationId": "delete_embedding_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_type",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/EmbeddingProvider"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/web-search/search": {
      "post": {
        "summary": "Execute Web Search",
        "description": "Perform a web search and immediately fetch content for the returned URLs.\n\nUse this when you want both snippets and page contents from one call.\n\nIf you want to selectively fetch content (i.e. let the LLM decide which URLs to read),\nuse `/search-lite` and then call `/open-urls` separately.",
        "operationId": "execute_web_search",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebSearchToolRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebSearchWithContentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/web-search/search-lite": {
      "post": {
        "summary": "Execute Web Search Lite",
        "description": "Lightweight search-only endpoint. Returns search snippets and URLs without\nfetching page contents. Pair with `/open-urls` if you need to fetch content\nlater.",
        "operationId": "execute_web_search_lite",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebSearchToolRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebSearchToolResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/web-search/open-urls": {
      "post": {
        "summary": "Execute Open Urls",
        "description": "Fetch content for specific URLs using the configured content provider.\nIntended to complement `/search-lite` when you need content for a subset of URLs.",
        "operationId": "execute_open_urls",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenUrlsToolRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenUrlsToolResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/web-search/search-providers": {
      "get": {
        "summary": "List Search Providers",
        "operationId": "list_search_providers",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebSearchProviderView"
                  },
                  "title": "Response List Search Providers Admin Web Search Search Providers Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Upsert Search Provider Endpoint",
        "operationId": "upsert_search_provider_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebSearchProviderUpsertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebSearchProviderView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/web-search/search-providers/{provider_id}": {
      "delete": {
        "summary": "Delete Search Provider",
        "operationId": "delete_search_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/web-search/search-providers/{provider_id}/activate": {
      "post": {
        "summary": "Activate Search Provider",
        "operationId": "activate_search_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebSearchProviderView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/web-search/search-providers/{provider_id}/deactivate": {
      "post": {
        "summary": "Deactivate Search Provider",
        "operationId": "deactivate_search_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Deactivate Search Provider Admin Web Search Search Providers  Provider Id  Deactivate Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/web-search/search-providers/test": {
      "post": {
        "summary": "Test Search Provider",
        "operationId": "test_search_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebSearchProviderTestRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Test Search Provider Admin Web Search Search Providers Test Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/web-search/content-providers": {
      "get": {
        "summary": "List Content Providers",
        "operationId": "list_content_providers",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebContentProviderView"
                  },
                  "title": "Response List Content Providers Admin Web Search Content Providers Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Upsert Content Provider Endpoint",
        "operationId": "upsert_content_provider_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebContentProviderUpsertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebContentProviderView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/web-search/content-providers/{provider_id}": {
      "delete": {
        "summary": "Delete Content Provider",
        "operationId": "delete_content_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/web-search/content-providers/{provider_id}/activate": {
      "post": {
        "summary": "Activate Content Provider",
        "operationId": "activate_content_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebContentProviderView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/web-search/content-providers/reset-default": {
      "post": {
        "summary": "Reset Content Provider Default",
        "operationId": "reset_content_provider_default",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Reset Content Provider Default Admin Web Search Content Providers Reset Default Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/web-search/content-providers/{provider_id}/deactivate": {
      "post": {
        "summary": "Deactivate Content Provider",
        "operationId": "deactivate_content_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Deactivate Content Provider Admin Web Search Content Providers  Provider Id  Deactivate Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/web-search/content-providers/test": {
      "post": {
        "summary": "Test Content Provider",
        "operationId": "test_content_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebContentProviderTestRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Test Content Provider Admin Web Search Content Providers Test Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tracing/providers": {
      "get": {
        "summary": "List Tracing Providers",
        "operationId": "list_tracing_providers",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TracingProviderView"
                  },
                  "title": "Response List Tracing Providers Admin Tracing Providers Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Upsert Tracing Provider Endpoint",
        "operationId": "upsert_tracing_provider_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TracingProviderUpsertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TracingProviderView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tracing/providers/{provider_type}": {
      "delete": {
        "summary": "Disconnect Tracing Provider",
        "operationId": "disconnect_tracing_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_type",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TracingProviderType"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TracingProviderView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tracing/providers/test": {
      "post": {
        "summary": "Test Tracing Provider",
        "operationId": "test_tracing_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TracingProviderTestRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Test Tracing Provider Admin Tracing Providers Test Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tracing/providers/{provider_type}/adopt-env": {
      "post": {
        "summary": "Adopt Env Tracing Provider",
        "description": "Copy an env-var-configured provider into a DB row so it can be managed in the UI.",
        "operationId": "adopt_env_tracing_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_type",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TracingProviderType"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TracingProviderView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/voice/providers": {
      "get": {
        "summary": "List Voice Providers",
        "description": "List all configured voice providers.",
        "operationId": "list_voice_providers",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VoiceProviderView"
                  },
                  "title": "Response List Voice Providers Admin Voice Providers Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Upsert Voice Provider Endpoint",
        "description": "Create or update a voice provider.",
        "operationId": "upsert_voice_provider_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceProviderUpsertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceProviderView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/voice/providers/{provider_id}": {
      "delete": {
        "summary": "Delete Voice Provider Endpoint",
        "description": "Delete a voice provider.",
        "operationId": "delete_voice_provider_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/voice/providers/{provider_id}/activate-stt": {
      "post": {
        "summary": "Activate Stt Provider Endpoint",
        "description": "Set a voice provider as the default STT provider.",
        "operationId": "activate_stt_provider_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceProviderView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/voice/providers/{provider_id}/deactivate-stt": {
      "post": {
        "summary": "Deactivate Stt Provider Endpoint",
        "description": "Remove the default STT status from a voice provider.",
        "operationId": "deactivate_stt_provider_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceProviderUpdateSuccess"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/voice/providers/{provider_id}/activate-tts": {
      "post": {
        "summary": "Activate Tts Provider Endpoint",
        "description": "Set a voice provider as the default TTS provider.",
        "operationId": "activate_tts_provider_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Provider Id"
            }
          },
          {
            "name": "tts_model",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tts Model"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceProviderView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/voice/providers/{provider_id}/deactivate-tts": {
      "post": {
        "summary": "Deactivate Tts Provider Endpoint",
        "description": "Remove the default TTS status from a voice provider.",
        "operationId": "deactivate_tts_provider_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceProviderUpdateSuccess"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/voice/providers/test": {
      "post": {
        "summary": "Test Voice Provider",
        "description": "Test a voice provider connection by making a real API call.",
        "operationId": "test_voice_provider",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceProviderTestRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceProviderUpdateSuccess"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/voice/providers/{provider_id}/voices": {
      "get": {
        "summary": "Get Provider Voices",
        "description": "Get available voices for a provider.",
        "operationId": "get_provider_voices",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Provider Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VoiceOption"
                  },
                  "title": "Response Get Provider Voices Admin Voice Providers  Provider Id  Voices Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/voice/voices": {
      "get": {
        "summary": "Get Voices By Type",
        "description": "Get available voices for a provider type.\n\nFor providers like ElevenLabs and OpenAI, this fetches voices\nwithout requiring an existing provider configuration.",
        "operationId": "get_voices_by_type",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "provider_type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Provider Type"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VoiceOption"
                  },
                  "title": "Response Get Voices By Type Admin Voice Voices Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/voice/status": {
      "get": {
        "summary": "Get Voice Status",
        "description": "Check whether STT and TTS providers are configured and ready.",
        "operationId": "get_voice_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/voice/transcribe": {
      "post": {
        "summary": "Transcribe Audio",
        "description": "Transcribe audio to text using the default STT provider.",
        "operationId": "transcribe_audio",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_transcribe_audio_voice_transcribe_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Transcribe Audio Voice Transcribe Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/voice/synthesize": {
      "post": {
        "summary": "Synthesize Speech",
        "description": "Synthesize text to speech using the default TTS provider.",
        "operationId": "synthesize_speech",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SynthesizeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/voice/settings": {
      "patch": {
        "summary": "Update Voice Settings",
        "description": "Update user's voice settings.",
        "operationId": "update_voice_settings",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceSettingsUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Update Voice Settings Voice Settings Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/voice/ws-token": {
      "post": {
        "summary": "Get Ws Token",
        "description": "Generate a short-lived token for WebSocket authentication.\n\nThis token should be passed as a query parameter when connecting\nto voice WebSocket endpoints (e.g., /voice/transcribe/stream?token=xxx).\n\nThe token expires after 60 seconds and is single-use.\nRate limited to 10 tokens per minute per user.",
        "operationId": "get_ws_token",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WSTokenResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/opensearch-migration/status": {
      "get": {
        "summary": "Get Opensearch Migration Status",
        "operationId": "get_opensearch_migration_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenSearchMigrationStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/opensearch-migration/retrieval": {
      "get": {
        "summary": "Get Opensearch Retrieval Status",
        "operationId": "get_opensearch_retrieval_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenSearchRetrievalStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Set Opensearch Retrieval Status",
        "operationId": "set_opensearch_retrieval_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenSearchRetrievalStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenSearchRetrievalStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/cost-overrides": {
      "get": {
        "summary": "List Cost Overrides",
        "operationId": "list_cost_overrides",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CostOverride"
                  },
                  "title": "Response List Cost Overrides Admin Cost Overrides Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Upsert Cost Override",
        "operationId": "upsert_cost_override",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CostOverrideUpsertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CostOverride"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/cost-overrides/{model}": {
      "delete": {
        "summary": "Delete Cost Override",
        "operationId": "delete_cost_override",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "model",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Model"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "",
              "title": "Provider"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/usage/allowance": {
      "get": {
        "summary": "Get My Allowance Usage",
        "operationId": "get_my_allowance_usage",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllowanceUsageResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/usage": {
      "get": {
        "summary": "Get My Usage",
        "description": "Caller's token/cost usage for the Usage tab.",
        "operationId": "get_my_usage",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 3650,
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "title": "Days"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserUsageResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/usage/export": {
      "get": {
        "summary": "Export Usage",
        "description": "Company-wide daily usage export by email.",
        "operationId": "export_usage",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Model"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageExportResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/usage/reset": {
      "post": {
        "summary": "Reset Usage",
        "description": "Clear a user's usage across every applicable active limit window.",
        "operationId": "reset_usage",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetUsageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResetUsageResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/api-key": {
      "get": {
        "summary": "List Api Keys",
        "operationId": "list_api_keys",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyDescriptor"
                  },
                  "title": "Response List Api Keys Admin Api Key Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Api Key",
        "operationId": "create_api_key",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/APIKeyArgs"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyDescriptor"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/api-key/{api_key_id}": {
      "get": {
        "summary": "Get Api Key",
        "operationId": "get_api_key",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "api_key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Api Key Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyDescriptor"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Existing Api Key",
        "operationId": "update_existing_api_key",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "api_key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Api Key Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/APIKeyArgs"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyDescriptor"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Api Key",
        "operationId": "delete_api_key",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "api_key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Api Key Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/api-key/{api_key_id}/regenerate": {
      "post": {
        "summary": "Regenerate Existing Api Key",
        "operationId": "regenerate_existing_api_key",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "api_key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Api Key Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyDescriptor"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/connector/oauth/authorize/{source}": {
      "get": {
        "summary": "Oauth Authorize",
        "description": "Initiates the OAuth flow by redirecting to the provider's auth page",
        "operationId": "oauth_authorize",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "source",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/DocumentSource"
            }
          },
          {
            "name": "desired_return_url",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Desired Return Url"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthorizeResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/connector/oauth/callback/{source}": {
      "get": {
        "summary": "Oauth Callback",
        "description": "Handles the OAuth callback and exchanges the code for tokens",
        "operationId": "oauth_callback",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "source",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/DocumentSource"
            }
          },
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Code"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "State"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/connector/oauth/details/{source}": {
      "get": {
        "summary": "Oauth Details",
        "operationId": "oauth_details",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "source",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/DocumentSource"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthDetails"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/federated": {
      "post": {
        "summary": "Create Federated Connector",
        "description": "Create a new federated connector",
        "operationId": "create_federated_connector",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FederatedConnectorRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederatedConnectorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get Federated Connectors",
        "description": "Get all federated connectors for display in the status table",
        "operationId": "get_federated_connectors",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FederatedConnectorStatus"
                  },
                  "title": "Response Get Federated Connectors Federated Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/federated/{id}/entities": {
      "get": {
        "summary": "Get Entities",
        "description": "Fetch allowed entities for the source type",
        "operationId": "get_entities",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntitySpecResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/federated/{id}/credentials/schema": {
      "get": {
        "summary": "Get Credentials Schema",
        "description": "Fetch credential schema for the source type",
        "operationId": "get_credentials_schema",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialSchemaResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/federated/sources/{source}/configuration/schema": {
      "get": {
        "summary": "Get Configuration Schema By Source",
        "description": "Fetch configuration schema for a specific source type (for setup/edit forms)",
        "operationId": "get_configuration_schema_by_source",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "source",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/FederatedConnectorSource"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfigurationSchemaResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/federated/sources/{source}/credentials/schema": {
      "get": {
        "summary": "Get Credentials Schema By Source",
        "description": "Fetch credential schema for a specific source type (for setup forms)",
        "operationId": "get_credentials_schema_by_source",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "source",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/FederatedConnectorSource"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialSchemaResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/federated/sources/{source}/credentials/validate": {
      "post": {
        "summary": "Validate Credentials",
        "description": "Validate credentials for a specific source type",
        "operationId": "validate_credentials",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "source",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/FederatedConnectorSource"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FederatedConnectorCredentials"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean",
                  "title": "Response Validate Credentials Federated Sources  Source  Credentials Validate Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/federated/{id}/entities/validate": {
      "head": {
        "summary": "Validate Entities",
        "description": "Validate specified entities for source type",
        "operationId": "validate_entities",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/federated/{id}/authorize": {
      "get": {
        "summary": "Get Authorize Url",
        "description": "Get URL to send the user for OAuth",
        "operationId": "get_authorize_url",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthorizeUrlResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/federated/callback": {
      "post": {
        "summary": "Handle Oauth Callback Generic",
        "description": "Handle callback for any federated connector using state parameter",
        "operationId": "handle_oauth_callback_generic",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthCallbackResult"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/federated/oauth-status": {
      "get": {
        "summary": "Get User Oauth Status",
        "description": "Get OAuth status for all federated connectors for the current user",
        "operationId": "get_user_oauth_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserOAuthStatus"
                  },
                  "title": "Response Get User Oauth Status Federated Oauth Status Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/federated/{id}": {
      "get": {
        "summary": "Get Federated Connector Detail",
        "description": "Get detailed information about a specific federated connector",
        "operationId": "get_federated_connector_detail",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederatedConnectorDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update Federated Connector Endpoint",
        "description": "Update a federated connector's configuration",
        "operationId": "update_federated_connector_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FederatedConnectorUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederatedConnectorDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Federated Connector Endpoint",
        "description": "Delete a federated connector",
        "operationId": "delete_federated_connector_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean",
                  "title": "Response Delete Federated Connector Endpoint Federated  Id  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/federated/{id}/oauth": {
      "delete": {
        "summary": "Disconnect Oauth Token",
        "description": "Disconnect OAuth token for the current user from a federated connector",
        "operationId": "disconnect_oauth_token",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean",
                  "title": "Response Disconnect Oauth Token Federated  Id  Oauth Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/mcp/oauth/client-metadata": {
      "get": {
        "summary": "Get Mcp Oauth Client Metadata",
        "operationId": "get_mcp_oauth_client_metadata",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPOAuthClientMetadataDocument"
                }
              }
            }
          }
        }
      }
    },
    "/mcp/oauth/connect": {
      "post": {
        "summary": "Connect User Oauth",
        "operationId": "connect_user_oauth",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPUserOAuthConnectRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPUserOAuthConnectResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/mcp/oauth/callback": {
      "post": {
        "summary": "Process Oauth Callback",
        "description": "Complete an attempt-scoped OAuth flow and persist its tokens.",
        "operationId": "process_oauth_callback",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPOAuthCallbackResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/mcp/user-credentials": {
      "post": {
        "summary": "Save User Credentials",
        "operationId": "save_user_credentials",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPUserCredentialsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPApiKeyResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/mcp/user-credentials/{server_id}": {
      "delete": {
        "summary": "Delete User Credentials",
        "description": "Disconnect the caller from an MCP server: remove their own connection\nconfigs (OAuth tokens / API keys). Admin template rows are untouched.",
        "operationId": "delete_user_credentials",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Server Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPApiKeyResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/mcp/servers/persona/{assistant_id}": {
      "get": {
        "summary": "Get Mcp Servers For Assistant",
        "description": "Get MCP servers for an assistant",
        "operationId": "get_mcp_servers_for_assistant",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "assistant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Assistant Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPServersResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/mcp/servers": {
      "get": {
        "summary": "Get Mcp Servers For User",
        "description": "Attach catalog: servers this user may put on a persona (public / direct / group).\n\nChat uses ``/servers/persona/{id}`` for servers already on a persona.",
        "operationId": "get_mcp_servers_for_user",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPServersResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/mcp/servers/craft": {
      "get": {
        "summary": "Get Craft Mcp Servers For User",
        "description": "List MCP servers an admin has made available to the Craft agent, with\nthe current user's connection/auth state. Craft reads the same credential\nrows as chat, so a server connected in either surface shows as\nauthenticated here.\n\n`craft_connected` is the only field here that answers \"will this server\nactually reach the user's sessions\" \u2014 see `resolve_craft_mcp_servers`, which\nfilters emission on the same predicate.",
        "operationId": "get_craft_mcp_servers_for_user",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPServersResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/mcp/server/{server_id}/tools": {
      "get": {
        "summary": "User List Mcp Tools By Id",
        "operationId": "user_list_mcp_tools_by_id",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Server Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPToolListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/mcp/oauth/connect": {
      "post": {
        "summary": "Connect Admin Oauth",
        "description": "Connect OAuth flow for admin MCP server authentication",
        "operationId": "connect_admin_oauth",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPUserOAuthConnectRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPUserOAuthConnectResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/mcp/server/{server_id}/tools": {
      "get": {
        "summary": "Admin List Mcp Tools By Id",
        "operationId": "admin_list_mcp_tools_by_id",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Server Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPToolListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/mcp/server/{server_id}/tools/snapshots": {
      "get": {
        "summary": "Get Mcp Server Tools Snapshots",
        "description": "Get tools for an MCP server as ToolSnapshot objects.\n\nQuery Parameters:\n- source: \"db\" (default) - fetch from database only, \"mcp\" - discover from MCP server and sync to DB\n\nReturns: List of ToolSnapshot objects",
        "operationId": "get_mcp_server_tools_snapshots",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Server Id"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ToolSnapshotSource",
              "default": "db"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ToolSnapshot"
                  },
                  "title": "Response Get Mcp Server Tools Snapshots Admin Mcp Server  Server Id  Tools Snapshots Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/mcp/servers/{server_id}": {
      "get": {
        "summary": "Get Mcp Server Detail",
        "description": "Return details for one MCP server if user has access",
        "operationId": "get_mcp_server_detail",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Server Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPServer"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/mcp/tools": {
      "get": {
        "summary": "Get All Mcp Tools",
        "description": "Get all tools associated with MCP servers, including both enabled and disabled tools",
        "operationId": "get_all_mcp_tools",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {},
                  "title": "Response Get All Mcp Tools Admin Mcp Tools Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/mcp/server/{server_id}/status": {
      "patch": {
        "summary": "Update Mcp Server Status",
        "description": "Update the status of an MCP server",
        "operationId": "update_mcp_server_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Server Id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/MCPServerStatus"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Update Mcp Server Status Admin Mcp Server  Server Id  Status Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/mcp/servers": {
      "get": {
        "summary": "Get Mcp Servers For Admin",
        "description": "Get all MCP servers for admin display",
        "operationId": "get_mcp_servers_for_admin",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPServersResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/mcp/server/{server_id}/db-tools": {
      "get": {
        "summary": "Get Mcp Server Db Tools",
        "description": "Get existing database tools created for an MCP server",
        "operationId": "get_mcp_server_db_tools",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Server Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerToolsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/mcp/servers/create": {
      "post": {
        "summary": "Upsert Mcp Server",
        "description": "Create or update an MCP server (no tools yet)",
        "operationId": "upsert_mcp_server",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPToolCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPServerCreateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/mcp/servers/update": {
      "post": {
        "summary": "Update Mcp Server With Tools",
        "description": "Update an MCP server and associated tools",
        "operationId": "update_mcp_server_with_tools",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPToolUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPServerUpdateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/mcp/server": {
      "post": {
        "summary": "Create Mcp Server Simple",
        "description": "Create MCP server with minimal information - auth to be configured later",
        "operationId": "create_mcp_server_simple",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPServerSimpleCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPServer"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/mcp/server/{server_id}": {
      "patch": {
        "summary": "Update Mcp Server Simple",
        "description": "Update MCP server basic information (name, description, URL)",
        "operationId": "update_mcp_server_simple",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Server Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPServerSimpleUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPServer"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Mcp Server Admin",
        "description": "Delete an MCP server and cascading related objects (tools, configs).",
        "operationId": "delete_mcp_server_admin",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Server Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Delete Mcp Server Admin Admin Mcp Server  Server Id  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/skills": {
      "get": {
        "summary": "List Skills For Current User",
        "operationId": "list_skills_for_current_user",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillsList"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/skills/{skill_id}/enabled": {
      "put": {
        "summary": "Set Skill Enabled For Current User",
        "operationId": "set_skill_enabled_for_current_user",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "skill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Skill Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillEnableRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/skills/{skill_id}": {
      "get": {
        "summary": "Fetch Skill For Current User",
        "operationId": "fetch_skill_for_current_user",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "skill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Skill Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/skills/{skill_id}/preview": {
      "get": {
        "summary": "Preview Skill For Current User",
        "operationId": "preview_skill_for_current_user",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "skill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Skill Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillPreviewResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/skills/custom": {
      "post": {
        "summary": "Create Custom Skill",
        "operationId": "create_custom_skill",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_create_custom_skill_skills_custom_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/skills/github/preview": {
      "post": {
        "summary": "Preview Github Skills",
        "operationId": "preview_github_skills",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GitHubSkillsPreviewRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitHubSkillsPreviewResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/skills/github/import": {
      "post": {
        "summary": "Import Github Skills",
        "operationId": "import_github_skills",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GitHubSkillsImportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitHubSkillsImportResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/skills/custom/editor": {
      "post": {
        "summary": "Create Custom Skill From Editor",
        "operationId": "create_custom_skill_from_editor",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_create_custom_skill_from_editor_skills_custom_editor_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillEditableDetailResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/skills/custom/{skill_id}/edit": {
      "get": {
        "summary": "Fetch Custom Skill For Edit",
        "operationId": "fetch_custom_skill_for_edit",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "skill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Skill Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillEditableDetailResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/skills/custom/bundle/inspect": {
      "post": {
        "summary": "Inspect Custom Skill Bundle Upload",
        "operationId": "inspect_custom_skill_bundle_upload",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_inspect_custom_skill_bundle_upload_skills_custom_bundle_inspect_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillBundleInspectResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/skills/custom/{skill_id}/bundle": {
      "put": {
        "summary": "Replace Current User Skill Bundle",
        "operationId": "replace_current_user_skill_bundle",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "skill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Skill Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_replace_current_user_skill_bundle_skills_custom__skill_id__bundle_put"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/skills/custom/{skill_id}/files": {
      "post": {
        "summary": "Upload Current User Skill Files",
        "operationId": "upload_current_user_skill_files",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "skill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Skill Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_current_user_skill_files_skills_custom__skill_id__files_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillEditableDetailResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Remove Current User Skill File",
        "operationId": "remove_current_user_skill_file",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "skill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Skill Id"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Path"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillEditableDetailResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/skills/custom/{skill_id}": {
      "patch": {
        "summary": "Patch Current User Skill",
        "operationId": "patch_current_user_skill",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "skill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Skill Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillPatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Current User Skill",
        "operationId": "delete_current_user_skill",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "skill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Skill Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/skills/custom/{skill_id}/share": {
      "patch": {
        "summary": "Share Current User Skill",
        "operationId": "share_current_user_skill",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "skill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Skill Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillShareRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/skills/custom/{skill_id}/transfer-ownership": {
      "post": {
        "summary": "Transfer Current User Skill Ownership",
        "operationId": "transfer_current_user_skill_ownership",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "skill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Skill Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferSkillOwnershipRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/usage-summary": {
      "get": {
        "summary": "Usage Summary",
        "operationId": "usage_summary",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 90,
              "minimum": 1,
              "default": 30,
              "title": "Days"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchoolUsageSummaryResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/allowance": {
      "get": {
        "summary": "Allowance Status",
        "operationId": "allowance_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchoolAllowanceStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update Allowance Policy",
        "operationId": "update_allowance_policy",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchoolAllowancePolicyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchoolAllowanceStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/invitations": {
      "post": {
        "summary": "Create Invitation",
        "operationId": "create_invitation",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSchoolInvitationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedSchoolInvitationResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List Invitations",
        "operationId": "list_invitations",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SchoolInvitationResponse"
                  },
                  "title": "Response List Invitations School Invitations Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/invitations/{invitation_id}": {
      "delete": {
        "summary": "Revoke Invitation",
        "operationId": "revoke_invitation",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "invitation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Invitation Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/invitations/inspect": {
      "post": {
        "summary": "Inspect Invitation",
        "operationId": "inspect_invitation",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchoolInvitationResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/invitations/accept": {
      "post": {
        "summary": "Accept Invitation",
        "operationId": "accept_invitation",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchoolInvitationResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/invitations/decline": {
      "post": {
        "summary": "Decline Invitation",
        "operationId": "decline_invitation",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/me": {
      "get": {
        "summary": "Me",
        "operationId": "me",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchoolMeResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/classes": {
      "get": {
        "summary": "Classes",
        "operationId": "classes",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SchoolClassResponse"
                  },
                  "title": "Response Classes School Classes Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Class",
        "operationId": "create_class",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateClassRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchoolClassResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/classes/{class_id}/learning-policy": {
      "get": {
        "summary": "Class Learning Policy",
        "operationId": "class_learning_policy",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "class_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Class Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LearningPolicyResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Put Class Learning Policy",
        "operationId": "put_class_learning_policy",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "class_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Class Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LearningPolicyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LearningPolicyResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/chats/{chat_session_id}/learning-policy": {
      "get": {
        "summary": "Bound Chat Learning Policy",
        "operationId": "bound_chat_learning_policy",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "chat_session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Chat Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoundChatLearningPolicyResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/models": {
      "get": {
        "summary": "School Models",
        "operationId": "school_models",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchoolModelCatalogResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/classes/{class_id}/conversations": {
      "get": {
        "summary": "Class Conversations",
        "operationId": "class_conversations",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "class_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Class Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 30,
              "title": "Limit"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 512
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchoolConversationListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/classes/{class_id}/conversations/{chat_session_id}": {
      "get": {
        "summary": "Class Conversation",
        "operationId": "class_conversation",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "class_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Class Id"
            }
          },
          {
            "name": "chat_session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Chat Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchoolConversationDetailResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/members/{user_id}": {
      "put": {
        "summary": "Put Member",
        "operationId": "put_member",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "User Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MembershipRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/classes/{class_id}/students": {
      "post": {
        "summary": "Add Student",
        "operationId": "add_student",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "class_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Class Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserIdRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/classes/{class_id}/teachers": {
      "post": {
        "summary": "Add Teacher",
        "operationId": "add_teacher",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "class_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Class Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserIdRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/skills/versions": {
      "get": {
        "summary": "Skill Versions",
        "operationId": "skill_versions",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SkillVersionResponse"
                  },
                  "title": "Response Skill Versions School Skills Versions Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/skills": {
      "post": {
        "summary": "Create Skill",
        "operationId": "create_skill",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSkillRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillVersionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/skills/{skill_id}/versions": {
      "post": {
        "summary": "Create Version",
        "operationId": "create_version",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "skill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Skill Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVersionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillVersionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/skills/versions/{version_id}": {
      "get": {
        "summary": "Get Version",
        "operationId": "get_version",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Version Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillVersionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/skills/review-candidates": {
      "get": {
        "summary": "Review Candidates",
        "operationId": "review_candidates",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SkillVersionResponse"
                  },
                  "title": "Response Review Candidates School Skills Review Candidates Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/skills/versions/{version_id}/shares": {
      "post": {
        "summary": "Share",
        "operationId": "share",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Version Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShareRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/skills/versions/{version_id}/reviews": {
      "post": {
        "summary": "Review",
        "operationId": "review",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Version Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReviewResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/skills/shares/{share_id}": {
      "delete": {
        "summary": "Delete Share",
        "operationId": "delete_share",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "share_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Share Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/skills/reviews/{review_id}": {
      "delete": {
        "summary": "Delete Review",
        "operationId": "delete_review",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "review_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Review Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/skills/versions/{version_id}/access": {
      "get": {
        "summary": "Skill Access",
        "operationId": "skill_access",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Version Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillAccessResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/installations": {
      "get": {
        "summary": "Installations",
        "operationId": "installations",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SchoolSkillInstallationResponse"
                  },
                  "title": "Response Installations School Installations Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/skills/versions/{version_id}/install": {
      "post": {
        "summary": "Install Version",
        "operationId": "install_version",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Version Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchoolSkillInstallationResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/installations/{installation_id}": {
      "delete": {
        "summary": "Delete Installation",
        "operationId": "delete_installation",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "installation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Installation Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/runtime/installations/{installation_id}/content": {
      "get": {
        "summary": "Runtime Installation Content",
        "operationId": "runtime_installation_content",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "installation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Installation Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchoolSkillRuntimeContentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/members": {
      "get": {
        "summary": "Members",
        "operationId": "members",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SchoolMemberResponse"
                  },
                  "title": "Response Members School Members Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/school/members/resolve": {
      "post": {
        "summary": "Resolve Member",
        "operationId": "resolve_member",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveMemberRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountIdentityResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/nexus/craft/gateway/v1/models": {
      "get": {
        "summary": "Models",
        "operationId": "models",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/nexus/craft/gateway/v1/chat/completions": {
      "post": {
        "summary": "Completions",
        "description": "Keep synchronous DB/provider preparation off the ASGI loop while polling disconnect.",
        "operationId": "completions",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatCompletionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/pats/scopes": {
      "get": {
        "summary": "List Selectable Scopes",
        "description": "The scopes a user may assign when minting a token, with display metadata.",
        "operationId": "list_selectable_scopes",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PatScopeOption"
                  },
                  "title": "Response List Selectable Scopes User Pats Scopes Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/pats": {
      "get": {
        "summary": "List Tokens",
        "description": "List all active user-created tokens for current user.",
        "operationId": "list_tokens",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TokenResponse"
                  },
                  "title": "Response List Tokens User Pats Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Token",
        "description": "Create new personal access token for current user.",
        "operationId": "create_token",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedTokenResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/user/pats/{token_id}": {
      "delete": {
        "summary": "Delete Token",
        "description": "Delete (revoke) personal access token. Only owner can revoke their own tokens.",
        "operationId": "delete_token",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "token_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Token Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Delete Token User Pats  Token Id  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/captcha/oauth-verify": {
      "post": {
        "summary": "Verify Oauth Captcha",
        "description": "Verify a reCAPTCHA token and set the OAuth-redirect cookie.\n\nIf captcha enforcement is off the endpoint is a no-op so the frontend\ndoesn't block on dormant deployments.",
        "operationId": "verify_oauth_captcha",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthCaptchaVerifyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthCaptchaVerifyResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/login": {
      "post": {
        "summary": "Auth:Redis.Login",
        "operationId": "auth:redis.login",
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Body_auth_redis_login_auth_login_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "LOGIN_BAD_CREDENTIALS": {
                    "summary": "Bad credentials or the user is inactive.",
                    "value": {
                      "detail": "LOGIN_BAD_CREDENTIALS"
                    }
                  },
                  "LOGIN_USER_NOT_VERIFIED": {
                    "summary": "The user is not verified.",
                    "value": {
                      "detail": "LOGIN_USER_NOT_VERIFIED"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Bad Request"
          },
          "204": {
            "description": "No Content"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/logout": {
      "post": {
        "summary": "Auth:Redis.Logout",
        "operationId": "auth:redis.logout",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Missing token or inactive user."
          },
          "204": {
            "description": "No Content"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/register": {
      "post": {
        "summary": "Register:Register",
        "operationId": "register:register",
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRead"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "REGISTER_USER_ALREADY_EXISTS": {
                    "summary": "A user with this email already exists.",
                    "value": {
                      "detail": "REGISTER_USER_ALREADY_EXISTS"
                    }
                  },
                  "REGISTER_INVALID_PASSWORD": {
                    "summary": "Password validation failed.",
                    "value": {
                      "detail": {
                        "code": "REGISTER_INVALID_PASSWORD",
                        "reason": "Password should beat least 3 characters"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Bad Request"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/forgot-password": {
      "post": {
        "summary": "Reset:Forgot Password",
        "operationId": "reset:forgot_password",
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_reset_forgot_password_auth_forgot_password_post"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/reset-password": {
      "post": {
        "summary": "Reset:Reset Password",
        "operationId": "reset:reset_password",
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_reset_reset_password_auth_reset_password_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "RESET_PASSWORD_BAD_TOKEN": {
                    "summary": "Bad or expired token.",
                    "value": {
                      "detail": "RESET_PASSWORD_BAD_TOKEN"
                    }
                  },
                  "RESET_PASSWORD_INVALID_PASSWORD": {
                    "summary": "Password validation failed.",
                    "value": {
                      "detail": {
                        "code": "RESET_PASSWORD_INVALID_PASSWORD",
                        "reason": "Password should be at least 3 characters"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Bad Request"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/request-verify-token": {
      "post": {
        "summary": "Verify:Request-Token",
        "operationId": "verify:request-token",
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_verify_request_token_auth_request_verify_token_post"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/verify": {
      "post": {
        "summary": "Verify:Verify",
        "operationId": "verify:verify",
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_verify_verify_auth_verify_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRead"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "VERIFY_USER_BAD_TOKEN": {
                    "summary": "Bad token, not existing user or not the e-mail currently set for the user.",
                    "value": {
                      "detail": "VERIFY_USER_BAD_TOKEN"
                    }
                  },
                  "VERIFY_USER_ALREADY_VERIFIED": {
                    "summary": "The user is already verified.",
                    "value": {
                      "detail": "VERIFY_USER_ALREADY_VERIFIED"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Bad Request"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/users/me": {
      "get": {
        "summary": "Users:Current User",
        "operationId": "users:current_user",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRead"
                }
              }
            }
          },
          "401": {
            "description": "Missing token or inactive user."
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Users:Patch Current User",
        "operationId": "users:patch_current_user",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRead"
                }
              }
            }
          },
          "401": {
            "description": "Missing token or inactive user."
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "UPDATE_USER_EMAIL_ALREADY_EXISTS": {
                    "summary": "A user with this email already exists.",
                    "value": {
                      "detail": "UPDATE_USER_EMAIL_ALREADY_EXISTS"
                    }
                  },
                  "UPDATE_USER_INVALID_PASSWORD": {
                    "summary": "Password validation failed.",
                    "value": {
                      "detail": {
                        "code": "UPDATE_USER_INVALID_PASSWORD",
                        "reason": "Password should beat least 3 characters"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Bad Request"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/users/{id}": {
      "get": {
        "summary": "Users:User",
        "operationId": "users:user",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRead"
                }
              }
            }
          },
          "401": {
            "description": "Missing token or inactive user."
          },
          "403": {
            "description": "Not a superuser."
          },
          "404": {
            "description": "The user does not exist."
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Users:Patch User",
        "operationId": "users:patch_user",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRead"
                }
              }
            }
          },
          "401": {
            "description": "Missing token or inactive user."
          },
          "403": {
            "description": "Not a superuser."
          },
          "404": {
            "description": "The user does not exist."
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "UPDATE_USER_EMAIL_ALREADY_EXISTS": {
                    "summary": "A user with this email already exists.",
                    "value": {
                      "detail": "UPDATE_USER_EMAIL_ALREADY_EXISTS"
                    }
                  },
                  "UPDATE_USER_INVALID_PASSWORD": {
                    "summary": "Password validation failed.",
                    "value": {
                      "detail": {
                        "code": "UPDATE_USER_INVALID_PASSWORD",
                        "reason": "Password should beat least 3 characters"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Bad Request"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Users:Delete User",
        "operationId": "users:delete_user",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing token or inactive user."
          },
          "403": {
            "description": "Not a superuser."
          },
          "404": {
            "description": "The user does not exist."
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/mobile/login": {
      "post": {
        "summary": "Auth:Mobile-Bearer.Login",
        "operationId": "auth:mobile-bearer.login",
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Body_auth_mobile_bearer_login_auth_mobile_login_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BearerResponse"
                },
                "example": {
                  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiOTIyMWZmYzktNjQwZi00MzcyLTg2ZDMtY2U2NDJjYmE1NjAzIiwiYXVkIjoiZmFzdGFwaS11c2VyczphdXRoIiwiZXhwIjoxNTcxNTA0MTkzfQ.M10bjOe45I5Ncu_uXvOmVV8QxnL-nZfcH96U90JaocI",
                  "token_type": "bearer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "LOGIN_BAD_CREDENTIALS": {
                    "summary": "Bad credentials or the user is inactive.",
                    "value": {
                      "detail": "LOGIN_BAD_CREDENTIALS"
                    }
                  },
                  "LOGIN_USER_NOT_VERIFIED": {
                    "summary": "The user is not verified.",
                    "value": {
                      "detail": "LOGIN_USER_NOT_VERIFIED"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Bad Request"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/mobile/logout": {
      "post": {
        "summary": "Auth:Mobile-Bearer.Logout",
        "operationId": "auth:mobile-bearer.logout",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Missing token or inactive user."
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/mobile/refresh": {
      "post": {
        "summary": "Auth:Mobile-Bearer.Refresh",
        "operationId": "auth:mobile-bearer.refresh",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BearerResponse"
                },
                "example": {
                  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiOTIyMWZmYzktNjQwZi00MzcyLTg2ZDMtY2U2NDJjYmE1NjAzIiwiYXVkIjoiZmFzdGFwaS11c2VyczphdXRoIiwiZXhwIjoxNTcxNTA0MTkzfQ.M10bjOe45I5Ncu_uXvOmVV8QxnL-nZfcH96U90JaocI",
                  "token_type": "bearer"
                }
              }
            }
          },
          "401": {
            "description": "Missing token or inactive user."
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/mobile/sso/exchange": {
      "post": {
        "summary": "Sso Exchange",
        "description": "Swap a one-time SSO code (+ PKCE verifier) for the session token.\n\nReturns the same `{access_token, token_type}` shape as the bearer login. Any\nfailure \u2014 unknown / expired / replayed code, or a verifier that doesn't match\nthe stored PKCE challenge \u2014 yields one generic 401 with no oracle (see\n`consume_sso_code`).",
        "operationId": "sso_exchange",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MobileSsoExchangeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MobileSsoTokenResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/saml/authorize": {
      "get": {
        "summary": "Saml Login",
        "operationId": "saml_login",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SAMLAuthorizeResponse"
                }
              }
            }
          }
        }
      }
    },
    "/auth/saml/callback": {
      "get": {
        "summary": "Saml Login Callback Get",
        "operationId": "saml_login_callback_get",
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Saml Login Callback Post",
        "operationId": "saml_login_callback_post",
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/saml/{provider_name}/authorize": {
      "get": {
        "summary": "Saml Login For Provider",
        "operationId": "saml_login_for_provider",
        "parameters": [
          {
            "name": "provider_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Provider Name"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SAMLAuthorizeResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/saml/logout": {
      "post": {
        "summary": "Saml Logout",
        "operationId": "saml_logout",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/oidc/{provider_name}/authorize": {
      "get": {
        "summary": "Oidc Login For Provider",
        "operationId": "oidc_login_for_provider",
        "parameters": [
          {
            "name": "provider_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Provider Name"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/oidc/callback": {
      "get": {
        "summary": "Oidc Login Callback",
        "description": "Fixed callback for rows whose IdP client allowlists a legacy redirect\nURI. The row is resolved from the signed state, the same per-request\nrouting the SAML callback does with issuers.",
        "operationId": "oidc_login_callback",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Code"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "State"
            }
          },
          {
            "name": "error",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Error"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/oidc/{provider_name}/callback": {
      "get": {
        "summary": "Oidc Login Callback For Provider",
        "operationId": "oidc_login_callback_for_provider",
        "parameters": [
          {
            "name": "provider_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Provider Name"
            }
          },
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Code"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "State"
            }
          },
          {
            "name": "error",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Error"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/sso/discover": {
      "post": {
        "summary": "Discover Sso Providers",
        "operationId": "discover_sso_providers",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSODiscoveryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSODiscoveryResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/refresh": {
      "post": {
        "summary": "Auth:Redis.Refresh",
        "operationId": "auth:redis.refresh",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Missing token or inactive user."
          },
          "204": {
            "description": "No Content"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/metrics": {
      "get": {
        "summary": "Metrics",
        "description": "Endpoint that serves Prometheus metrics.",
        "operationId": "metrics",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/manage/admin/user-group": {
      "get": {
        "summary": "List User Groups",
        "operationId": "list_user_groups",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "include_default",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Default"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserGroup"
                  },
                  "title": "Response List User Groups Manage Admin User Group Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create User Group",
        "operationId": "create_user_group",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserGroupCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserGroup"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/user-group/{user_group_id}": {
      "get": {
        "summary": "Get User Group",
        "description": "Read one group with its nested connector, document-set and agent snapshots.",
        "operationId": "get_user_group",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Group Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserGroup"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch User Group",
        "operationId": "patch_user_group",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Group Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserGroupUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserGroup"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete User Group",
        "operationId": "delete_user_group",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Group Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/user-groups/minimal": {
      "get": {
        "summary": "List Minimal User Groups",
        "operationId": "list_minimal_user_groups",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "include_default",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Default"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MinimalUserGroupSnapshot"
                  },
                  "title": "Response List Minimal User Groups Manage User Groups Minimal Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/permissions/registry": {
      "get": {
        "summary": "Get Permission Registry",
        "operationId": "get_permission_registry",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PermissionRegistryEntry"
                  },
                  "title": "Response Get Permission Registry Manage Admin Permissions Registry Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/user-group/{user_group_id}/permissions": {
      "get": {
        "summary": "Get User Group Permissions",
        "operationId": "get_user_group_permissions",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Group Id"
            }
          },
          {
            "name": "include_non_toggleable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Non Toggleable"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Permission"
                  },
                  "title": "Response Get User Group Permissions Manage Admin User Group  User Group Id  Permissions Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Set User Group Permissions",
        "operationId": "set_user_group_permissions",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Group Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkSetPermissionsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Permission"
                  },
                  "title": "Response Set User Group Permissions Manage Admin User Group  User Group Id  Permissions Put"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/user-group/rename": {
      "patch": {
        "summary": "Rename User Group Endpoint",
        "operationId": "rename_user_group_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserGroupRename"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserGroup"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/user-group/{user_group_id}/incognito": {
      "patch": {
        "summary": "Patch User Group Incognito",
        "description": "Only meaningful while the security setting is groups-only, but always\nstorable so admins can stage membership before flipping the mode.",
        "operationId": "patch_user_group_incognito",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Group Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserGroupIncognitoUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserGroup"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/user-group/{user_group_id}/add-users": {
      "post": {
        "summary": "Add Users",
        "operationId": "add_users",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Group Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddUsersToUserGroupRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserGroup"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/user-group/{user_group_id}/agents": {
      "patch": {
        "summary": "Update Group Agents",
        "operationId": "update_group_agents",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Group Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGroupAgentsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/user-group/{user_group_id}/document-sets": {
      "patch": {
        "summary": "Update Group Document Sets",
        "description": "Share document sets with a group from the group's side \u2014 the document-set route is\ngated on MANAGE_DOCUMENT_SETS, which a groups admin doesn't hold.",
        "operationId": "update_group_document_sets",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Group Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGroupDocumentSetsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/user-group/{user_group_id}/manager": {
      "put": {
        "summary": "Set Group Manager",
        "operationId": "set_group_manager",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Group Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetGroupManagerRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/analytics/admin/query": {
      "get": {
        "summary": "Get Query Analytics",
        "operationId": "get_query_analytics",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/QueryAnalyticsResponse"
                  },
                  "title": "Response Get Query Analytics Analytics Admin Query Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/analytics/admin/user": {
      "get": {
        "summary": "Get User Analytics",
        "operationId": "get_user_analytics",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserAnalyticsResponse"
                  },
                  "title": "Response Get User Analytics Analytics Admin User Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/analytics/admin/onyxbot": {
      "get": {
        "summary": "Get Onyxbot Analytics",
        "operationId": "get_onyxbot_analytics",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OnyxbotAnalyticsResponse"
                  },
                  "title": "Response Get Onyxbot Analytics Analytics Admin Onyxbot Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/analytics/admin/persona/messages": {
      "get": {
        "summary": "Get Persona Messages",
        "description": "Fetch daily message counts for a single persona within the given time range.",
        "operationId": "get_persona_messages",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "persona_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Persona Id"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PersonaMessageAnalyticsResponse"
                  },
                  "title": "Response Get Persona Messages Analytics Admin Persona Messages Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/analytics/admin/persona/unique-users": {
      "get": {
        "summary": "Get Persona Unique Users",
        "description": "Get unique users per day for a single persona.",
        "operationId": "get_persona_unique_users",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "persona_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Persona Id"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time",
              "title": "Start"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time",
              "title": "End"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PersonaUniqueUsersResponse"
                  },
                  "title": "Response Get Persona Unique Users Analytics Admin Persona Unique Users Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/analytics/assistant/{assistant_id}/stats": {
      "get": {
        "summary": "Get Assistant Stats",
        "description": "Returns daily message and unique user counts for a user's assistant,\nalong with the overall total messages and total distinct users.",
        "operationId": "get_assistant_stats",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "assistant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Assistant Id"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssistantStatsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/chat-sessions": {
      "get": {
        "summary": "Admin Get Chat Sessions",
        "operationId": "admin_get_chat_sessions",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "User Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatSessionsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/chat-session-history": {
      "get": {
        "summary": "Get Chat Session History",
        "operationId": "get_chat_session_history",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "page_num",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Page Num"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 10,
              "title": "Page Size"
            }
          },
          {
            "name": "feedback_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/QAFeedbackType"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Feedback Type"
            }
          },
          {
            "name": "start_time",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Time"
            }
          },
          {
            "name": "end_time",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Time"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedReturn_ChatSessionMinimal_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/chat-session-history/{chat_session_id}": {
      "get": {
        "summary": "Get Chat Session Admin",
        "operationId": "get_chat_session_admin",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "chat_session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Chat Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatSessionSnapshot"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/query-history/list": {
      "get": {
        "summary": "List All Query History Exports",
        "operationId": "list_all_query_history_exports",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/QueryHistoryExport"
                  },
                  "title": "Response List All Query History Exports Admin Query History List Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/query-history/start-export": {
      "post": {
        "summary": "Start Query History Export",
        "operationId": "start_query_history_export",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Start Query History Export Admin Query History Start Export Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/query-history/export-status": {
      "get": {
        "summary": "Get Query History Export Status",
        "operationId": "get_query_history_export_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "request_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Request Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Get Query History Export Status Admin Query History Export Status Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/query-history/download": {
      "get": {
        "summary": "Download Query History Csv",
        "operationId": "download_query_history_csv",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "request_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Request Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/query/standard-answer": {
      "get": {
        "summary": "Get Standard Answer",
        "operationId": "get_standard_answer",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StandardAnswerRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardAnswerResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search/search-flow-classification": {
      "post": {
        "summary": "Search Flow Classification",
        "description": "Classify whether a query should be answered by search or by chat.\n\nQueries longer than 200 characters are classified as a chat flow without an\nLLM call. A failed classification falls back to ``is_search_flow: false``\nrather than raising.",
        "operationId": "search_flow_classification",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchFlowClassificationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchFlowClassificationResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search/send-search-message": {
      "post": {
        "summary": "Handle Send Search Message",
        "description": "Executes a search query with optional streaming.\n\nIf hybrid_alpha is unset and ONYX_SEARCH_UI_USES_OPENSEARCH_KEYWORD_SEARCH\nis True, executes pure keyword search.\n\nReturns:\n    StreamingResponse with SSE if stream=True, otherwise SearchFullResponse.",
        "operationId": "handle_send_search_message",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendSearchQueryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "If `stream=true`, returns `text/event-stream`.\nIf `stream=false` (the default), returns `application/json` (SearchFullResponse).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchFullResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "stream": {
                    "summary": "Stream of NDJSON search packets",
                    "value": "string"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search/search-history": {
      "get": {
        "summary": "Get Search History",
        "description": "Fetch past search queries for the authenticated user.\n\nArgs:\n    limit: Maximum number of queries to return (default 100)\n    filter_days: Only return queries from the last N days (optional)\n\nReturns:\n    SearchHistoryResponse with list of search queries, ordered by most recent first.",
        "operationId": "get_search_history",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "filter_days",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Filter Days"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchHistoryResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/standard-answer": {
      "post": {
        "summary": "Create Standard Answer",
        "operationId": "create_standard_answer",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StandardAnswerCreationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardAnswer"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List Standard Answers",
        "operationId": "list_standard_answers",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StandardAnswer"
                  },
                  "title": "Response List Standard Answers Manage Admin Standard Answer Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/standard-answer/{standard_answer_id}": {
      "patch": {
        "summary": "Patch Standard Answer",
        "operationId": "patch_standard_answer",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "standard_answer_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Standard Answer Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StandardAnswerCreationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardAnswer"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Standard Answer",
        "operationId": "delete_standard_answer",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "standard_answer_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Standard Answer Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/standard-answer/category": {
      "post": {
        "summary": "Create Standard Answer Category",
        "operationId": "create_standard_answer_category",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StandardAnswerCategoryCreationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardAnswerCategory"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List Standard Answer Categories",
        "operationId": "list_standard_answer_categories",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StandardAnswerCategory"
                  },
                  "title": "Response List Standard Answer Categories Manage Admin Standard Answer Category Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/standard-answer/category/{standard_answer_category_id}": {
      "patch": {
        "summary": "Patch Standard Answer Category",
        "operationId": "patch_standard_answer_category",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "standard_answer_category_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Standard Answer Category Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StandardAnswerCategoryCreationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardAnswerCategory"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Standard Answer Category",
        "operationId": "delete_standard_answer_category",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "standard_answer_category_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Standard Answer Category Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/connector/confluence/callback": {
      "post": {
        "summary": "Confluence Oauth Callback",
        "description": "Handles the backend logic for the frontend page that the user is redirected to\nafter visiting the oauth authorization url.",
        "operationId": "confluence_oauth_callback",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Code"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "State"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/connector/confluence/accessible-resources": {
      "get": {
        "summary": "Confluence Oauth Accessible Resources",
        "description": "Atlassian's API is weird and does not supply us with enough info to be in a\nusable state after authorizing.  All API's require a cloud id. We have to list\nthe accessible resources/sites and let the user choose which site to use.",
        "operationId": "confluence_oauth_accessible_resources",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "credential_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Credential Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/connector/confluence/finalize": {
      "post": {
        "summary": "Confluence Oauth Finalize",
        "description": "Saves the info for the selected cloud site to the credential.\nThis is the final step in the confluence oauth flow where after the traditional\nOAuth process, the user has to select a site to associate with the credentials.\nAfter this, the credential is usable.",
        "operationId": "confluence_oauth_finalize",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "credential_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Credential Id"
            }
          },
          {
            "name": "cloud_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cloud Id"
            }
          },
          {
            "name": "cloud_name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cloud Name"
            }
          },
          {
            "name": "cloud_url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cloud Url"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/connector/google-drive/callback": {
      "post": {
        "summary": "Handle Google Drive Oauth Callback",
        "operationId": "handle_google_drive_oauth_callback",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Code"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "State"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/connector/slack/callback": {
      "post": {
        "summary": "Handle Slack Oauth Callback",
        "operationId": "handle_slack_oauth_callback",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Code"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "State"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/prepare-authorization-request": {
      "post": {
        "summary": "Prepare Authorization Request",
        "description": "Used by the frontend to generate the url for the user's browser during auth request.\n\nExample: https://www.oauth.com/oauth2-servers/authorization/the-authorization-request/",
        "operationId": "prepare_authorization_request",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "connector",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/DocumentSource"
            }
          },
          {
            "name": "redirect_on_success",
            "in": "query",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Redirect On Success"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/cc-pair/{cc_pair_id}/sync-permissions": {
      "get": {
        "summary": "Get Cc Pair Latest Sync",
        "operationId": "get_cc_pair_latest_sync",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cc_pair_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Cc Pair Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Get Cc Pair Latest Sync Manage Admin Cc Pair  Cc Pair Id  Sync Permissions Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Sync Cc Pair",
        "description": "Triggers permissions sync on a particular cc_pair immediately",
        "operationId": "sync_cc_pair",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cc_pair_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Cc Pair Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse_NoneType_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/manage/admin/cc-pair/{cc_pair_id}/sync-groups": {
      "get": {
        "summary": "Get Cc Pair Latest Group Sync",
        "operationId": "get_cc_pair_latest_group_sync",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cc_pair_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Cc Pair Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Get Cc Pair Latest Group Sync Manage Admin Cc Pair  Cc Pair Id  Sync Groups Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Sync Cc Pair Groups",
        "description": "Triggers group sync on a particular cc_pair immediately",
        "operationId": "sync_cc_pair_groups",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cc_pair_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Cc Pair Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse_NoneType_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/evals/eval_run": {
      "post": {
        "summary": "Eval Run",
        "description": "Run an evaluation with the given message and optional dataset.\nThis endpoint requires a valid API key for authentication.",
        "operationId": "eval_run",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvalConfigurationOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalRunAck"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/hooks/specs": {
      "get": {
        "summary": "Get Hook Point Specs",
        "operationId": "get_hook_point_specs",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HookPointMetaResponse"
                  },
                  "title": "Response Get Hook Point Specs Admin Hooks Specs Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/hooks": {
      "get": {
        "summary": "List Hooks",
        "operationId": "list_hooks",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HookResponse"
                  },
                  "title": "Response List Hooks Admin Hooks Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Hook",
        "description": "Create a new hook. The endpoint is validated before persisting \u2014 creation fails if\nthe endpoint cannot be reached or the api_key is invalid. Hooks are created active.",
        "operationId": "create_hook",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HookCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HookResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/hooks/{hook_id}": {
      "get": {
        "summary": "Get Hook",
        "operationId": "get_hook",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "hook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Hook Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HookResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Hook",
        "description": "Update hook fields. If endpoint_url, api_key, or timeout_seconds changes, the\nendpoint is re-validated using the effective values. For active hooks the update is\nrejected on validation failure, keeping live traffic unaffected. For inactive hooks\nthe update goes through regardless and is_reachable is updated to reflect the result.\n\nNote: if an active hook's endpoint is currently down, even a timeout_seconds-only\nincrease will be rejected. The recovery flow is: deactivate \u2192 update \u2192 reactivate.",
        "operationId": "update_hook",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "hook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Hook Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HookUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HookResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Hook",
        "operationId": "delete_hook",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "hook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Hook Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/hooks/{hook_id}/activate": {
      "post": {
        "summary": "Activate Hook",
        "operationId": "activate_hook",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "hook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Hook Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HookResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/hooks/{hook_id}/validate": {
      "post": {
        "summary": "Validate Hook",
        "operationId": "validate_hook",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "hook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Hook Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HookValidateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/hooks/{hook_id}/deactivate": {
      "post": {
        "summary": "Deactivate Hook",
        "operationId": "deactivate_hook",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "hook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Hook Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HookResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/hooks/{hook_id}/execution-logs": {
      "get": {
        "summary": "List Hook Execution Logs",
        "operationId": "list_hook_execution_logs",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "hook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Hook Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HookExecutionRecord"
                  },
                  "title": "Response List Hook Execution Logs Admin Hooks  Hook Id  Execution Logs Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/gateway/v1/models": {
      "get": {
        "summary": "Gateway List Models",
        "operationId": "gateway_list_models",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/gateway/v1/chat/completions": {
      "post": {
        "summary": "Gateway Chat Completions",
        "operationId": "gateway_chat_completions",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatCompletionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/gateway/v1/responses": {
      "post": {
        "summary": "Gateway Responses",
        "operationId": "gateway_responses",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResponsesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/gateway/v1/messages": {
      "post": {
        "summary": "Gateway Anthropic Messages",
        "operationId": "gateway_anthropic_messages",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnthropicMessagesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/gateway/v1/messages/count_tokens": {
      "post": {
        "summary": "Gateway Anthropic Count Tokens",
        "operationId": "gateway_anthropic_count_tokens",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnthropicCountTokensRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/enterprise-settings": {
      "put": {
        "summary": "Admin Ee Put Settings",
        "operationId": "admin_ee_put_settings",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnterpriseSettings"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/enterprise-settings/logo": {
      "put": {
        "summary": "Put Logo",
        "operationId": "put_logo",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "is_logotype",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Is Logotype"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_put_logo_admin_enterprise_settings_logo_put"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/enterprise-settings/custom-analytics-script": {
      "put": {
        "summary": "Upload Custom Analytics Script",
        "operationId": "upload_custom_analytics_script",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnalyticsScriptUpload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/enterprise-settings/scim/token": {
      "get": {
        "summary": "Get Active Scim Token",
        "description": "Return the currently active SCIM token's metadata, or null if none.",
        "operationId": "get_active_scim_token",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ScimTokenResponse"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Get Active Scim Token Admin Enterprise Settings Scim Token Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Scim Token",
        "description": "Create a new SCIM bearer token.\n\nOnly one token is active at a time \u2014 creating a new token automatically\nrevokes all previous tokens. The raw token value is returned exactly once\nin the response; it cannot be retrieved again.",
        "operationId": "create_scim_token",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScimTokenCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScimTokenCreatedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/token-rate-limits/global": {
      "get": {
        "summary": "Get Global Token Limit Settings",
        "operationId": "get_global_token_limit_settings",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TokenRateLimitDisplay"
                  },
                  "title": "Response Get Global Token Limit Settings Admin Token Rate Limits Global Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Global Token Limit Settings",
        "operationId": "create_global_token_limit_settings",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRateLimitArgs"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenRateLimitDisplay"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/token-rate-limits/rate-limit/{token_rate_limit_id}": {
      "put": {
        "summary": "Update Token Limit Settings",
        "operationId": "update_token_limit_settings",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "token_rate_limit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Token Rate Limit Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRateLimitUpdateArgs"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenRateLimitDisplay"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Token Limit Settings",
        "operationId": "delete_token_limit_settings",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "token_rate_limit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Token Rate Limit Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/token-rate-limits/user-groups": {
      "get": {
        "summary": "Get All Group Token Limit Settings",
        "operationId": "get_all_group_token_limit_settings",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/TokenRateLimitDisplay"
                    }
                  },
                  "title": "Response Get All Group Token Limit Settings Admin Token Rate Limits User Groups Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/token-rate-limits/user-group/{group_id}": {
      "get": {
        "summary": "Get Group Token Limit Settings",
        "operationId": "get_group_token_limit_settings",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Group Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TokenRateLimitDisplay"
                  },
                  "title": "Response Get Group Token Limit Settings Admin Token Rate Limits User Group  Group Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Group Token Limit Settings",
        "operationId": "create_group_token_limit_settings",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Group Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRateLimitArgs"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenRateLimitDisplay"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/token-rate-limits/user-group/{group_id}/rate-limit/{rate_limit_id}": {
      "put": {
        "summary": "Update Group Token Limit Settings",
        "operationId": "update_group_token_limit_settings",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Group Id"
            }
          },
          {
            "name": "rate_limit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Rate Limit Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRateLimitUpdateArgs"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenRateLimitDisplay"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Group Token Limit Settings",
        "operationId": "delete_group_token_limit_settings",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Group Id"
            }
          },
          {
            "name": "rate_limit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Rate Limit Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/token-rate-limits/users": {
      "get": {
        "summary": "Get User Token Limit Settings",
        "operationId": "get_user_token_limit_settings",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TokenRateLimitDisplay"
                  },
                  "title": "Response Get User Token Limit Settings Admin Token Rate Limits Users Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create User Token Limit Settings",
        "operationId": "create_user_token_limit_settings",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRateLimitArgs"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenRateLimitDisplay"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/enterprise-settings/refresh-token": {
      "post": {
        "summary": "Refresh Access Token",
        "operationId": "refresh_access_token",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshTokenData"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/enterprise-settings": {
      "get": {
        "summary": "Ee Fetch Settings",
        "operationId": "ee_fetch_settings",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnterpriseSettings"
                }
              }
            }
          }
        }
      }
    },
    "/enterprise-settings/logotype": {
      "get": {
        "summary": "Fetch Logotype",
        "operationId": "fetch_logotype",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/enterprise-settings/logo": {
      "get": {
        "summary": "Fetch Logo",
        "operationId": "fetch_logo",
        "parameters": [
          {
            "name": "is_logotype",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Is Logotype"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/enterprise-settings/custom-analytics-script": {
      "get": {
        "summary": "Fetch Custom Analytics Script",
        "operationId": "fetch_custom_analytics_script",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Fetch Custom Analytics Script Enterprise Settings Custom Analytics Script Get"
                }
              }
            }
          }
        }
      }
    },
    "/admin/usage-report": {
      "post": {
        "summary": "Generate Report",
        "operationId": "generate_report",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateUsageReportParams"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Fetch Usage Reports",
        "operationId": "fetch_usage_reports",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UsageReportMetadata"
                  },
                  "title": "Response Fetch Usage Reports Admin Usage Report Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/usage-report/{report_name}": {
      "get": {
        "summary": "Read Usage Report",
        "operationId": "read_usage_report",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "report_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Name"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/log-export": {
      "post": {
        "summary": "Start Log Export",
        "description": "Starts an export: fans out one collector task per worker type, collects the\napi_server's logs inline, and returns the export ID to poll.\n\nThe fan-out is skipped on deployments that have no celery broker (the\nonyx-lite overlay); a failing broker degrades the export to the workers\nalready enqueued instead of failing it.",
        "operationId": "start_log_export",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogExportStartResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/log-export/{export_id}": {
      "get": {
        "summary": "Get Log Export Status",
        "description": "Reports collection progress, derived from stored receipts.",
        "operationId": "get_log_export_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "export_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Export Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogExportStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/log-export/{export_id}/download": {
      "get": {
        "summary": "Download Log Export",
        "description": "Streams the bundle of whatever pieces have arrived so far.\n\nCallers normally wait for the status endpoint to report ``ready``, but\ndownloading earlier is allowed and simply bundles fewer pieces.",
        "operationId": "download_log_export",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "export_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Export Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/license": {
      "get": {
        "summary": "Get License Status",
        "description": "Get current license status and seat usage.",
        "operationId": "get_license_status",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete License",
        "description": "Delete the current license.\n\nAdmin only - removes license from database and invalidates cache.",
        "operationId": "delete_license",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "boolean"
                  },
                  "title": "Response Delete License License Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/license/seats": {
      "get": {
        "summary": "Get Seat Usage",
        "description": "Get detailed seat usage information.",
        "operationId": "get_seat_usage",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeatUsageResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/license/claim": {
      "post": {
        "summary": "Claim License",
        "description": "Claim a license from the control plane (self-hosted only).\n\nWith a session_id, exchanges a completed Stripe checkout for a license.\nWithout one, re-claims using the stored license for auth, which picks up\nwhatever the control plane regenerated after a seat or plan change.",
        "operationId": "claim_license",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session Id"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/license/upload": {
      "post": {
        "summary": "Upload License",
        "description": "Upload a license file manually (self-hosted only).\n\nUsed for air-gapped deployments where the cloud data plane is not accessible.\nThe license file must be cryptographically signed by Onyx.",
        "operationId": "upload_license",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_license_license_upload_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseUploadResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/license/refresh": {
      "post": {
        "summary": "Refresh License Cache Endpoint",
        "description": "Force refresh the license cache from the local database.\n\nUseful after manual database changes or to verify license validity.\nDoes NOT fetch from control plane - use /claim for that.",
        "operationId": "refresh_license_cache_endpoint",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/billing/create-checkout-session": {
      "post": {
        "summary": "Create Checkout Session",
        "description": "Create a Stripe checkout session for new subscription or renewal.\n\nFor new customers, no license/tenant is required.\nFor renewals, existing license (self-hosted) or tenant_id (cloud) is used.\n\nAfter checkout completion:\n- Self-hosted: Use /license/claim to retrieve the license\n- Cloud: Subscription is automatically activated",
        "operationId": "create_checkout_session",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/CreateCheckoutSessionRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateCheckoutSessionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/billing/create-customer-portal-session": {
      "post": {
        "summary": "Create Customer Portal Session",
        "description": "Create a Stripe customer portal session for managing subscription.\n\nRequires existing license (self-hosted) or active tenant (cloud).",
        "operationId": "create_customer_portal_session",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/CreateCustomerPortalSessionRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateCustomerPortalSessionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/billing/billing-information": {
      "get": {
        "summary": "Get Billing Information",
        "description": "Get billing information for the current subscription.\n\nReturns subscription status and details from Stripe.\nFor self-hosted: If the circuit breaker is open (previous failure),\nreturns a 503 error without making the request.\n\nA 5-minute Redis cache absorbs admin-page polling so each instance does\nnot re-proxy every poll through the cloud data plane. Mutations\n(`/seats/update`) bust the cache.",
        "operationId": "get_billing_information",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/BillingInformationResponse"
                    },
                    {
                      "$ref": "#/components/schemas/SubscriptionStatusResponse"
                    }
                  ],
                  "title": "Response Get Billing Information Admin Billing Billing Information Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/billing/seats/update": {
      "post": {
        "summary": "Update Seats",
        "description": "Update the seat count for the current subscription.\n\nHandles Stripe proration and license regeneration via control plane.\nFor self-hosted, the frontend should call /license/claim after a short delay\nto fetch the regenerated license.",
        "operationId": "update_seats",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SeatUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeatUpdateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/billing/end-trial": {
      "post": {
        "summary": "End Trial",
        "description": "End the current trial immediately and charge the customer's card.\n\nCloud-only. The control plane sets `trial_end=\"now\"` on the Stripe\nsubscription; Stripe attempts to charge the attached payment method, and\nthe resulting webhook transitions the subscription to active.\n\nReturns 402 (forwarded from the control plane) when no payment method is\nattached. The frontend handles that by routing to the customer portal.",
        "operationId": "end_trial",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndTrialResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/billing/stripe-publishable-key": {
      "get": {
        "summary": "Get Stripe Publishable Key",
        "description": "Fetch the Stripe publishable key.\n\nPriority: env var override (for testing) > S3 bucket (production).\nThis endpoint is public (no auth required) since publishable keys are safe to expose.\nThe key is cached in memory to avoid hitting S3 on every request.",
        "operationId": "get_stripe_publishable_key",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StripePublishableKeyResponse"
                }
              }
            }
          }
        }
      }
    },
    "/admin/billing/reset-connection": {
      "post": {
        "summary": "Reset Stripe Connection",
        "description": "Reset the Stripe connection circuit breaker.\n\nCalled when user clicks \"Connect to Stripe\" to retry after a previous failure.\nThis clears the circuit breaker flag, allowing billing requests to proceed again.\nSelf-hosted only - cloud deployments don't use the circuit breaker.",
        "operationId": "reset_stripe_connection",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResetConnectionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/scim/v2/ServiceProviderConfig": {
      "get": {
        "summary": "Get Service Provider Config",
        "description": "Advertise supported SCIM features (RFC 7643 \u00a75).",
        "operationId": "get_service_provider_config",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScimServiceProviderConfig"
                }
              }
            }
          }
        }
      }
    },
    "/scim/v2/ResourceTypes": {
      "get": {
        "summary": "Get Resource Types",
        "description": "List available SCIM resource types (RFC 7643 \u00a76).\n\nWrapped in a ListResponse envelope (RFC 7644 \u00a73.4.2) because IdPs\nlike Entra ID expect a JSON object, not a bare array.",
        "operationId": "get_resource_types",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/scim/v2/Schemas": {
      "get": {
        "summary": "Get Schemas",
        "description": "Return SCIM schema definitions (RFC 7643 \u00a77).\n\nWrapped in a ListResponse envelope (RFC 7644 \u00a73.4.2) because IdPs\nlike Entra ID expect a JSON object, not a bare array.",
        "operationId": "get_schemas",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/scim/v2/Users": {
      "get": {
        "summary": "List Users",
        "description": "List users with optional SCIM filter and pagination.",
        "operationId": "list_users",
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Filter"
            }
          },
          {
            "name": "excludedAttributes",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Excludedattributes"
            }
          },
          {
            "name": "startIndex",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Startindex"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 0,
              "default": 100,
              "title": "Count"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create User",
        "description": "Create a new user from a SCIM provisioning request.",
        "operationId": "create_user",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScimUserResource"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/scim/v2/Users/{user_id}": {
      "get": {
        "summary": "Get User",
        "description": "Get a single user by ID.",
        "operationId": "get_user",
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "User Id"
            }
          },
          {
            "name": "excludedAttributes",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Excludedattributes"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Replace User",
        "description": "Replace a user entirely (RFC 7644 \u00a73.5.1).",
        "operationId": "replace_user",
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "User Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScimUserResource"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch User",
        "description": "Partially update a user (RFC 7644 \u00a73.5.2).\n\nThis is the primary endpoint for user deprovisioning \u2014 Okta sends\n``PATCH {\"active\": false}`` rather than DELETE.",
        "operationId": "patch_user",
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "User Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScimPatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete User",
        "description": "Delete a user (RFC 7644 \u00a73.6).\n\nDeactivates the user and removes the SCIM mapping. Note that Okta\ntypically uses PATCH active=false instead of DELETE.\nA second DELETE returns 404 per RFC 7644 \u00a73.6.",
        "operationId": "delete_user",
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "User Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/scim/v2/Groups": {
      "get": {
        "summary": "List Groups",
        "description": "List groups with optional SCIM filter and pagination.",
        "operationId": "list_groups",
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Filter"
            }
          },
          {
            "name": "excludedAttributes",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Excludedattributes"
            }
          },
          {
            "name": "startIndex",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Startindex"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 0,
              "default": 100,
              "title": "Count"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Group",
        "description": "Create a new group from a SCIM provisioning request.",
        "operationId": "create_group",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScimGroupResource"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/scim/v2/Groups/{group_id}": {
      "get": {
        "summary": "Get Group",
        "description": "Get a single group by ID.",
        "operationId": "get_group",
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Group Id"
            }
          },
          {
            "name": "excludedAttributes",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Excludedattributes"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Replace Group",
        "description": "Replace a group entirely (RFC 7644 \u00a73.5.1).",
        "operationId": "replace_group",
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Group Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScimGroupResource"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch Group",
        "description": "Partially update a group (RFC 7644 \u00a73.5.2).\n\nHandles member add/remove operations from Okta and Azure AD.",
        "operationId": "patch_group",
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Group Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScimPatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Group",
        "description": "Delete a group (RFC 7644 \u00a73.6).",
        "operationId": "delete_group",
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Group Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "APIKeyArgs": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "group_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Group Ids",
            "default": []
          }
        },
        "type": "object",
        "title": "APIKeyArgs"
      },
      "AbridgedSearchDoc": {
        "properties": {
          "document_id": {
            "type": "string",
            "title": "Document Id"
          },
          "semantic_identifier": {
            "type": "string",
            "title": "Semantic Identifier"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          }
        },
        "type": "object",
        "required": [
          "document_id",
          "semantic_identifier",
          "link"
        ],
        "title": "AbridgedSearchDoc",
        "description": "A subset of the info present in `SearchDoc`"
      },
      "AccessType": {
        "type": "string",
        "enum": [
          "public",
          "private",
          "sync"
        ],
        "title": "AccessType"
      },
      "AccountIdentityResponse": {
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "email": {
            "type": "string",
            "title": "Email"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "user_id",
          "email"
        ],
        "title": "AccountIdentityResponse"
      },
      "AccountType": {
        "type": "string",
        "enum": [
          "STANDARD",
          "BOT",
          "EXT_PERM_USER",
          "SERVICE_ACCOUNT",
          "ANONYMOUS"
        ],
        "title": "AccountType",
        "description": "What kind of account this is \u2014 determines whether the user\nenters the group-based permission system.\n\nSTANDARD + SERVICE_ACCOUNT \u2192 participate in group system\nBOT, EXT_PERM_USER, ANONYMOUS \u2192 fixed behavior"
      },
      "ActionPolicyView": {
        "properties": {
          "action_id": {
            "type": "string",
            "title": "Action Id"
          },
          "normalised_name": {
            "type": "string",
            "title": "Normalised Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "state": {
            "$ref": "#/components/schemas/EndpointPolicy"
          }
        },
        "type": "object",
        "required": [
          "action_id",
          "normalised_name",
          "description",
          "state"
        ],
        "title": "ActionPolicyView",
        "description": "One action of a built-in app, with its effective policy \u2014 the admin's\nstored override if set, otherwise the action's ``default_policy``."
      },
      "AddUsersToUserGroupRequest": {
        "properties": {
          "user_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "User Ids"
          }
        },
        "type": "object",
        "required": [
          "user_ids"
        ],
        "title": "AddUsersToUserGroupRequest"
      },
      "AdminBanner": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "show_as_popup": {
            "type": "boolean",
            "title": "Show As Popup",
            "default": false
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "title",
          "content",
          "updated_at"
        ],
        "title": "AdminBanner"
      },
      "AdminBannerUpdateRequest": {
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 100,
            "title": "Title"
          },
          "content": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "show_as_popup": {
            "type": "boolean",
            "title": "Show As Popup",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "title"
        ],
        "title": "AdminBannerUpdateRequest"
      },
      "AdminSearchRequest": {
        "properties": {
          "query": {
            "type": "string",
            "title": "Query"
          },
          "filters": {
            "$ref": "#/components/schemas/BaseFilters"
          }
        },
        "type": "object",
        "required": [
          "query",
          "filters"
        ],
        "title": "AdminSearchRequest"
      },
      "AdminSearchResponse": {
        "properties": {
          "documents": {
            "items": {
              "$ref": "#/components/schemas/SearchDoc"
            },
            "type": "array",
            "title": "Documents"
          }
        },
        "type": "object",
        "required": [
          "documents"
        ],
        "title": "AdminSearchResponse"
      },
      "AdvancedPayload": {
        "properties": {
          "cron": {
            "type": "string",
            "title": "Cron"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "cron"
        ],
        "title": "AdvancedPayload",
        "description": "Validated payload for ``editor_mode == \"advanced\"``."
      },
      "AgentResponseDelta": {
        "properties": {
          "type": {
            "type": "string",
            "const": "message_delta",
            "title": "Type",
            "default": "message_delta"
          },
          "content": {
            "type": "string",
            "title": "Content"
          }
        },
        "type": "object",
        "required": [
          "content"
        ],
        "title": "AgentResponseDelta"
      },
      "AgentResponseStart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "message_start",
            "title": "Type",
            "default": "message_start"
          },
          "final_documents": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SearchDoc"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Final Documents"
          },
          "pre_answer_processing_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pre Answer Processing Seconds"
          }
        },
        "type": "object",
        "title": "AgentResponseStart"
      },
      "AllUsersResponse": {
        "properties": {
          "accepted": {
            "items": {
              "$ref": "#/components/schemas/FullUserSnapshot"
            },
            "type": "array",
            "title": "Accepted"
          },
          "invited": {
            "items": {
              "$ref": "#/components/schemas/InvitedUserSnapshot"
            },
            "type": "array",
            "title": "Invited"
          },
          "slack_users": {
            "items": {
              "$ref": "#/components/schemas/FullUserSnapshot"
            },
            "type": "array",
            "title": "Slack Users"
          },
          "accepted_pages": {
            "type": "integer",
            "title": "Accepted Pages"
          },
          "invited_pages": {
            "type": "integer",
            "title": "Invited Pages"
          },
          "slack_users_pages": {
            "type": "integer",
            "title": "Slack Users Pages"
          }
        },
        "type": "object",
        "required": [
          "accepted",
          "invited",
          "slack_users",
          "accepted_pages",
          "invited_pages",
          "slack_users_pages"
        ],
        "title": "AllUsersResponse"
      },
      "AllVersions": {
        "properties": {
          "stable": {
            "$ref": "#/components/schemas/ContainerVersions"
          },
          "dev": {
            "$ref": "#/components/schemas/ContainerVersions"
          },
          "migration": {
            "$ref": "#/components/schemas/ContainerVersions"
          }
        },
        "type": "object",
        "required": [
          "stable",
          "dev",
          "migration"
        ],
        "title": "AllVersions"
      },
      "AllowanceUsageResponse": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "daily_limit_microusd": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Daily Limit Microusd"
          },
          "spent_microusd": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spent Microusd"
          },
          "reserved_microusd": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reserved Microusd"
          },
          "remaining_microusd": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remaining Microusd"
          },
          "resets_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resets At"
          }
        },
        "type": "object",
        "required": [
          "enabled",
          "daily_limit_microusd",
          "spent_microusd",
          "reserved_microusd",
          "remaining_microusd",
          "resets_at"
        ],
        "title": "AllowanceUsageResponse"
      },
      "AnalyticsScriptUpload": {
        "properties": {
          "script": {
            "type": "string",
            "title": "Script"
          },
          "secret_key": {
            "type": "string",
            "title": "Secret Key"
          }
        },
        "type": "object",
        "required": [
          "script",
          "secret_key"
        ],
        "title": "AnalyticsScriptUpload"
      },
      "AnthropicCountTokensRequest": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model"
          },
          "messages": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Messages"
          },
          "system": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "System"
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "model",
          "messages"
        ],
        "title": "AnthropicCountTokensRequest"
      },
      "AnthropicMessagesRequest": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model"
          },
          "messages": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Messages"
          },
          "max_tokens": {
            "type": "integer",
            "title": "Max Tokens"
          },
          "system": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "System"
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "tool_choice": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Choice"
          },
          "stream": {
            "type": "boolean",
            "title": "Stream",
            "default": false
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "thinking": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thinking"
          },
          "output_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Config"
          },
          "stop_sequences": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop Sequences"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "model",
          "messages",
          "max_tokens"
        ],
        "title": "AnthropicMessagesRequest",
        "description": "Anthropic Messages API request. ``extra=\"allow\"`` so unknown params\n(new client fields, provider-specific extensions) are tolerated rather\nthan rejected. ``stop_sequences`` is declared but tolerated-and-ignored:\nthe LLM interface has no stop support, and refusing the request would\nblock Claude Code outright \u2014 a dropped stop sequence degrades output\nshape but cannot corrupt the conversation. ``top_p``/``top_k`` stay\ntolerated (undeclared) for the same reason: dropping them only shapes\nsampling. ``metadata`` is accepted and unused."
      },
      "ApiKeyDescriptor": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "title": "Api Key Id"
          },
          "api_key_display": {
            "type": "string",
            "title": "Api Key Display"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "api_key_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key Name"
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/UserGroupInfo"
            },
            "type": "array",
            "title": "Groups"
          },
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id"
          }
        },
        "type": "object",
        "required": [
          "api_key_id",
          "api_key_display",
          "groups",
          "user_id"
        ],
        "title": "ApiKeyDescriptor"
      },
      "ApplicationStatus": {
        "type": "string",
        "enum": [
          "active",
          "payment_reminder",
          "grace_period",
          "gated_access",
          "seat_limit_exceeded"
        ],
        "title": "ApplicationStatus"
      },
      "ApprovalDecision": {
        "type": "string",
        "enum": [
          "APPROVED",
          "REJECTED",
          "EXPIRED"
        ],
        "title": "ApprovalDecision",
        "description": "Terminal decision on a gated action; `decision IS NULL` means pending."
      },
      "ApprovalListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ApprovalView"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "ApprovalListResponse"
      },
      "ApprovalView": {
        "properties": {
          "approval_id": {
            "type": "string",
            "format": "uuid",
            "title": "Approval Id"
          },
          "session_id": {
            "type": "string",
            "format": "uuid",
            "title": "Session Id"
          },
          "actions": {
            "items": {
              "$ref": "#/components/schemas/MatchedAction"
            },
            "type": "array",
            "title": "Actions"
          },
          "app_name": {
            "type": "string",
            "title": "App Name"
          },
          "payload": {
            "additionalProperties": true,
            "type": "object",
            "title": "Payload"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "decision": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApprovalDecision"
              },
              {
                "type": "null"
              }
            ]
          },
          "decided_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decided At"
          },
          "display_payload": {
            "additionalProperties": true,
            "type": "object",
            "title": "Display Payload",
            "description": "`payload` decoded for the reviewer (e.g. Gmail base64url MIME \u2192\nTo/Subject/Body), or `payload` itself when nothing decodes it.",
            "readOnly": true
          },
          "is_live": {
            "type": "boolean",
            "title": "Is Live",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "approval_id",
          "session_id",
          "actions",
          "app_name",
          "payload",
          "created_at",
          "decision",
          "decided_at",
          "display_payload",
          "is_live"
        ],
        "title": "ApprovalView"
      },
      "ArtifactResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "type": {
            "$ref": "#/components/schemas/ArtifactType"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "preview_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preview Url"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "session_id",
          "type",
          "name",
          "path",
          "preview_url",
          "created_at",
          "updated_at"
        ],
        "title": "ArtifactResponse",
        "description": "Artifact metadata in session response."
      },
      "ArtifactType": {
        "type": "string",
        "enum": [
          "web_app",
          "pptx",
          "docx",
          "image",
          "markdown",
          "excel",
          "pdf",
          "csv",
          "code",
          "directory",
          "audio",
          "video",
          "archive",
          "file"
        ],
        "title": "ArtifactType"
      },
      "AssistantDailyUsageResponse": {
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "title": "Date"
          },
          "total_messages": {
            "type": "integer",
            "title": "Total Messages"
          },
          "total_unique_users": {
            "type": "integer",
            "title": "Total Unique Users"
          }
        },
        "type": "object",
        "required": [
          "date",
          "total_messages",
          "total_unique_users"
        ],
        "title": "AssistantDailyUsageResponse"
      },
      "AssistantStatsResponse": {
        "properties": {
          "daily_stats": {
            "items": {
              "$ref": "#/components/schemas/AssistantDailyUsageResponse"
            },
            "type": "array",
            "title": "Daily Stats"
          },
          "total_messages": {
            "type": "integer",
            "title": "Total Messages"
          },
          "total_unique_users": {
            "type": "integer",
            "title": "Total Unique Users"
          }
        },
        "type": "object",
        "required": [
          "daily_stats",
          "total_messages",
          "total_unique_users"
        ],
        "title": "AssistantStatsResponse"
      },
      "AttachedDocumentSnapshot": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          },
          "last_modified": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Modified"
          },
          "last_synced": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Synced"
          },
          "source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentSource"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "title",
          "link",
          "parent_id",
          "last_modified",
          "last_synced",
          "source"
        ],
        "title": "AttachedDocumentSnapshot",
        "description": "Minimal representation of an attached document for persona responses."
      },
      "AuthConfigResponse": {
        "properties": {
          "nexusPersonalMode": {
            "type": "boolean",
            "title": "Nexuspersonalmode",
            "default": false
          },
          "nexusSchoolMode": {
            "type": "boolean",
            "title": "Nexusschoolmode",
            "default": false
          },
          "multi_tenant": {
            "type": "boolean",
            "title": "Multi Tenant"
          },
          "requires_verification": {
            "type": "boolean",
            "title": "Requires Verification"
          },
          "anonymous_user_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anonymous User Enabled"
          },
          "password_min_length": {
            "type": "integer",
            "title": "Password Min Length"
          },
          "password_max_length": {
            "type": "integer",
            "title": "Password Max Length"
          },
          "password_require_uppercase": {
            "type": "boolean",
            "title": "Password Require Uppercase",
            "default": false
          },
          "password_require_lowercase": {
            "type": "boolean",
            "title": "Password Require Lowercase",
            "default": false
          },
          "password_require_digit": {
            "type": "boolean",
            "title": "Password Require Digit",
            "default": false
          },
          "password_require_special_char": {
            "type": "boolean",
            "title": "Password Require Special Char",
            "default": false
          },
          "has_users": {
            "type": "boolean",
            "title": "Has Users",
            "default": true
          },
          "oauth_enabled": {
            "type": "boolean",
            "title": "Oauth Enabled",
            "default": false
          },
          "password_auth_enabled": {
            "type": "boolean",
            "title": "Password Auth Enabled",
            "default": true
          },
          "sso_providers": {
            "items": {
              "$ref": "#/components/schemas/SSOProviderOption"
            },
            "type": "array",
            "title": "Sso Providers",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "multi_tenant",
          "requires_verification",
          "password_min_length",
          "password_max_length"
        ],
        "title": "AuthConfigResponse"
      },
      "AuthStatus": {
        "properties": {
          "authenticated": {
            "type": "boolean",
            "title": "Authenticated"
          }
        },
        "type": "object",
        "required": [
          "authenticated"
        ],
        "title": "AuthStatus"
      },
      "AuthUrl": {
        "properties": {
          "auth_url": {
            "type": "string",
            "title": "Auth Url"
          }
        },
        "type": "object",
        "required": [
          "auth_url"
        ],
        "title": "AuthUrl"
      },
      "AuthorizeResponse": {
        "properties": {
          "redirect_url": {
            "type": "string",
            "title": "Redirect Url"
          }
        },
        "type": "object",
        "required": [
          "redirect_url"
        ],
        "title": "AuthorizeResponse"
      },
      "AuthorizeUrlResponse": {
        "properties": {
          "authorize_url": {
            "type": "string",
            "title": "Authorize Url"
          }
        },
        "type": "object",
        "required": [
          "authorize_url"
        ],
        "title": "AuthorizeUrlResponse"
      },
      "AutoScrollRequest": {
        "properties": {
          "auto_scroll": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Scroll"
          }
        },
        "type": "object",
        "required": [
          "auto_scroll"
        ],
        "title": "AutoScrollRequest"
      },
      "AvailableContextTokensResponse": {
        "properties": {
          "available_tokens": {
            "type": "integer",
            "title": "Available Tokens"
          }
        },
        "type": "object",
        "required": [
          "available_tokens"
        ],
        "title": "AvailableContextTokensResponse"
      },
      "BaseFilters": {
        "properties": {
          "source_type": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/DocumentSource"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Type"
          },
          "document_set": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Set"
          },
          "created_at_range": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TimeRange"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_at_range": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TimeRange"
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Tag"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "time_cutoff": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Cutoff"
          }
        },
        "type": "object",
        "title": "BaseFilters"
      },
      "BaseInstructionsResponse": {
        "properties": {
          "content": {
            "type": "string",
            "title": "Content"
          }
        },
        "type": "object",
        "required": [
          "content"
        ],
        "title": "BaseInstructionsResponse"
      },
      "BashToolDelta": {
        "properties": {
          "type": {
            "type": "string",
            "const": "bash_tool_delta",
            "title": "Type",
            "default": "bash_tool_delta"
          },
          "stdout": {
            "type": "string",
            "title": "Stdout",
            "default": ""
          },
          "stderr": {
            "type": "string",
            "title": "Stderr",
            "default": ""
          },
          "exit_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exit Code"
          },
          "timed_out": {
            "type": "boolean",
            "title": "Timed Out",
            "default": false
          }
        },
        "type": "object",
        "title": "BashToolDelta"
      },
      "BashToolStart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "bash_tool_start",
            "title": "Type",
            "default": "bash_tool_start"
          },
          "cmd": {
            "type": "string",
            "title": "Cmd"
          }
        },
        "type": "object",
        "required": [
          "cmd"
        ],
        "title": "BashToolStart"
      },
      "BasicCCPairInfo": {
        "properties": {
          "has_successful_run": {
            "type": "boolean",
            "title": "Has Successful Run"
          },
          "source": {
            "$ref": "#/components/schemas/DocumentSource"
          },
          "status": {
            "$ref": "#/components/schemas/ConnectorCredentialPairStatus"
          }
        },
        "type": "object",
        "required": [
          "has_successful_run",
          "source",
          "status"
        ],
        "title": "BasicCCPairInfo"
      },
      "BasicExpertInfo": {
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "middle_initial": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Middle Initial"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          }
        },
        "type": "object",
        "title": "BasicExpertInfo",
        "description": "Basic Information for the owner of a document, any of the fields can be left as None\nDisplay fallback goes as follows:\n- first_name + (optional middle_initial) + last_name\n- display_name\n- email\n- first_name"
      },
      "BearerResponse": {
        "properties": {
          "access_token": {
            "type": "string",
            "title": "Access Token"
          },
          "token_type": {
            "type": "string",
            "title": "Token Type"
          }
        },
        "type": "object",
        "required": [
          "access_token",
          "token_type"
        ],
        "title": "BearerResponse"
      },
      "BedrockFinalModelResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "max_input_tokens": {
            "type": "integer",
            "title": "Max Input Tokens"
          },
          "supports_image_input": {
            "type": "boolean",
            "title": "Supports Image Input"
          }
        },
        "type": "object",
        "required": [
          "name",
          "display_name",
          "max_input_tokens",
          "supports_image_input"
        ],
        "title": "BedrockFinalModelResponse"
      },
      "BedrockModelsRequest": {
        "properties": {
          "aws_region_name": {
            "type": "string",
            "title": "Aws Region Name"
          },
          "aws_access_key_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Aws Access Key Id"
          },
          "aws_secret_access_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Aws Secret Access Key"
          },
          "aws_bearer_token_bedrock": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Aws Bearer Token Bedrock"
          },
          "provider_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Id"
          }
        },
        "type": "object",
        "required": [
          "aws_region_name"
        ],
        "title": "BedrockModelsRequest"
      },
      "BifrostFinalModelResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "max_input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Tokens"
          },
          "supports_image_input": {
            "type": "boolean",
            "title": "Supports Image Input"
          },
          "supports_reasoning": {
            "type": "boolean",
            "title": "Supports Reasoning"
          }
        },
        "type": "object",
        "required": [
          "name",
          "display_name",
          "max_input_tokens",
          "supports_image_input",
          "supports_reasoning"
        ],
        "title": "BifrostFinalModelResponse"
      },
      "BifrostModelsRequest": {
        "properties": {
          "api_base": {
            "type": "string",
            "title": "Api Base"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "provider_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Id"
          }
        },
        "type": "object",
        "required": [
          "api_base"
        ],
        "title": "BifrostModelsRequest"
      },
      "BillingInformationResponse": {
        "properties": {
          "tenant_id": {
            "type": "string",
            "title": "Tenant Id"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "plan_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Plan Type"
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats"
          },
          "billing_period": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Period"
          },
          "current_period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Period Start"
          },
          "current_period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Period End"
          },
          "cancel_at_period_end": {
            "type": "boolean",
            "title": "Cancel At Period End",
            "default": false
          },
          "canceled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled At"
          },
          "trial_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Start"
          },
          "trial_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial End"
          },
          "payment_method_enabled": {
            "type": "boolean",
            "title": "Payment Method Enabled",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "tenant_id"
        ],
        "title": "BillingInformationResponse",
        "description": "Billing information for the current subscription."
      },
      "Body_auth_mobile_bearer_login_auth_mobile_login_post": {
        "properties": {
          "grant_type": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^password$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grant Type"
          },
          "username": {
            "type": "string",
            "title": "Username"
          },
          "password": {
            "type": "string",
            "format": "password",
            "title": "Password"
          },
          "scope": {
            "type": "string",
            "title": "Scope",
            "default": ""
          },
          "client_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Id"
          },
          "client_secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "format": "password",
            "title": "Client Secret"
          }
        },
        "type": "object",
        "required": [
          "username",
          "password"
        ],
        "title": "Body_auth_mobile_bearer_login_auth_mobile_login_post"
      },
      "Body_auth_redis_login_auth_login_post": {
        "properties": {
          "grant_type": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^password$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grant Type"
          },
          "username": {
            "type": "string",
            "title": "Username"
          },
          "password": {
            "type": "string",
            "format": "password",
            "title": "Password"
          },
          "scope": {
            "type": "string",
            "title": "Scope",
            "default": ""
          },
          "client_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Id"
          },
          "client_secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "format": "password",
            "title": "Client Secret"
          }
        },
        "type": "object",
        "required": [
          "username",
          "password"
        ],
        "title": "Body_auth_redis_login_auth_login_post"
      },
      "Body_bulk_invite_users_manage_admin_users_put": {
        "properties": {
          "emails": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Emails"
          }
        },
        "type": "object",
        "required": [
          "emails"
        ],
        "title": "Body_bulk_invite_users_manage_admin_users_put"
      },
      "Body_create_credential_with_private_key_manage_credential_private_key_post": {
        "properties": {
          "credential_json": {
            "type": "string",
            "title": "Credential Json"
          },
          "admin_public": {
            "type": "boolean",
            "title": "Admin Public",
            "default": false
          },
          "curator_public": {
            "type": "boolean",
            "title": "Curator Public",
            "default": false
          },
          "groups": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Groups",
            "default": []
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "source": {
            "type": "string",
            "title": "Source"
          },
          "uploaded_file": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "Uploaded File"
          },
          "field_key": {
            "type": "string",
            "title": "Field Key"
          },
          "type_definition_key": {
            "type": "string",
            "title": "Type Definition Key"
          }
        },
        "type": "object",
        "required": [
          "credential_json",
          "source",
          "uploaded_file",
          "field_key",
          "type_definition_key"
        ],
        "title": "Body_create_credential_with_private_key_manage_credential_private_key_post"
      },
      "Body_create_custom_skill_from_editor_skills_custom_editor_post": {
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name"
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "title": "Description"
          },
          "instructions_markdown": {
            "type": "string",
            "minLength": 1,
            "title": "Instructions Markdown"
          },
          "upload": {
            "anyOf": [
              {
                "type": "string",
                "contentMediaType": "application/octet-stream"
              },
              {
                "type": "null"
              }
            ],
            "title": "Upload"
          },
          "auto_enable": {
            "type": "boolean",
            "title": "Auto Enable",
            "default": true
          },
          "external_app_id": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "External App Id"
          }
        },
        "type": "object",
        "required": [
          "name",
          "description",
          "instructions_markdown"
        ],
        "title": "Body_create_custom_skill_from_editor_skills_custom_editor_post"
      },
      "Body_create_custom_skill_skills_custom_post": {
        "properties": {
          "bundle": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "Bundle"
          },
          "auto_enable": {
            "type": "boolean",
            "title": "Auto Enable",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "bundle"
        ],
        "title": "Body_create_custom_skill_skills_custom_post"
      },
      "Body_inspect_custom_skill_bundle_upload_skills_custom_bundle_inspect_post": {
        "properties": {
          "upload": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "Upload"
          }
        },
        "type": "object",
        "required": [
          "upload"
        ],
        "title": "Body_inspect_custom_skill_bundle_upload_skills_custom_bundle_inspect_post"
      },
      "Body_put_logo_admin_enterprise_settings_logo_put": {
        "properties": {
          "file": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "File"
          }
        },
        "type": "object",
        "required": [
          "file"
        ],
        "title": "Body_put_logo_admin_enterprise_settings_logo_put"
      },
      "Body_replace_current_user_skill_bundle_skills_custom__skill_id__bundle_put": {
        "properties": {
          "bundle": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "Bundle"
          }
        },
        "type": "object",
        "required": [
          "bundle"
        ],
        "title": "Body_replace_current_user_skill_bundle_skills_custom__skill_id__bundle_put"
      },
      "Body_reset_forgot_password_auth_forgot_password_post": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "Body_reset_forgot_password_auth_forgot_password_post"
      },
      "Body_reset_reset_password_auth_reset_password_post": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          },
          "password": {
            "type": "string",
            "title": "Password"
          }
        },
        "type": "object",
        "required": [
          "token",
          "password"
        ],
        "title": "Body_reset_reset_password_auth_reset_password_post"
      },
      "Body_transcribe_audio_voice_transcribe_post": {
        "properties": {
          "audio": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "Audio"
          }
        },
        "type": "object",
        "required": [
          "audio"
        ],
        "title": "Body_transcribe_audio_voice_transcribe_post"
      },
      "Body_update_connector_files_manage_admin_connector__connector_id__files_update_post": {
        "properties": {
          "files": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "contentMediaType": "application/octet-stream"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Files"
          },
          "file_ids_to_remove": {
            "type": "string",
            "title": "File Ids To Remove",
            "default": "[]"
          }
        },
        "type": "object",
        "title": "Body_update_connector_files_manage_admin_connector__connector_id__files_update_post"
      },
      "Body_update_credential_private_key_manage_admin_credential_private_key__credential_id__put": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "credential_json": {
            "type": "string",
            "title": "Credential Json"
          },
          "uploaded_file": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "Uploaded File"
          },
          "field_key": {
            "type": "string",
            "title": "Field Key"
          },
          "type_definition_key": {
            "type": "string",
            "title": "Type Definition Key"
          }
        },
        "type": "object",
        "required": [
          "name",
          "credential_json",
          "uploaded_file",
          "field_key",
          "type_definition_key"
        ],
        "title": "Body_update_credential_private_key_manage_admin_credential_private_key__credential_id__put"
      },
      "Body_upload_current_user_skill_files_skills_custom__skill_id__files_post": {
        "properties": {
          "upload": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "Upload"
          }
        },
        "type": "object",
        "required": [
          "upload"
        ],
        "title": "Body_upload_current_user_skill_files_skills_custom__skill_id__files_post"
      },
      "Body_upload_file_admin_persona_upload_image_post": {
        "properties": {
          "file": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "File"
          }
        },
        "type": "object",
        "required": [
          "file"
        ],
        "title": "Body_upload_file_admin_persona_upload_image_post"
      },
      "Body_upload_file_endpoint_build_sessions__session_id__upload_post": {
        "properties": {
          "file": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "File"
          }
        },
        "type": "object",
        "required": [
          "file"
        ],
        "title": "Body_upload_file_endpoint_build_sessions__session_id__upload_post"
      },
      "Body_upload_files_api_manage_admin_connector_file_upload_post": {
        "properties": {
          "files": {
            "items": {
              "type": "string",
              "contentMediaType": "application/octet-stream"
            },
            "type": "array",
            "title": "Files"
          }
        },
        "type": "object",
        "required": [
          "files"
        ],
        "title": "Body_upload_files_api_manage_admin_connector_file_upload_post"
      },
      "Body_upload_files_build_user_library_upload_post": {
        "properties": {
          "files": {
            "items": {
              "type": "string",
              "contentMediaType": "application/octet-stream"
            },
            "type": "array",
            "title": "Files"
          },
          "path": {
            "type": "string",
            "title": "Path",
            "default": "/"
          }
        },
        "type": "object",
        "required": [
          "files"
        ],
        "title": "Body_upload_files_build_user_library_upload_post"
      },
      "Body_upload_license_license_upload_post": {
        "properties": {
          "license_file": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "License File"
          }
        },
        "type": "object",
        "required": [
          "license_file"
        ],
        "title": "Body_upload_license_license_upload_post"
      },
      "Body_upload_user_files_user_projects_file_upload_post": {
        "properties": {
          "files": {
            "items": {
              "type": "string",
              "contentMediaType": "application/octet-stream"
            },
            "type": "array",
            "title": "Files"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "temp_id_map": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temp Id Map"
          },
          "incognito_session_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Incognito Session Id"
          }
        },
        "type": "object",
        "required": [
          "files"
        ],
        "title": "Body_upload_user_files_user_projects_file_upload_post"
      },
      "Body_upload_zip_build_user_library_upload_zip_post": {
        "properties": {
          "file": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "File"
          },
          "path": {
            "type": "string",
            "title": "Path",
            "default": "/"
          }
        },
        "type": "object",
        "required": [
          "file"
        ],
        "title": "Body_upload_zip_build_user_library_upload_zip_post"
      },
      "Body_verify_request_token_auth_request_verify_token_post": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "Body_verify_request_token_auth_request_verify_token_post"
      },
      "Body_verify_verify_auth_verify_post": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          }
        },
        "type": "object",
        "required": [
          "token"
        ],
        "title": "Body_verify_verify_auth_verify_post"
      },
      "BoostDoc": {
        "properties": {
          "document_id": {
            "type": "string",
            "title": "Document Id"
          },
          "semantic_id": {
            "type": "string",
            "title": "Semantic Id"
          },
          "link": {
            "type": "string",
            "title": "Link"
          },
          "boost": {
            "type": "integer",
            "title": "Boost"
          },
          "hidden": {
            "type": "boolean",
            "title": "Hidden"
          }
        },
        "type": "object",
        "required": [
          "document_id",
          "semantic_id",
          "link",
          "boost",
          "hidden"
        ],
        "title": "BoostDoc"
      },
      "BoostUpdateRequest": {
        "properties": {
          "document_id": {
            "type": "string",
            "title": "Document Id"
          },
          "boost": {
            "type": "integer",
            "title": "Boost"
          }
        },
        "type": "object",
        "required": [
          "document_id",
          "boost"
        ],
        "title": "BoostUpdateRequest"
      },
      "BoundChatLearningPolicyResponse": {
        "properties": {
          "class_id": {
            "type": "string",
            "format": "uuid",
            "title": "Class Id"
          },
          "class_name": {
            "type": "string",
            "title": "Class Name"
          },
          "mode": {
            "$ref": "#/components/schemas/SchoolLearningMode"
          },
          "revision": {
            "type": "integer",
            "title": "Revision"
          },
          "allowed_model_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Allowed Model Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "class_id",
          "class_name",
          "mode",
          "revision",
          "allowed_model_ids"
        ],
        "title": "BoundChatLearningPolicyResponse"
      },
      "BuildSessionStatus": {
        "type": "string",
        "enum": [
          "initializing",
          "active",
          "idle",
          "failed"
        ],
        "title": "BuildSessionStatus",
        "description": "Lifecycle of a build session.\n\nINITIALIZING: reserved identity committed; workspace/OpenCode setup is\n              still reconciling (or was interrupted and is repairable).\nACTIVE:       workspace, config, and OpenCode session are usable.\nIDLE:         sandbox slept; workspace must be restored before use.\nFAILED:       initialization failed after the sandbox came up; the\n              session identity is retained and repaired on retry."
      },
      "BuiltInExternalAppDescriptor": {
        "properties": {
          "app_type": {
            "$ref": "#/components/schemas/ExternalAppType"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "upstream_url_patterns": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Upstream Url Patterns"
          },
          "auth_template": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Auth Template"
          },
          "required_org_credential_fields": {
            "items": {
              "$ref": "#/components/schemas/OrgCredentialFieldDescriptor"
            },
            "type": "array",
            "title": "Required Org Credential Fields"
          },
          "setup_instructions": {
            "type": "string",
            "title": "Setup Instructions"
          },
          "actions": {
            "items": {
              "$ref": "#/components/schemas/EndpointDescriptor"
            },
            "type": "array",
            "title": "Actions"
          }
        },
        "type": "object",
        "required": [
          "app_type",
          "name",
          "upstream_url_patterns",
          "auth_template",
          "required_org_credential_fields",
          "setup_instructions",
          "actions"
        ],
        "title": "BuiltInExternalAppDescriptor",
        "description": "Backend-defined preset for a built-in OAuth provider. The admin\nUI fetches these and uses them to render the Configure modal +\nPOST body, so adding a new provider is a backend-only change."
      },
      "BulkInviteResponse": {
        "properties": {
          "invited_count": {
            "type": "integer",
            "title": "Invited Count"
          },
          "email_invite_status": {
            "$ref": "#/components/schemas/EmailInviteStatus"
          }
        },
        "type": "object",
        "required": [
          "invited_count",
          "email_invite_status"
        ],
        "title": "BulkInviteResponse"
      },
      "BulkSetPermissionsRequest": {
        "properties": {
          "permissions": {
            "items": {
              "$ref": "#/components/schemas/Permission"
            },
            "type": "array",
            "title": "Permissions"
          }
        },
        "type": "object",
        "required": [
          "permissions"
        ],
        "title": "BulkSetPermissionsRequest"
      },
      "CCPairFullInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "status": {
            "$ref": "#/components/schemas/ConnectorCredentialPairStatus"
          },
          "in_repeated_error_state": {
            "type": "boolean",
            "title": "In Repeated Error State"
          },
          "num_docs_indexed": {
            "type": "integer",
            "title": "Num Docs Indexed"
          },
          "connector": {
            "$ref": "#/components/schemas/ConnectorSnapshot"
          },
          "credential": {
            "$ref": "#/components/schemas/CredentialSnapshot"
          },
          "number_of_index_attempts": {
            "type": "integer",
            "title": "Number Of Index Attempts"
          },
          "last_index_attempt_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IndexingStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "latest_deletion_attempt": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DeletionAttemptSnapshot"
              },
              {
                "type": "null"
              }
            ]
          },
          "access_type": {
            "$ref": "#/components/schemas/AccessType"
          },
          "is_editable_for_current_user": {
            "type": "boolean",
            "title": "Is Editable For Current User"
          },
          "permissions": {
            "additionalProperties": {
              "type": "boolean"
            },
            "type": "object",
            "title": "Permissions"
          },
          "deletion_failure_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deletion Failure Message"
          },
          "indexing": {
            "type": "boolean",
            "title": "Indexing"
          },
          "creator": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Creator"
          },
          "creator_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Creator Email"
          },
          "last_indexed": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Indexed"
          },
          "last_pruned": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Pruned"
          },
          "last_full_permission_sync": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Full Permission Sync"
          },
          "overall_indexing_speed": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overall Indexing Speed"
          },
          "latest_checkpoint_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latest Checkpoint Description"
          },
          "last_permission_sync_attempt_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PermissionSyncStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "permission_syncing": {
            "type": "boolean",
            "title": "Permission Syncing"
          },
          "last_permission_sync_attempt_finished": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Permission Sync Attempt Finished"
          },
          "last_permission_sync_attempt_error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Permission Sync Attempt Error Message"
          },
          "supports_targeted_reindex": {
            "type": "boolean",
            "title": "Supports Targeted Reindex"
          },
          "groups": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Groups"
          },
          "auto_sync_options": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Sync Options"
          },
          "processing_mode": {
            "$ref": "#/components/schemas/ProcessingMode"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "status",
          "in_repeated_error_state",
          "num_docs_indexed",
          "connector",
          "credential",
          "number_of_index_attempts",
          "last_index_attempt_status",
          "latest_deletion_attempt",
          "access_type",
          "is_editable_for_current_user",
          "permissions",
          "deletion_failure_message",
          "indexing",
          "creator",
          "creator_email",
          "last_indexed",
          "last_pruned",
          "last_full_permission_sync",
          "overall_indexing_speed",
          "latest_checkpoint_description",
          "last_permission_sync_attempt_status",
          "permission_syncing",
          "last_permission_sync_attempt_finished",
          "last_permission_sync_attempt_error_message",
          "supports_targeted_reindex",
          "groups",
          "auto_sync_options",
          "processing_mode"
        ],
        "title": "CCPairFullInfo"
      },
      "CCPairSummary": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "source": {
            "$ref": "#/components/schemas/DocumentSource"
          },
          "access_type": {
            "$ref": "#/components/schemas/AccessType"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "source",
          "access_type"
        ],
        "title": "CCPairSummary",
        "description": "Simplified connector-credential pair information with just essential data"
      },
      "CCPairSyncAttemptsResponse_DocPermissionSyncAttemptSnapshot_": {
        "properties": {
          "applicable": {
            "type": "boolean",
            "title": "Applicable"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/DocPermissionSyncAttemptSnapshot"
            },
            "type": "array",
            "title": "Items"
          },
          "total_items": {
            "type": "integer",
            "title": "Total Items"
          }
        },
        "type": "object",
        "required": [
          "applicable",
          "items",
          "total_items"
        ],
        "title": "CCPairSyncAttemptsResponse[DocPermissionSyncAttemptSnapshot]"
      },
      "CCPairSyncAttemptsResponse_ExternalGroupSyncAttemptSnapshot_": {
        "properties": {
          "applicable": {
            "type": "boolean",
            "title": "Applicable"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ExternalGroupSyncAttemptSnapshot"
            },
            "type": "array",
            "title": "Items"
          },
          "total_items": {
            "type": "integer",
            "title": "Total Items"
          }
        },
        "type": "object",
        "required": [
          "applicable",
          "items",
          "total_items"
        ],
        "title": "CCPairSyncAttemptsResponse[ExternalGroupSyncAttemptSnapshot]"
      },
      "CCPropertyUpdateRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "value": {
            "type": "string",
            "title": "Value"
          }
        },
        "type": "object",
        "required": [
          "name",
          "value"
        ],
        "title": "CCPropertyUpdateRequest"
      },
      "CCStatusUpdateRequest": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/ConnectorCredentialPairStatus"
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "CCStatusUpdateRequest"
      },
      "CallbackResponse": {
        "properties": {
          "redirect_url": {
            "type": "string",
            "title": "Redirect Url"
          }
        },
        "type": "object",
        "required": [
          "redirect_url"
        ],
        "title": "CallbackResponse"
      },
      "CapabilityCheckResult": {
        "properties": {
          "capability": {
            "$ref": "#/components/schemas/CredentialCapability"
          },
          "check_id": {
            "type": "string",
            "title": "Check Id"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "required": {
            "type": "boolean",
            "title": "Required"
          },
          "status": {
            "$ref": "#/components/schemas/CapabilityCheckStatus"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "default": ""
          },
          "error_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Type"
          },
          "is_fallback": {
            "type": "boolean",
            "title": "Is Fallback",
            "default": false
          },
          "remediation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remediation"
          },
          "docs_link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docs Link"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          }
        },
        "type": "object",
        "required": [
          "capability",
          "check_id",
          "display_name",
          "required",
          "status"
        ],
        "title": "CapabilityCheckResult"
      },
      "CapabilityCheckRunRequest": {
        "properties": {
          "connector_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connector Id"
          },
          "connector_specific_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connector Specific Config"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "CapabilityCheckRunRequest",
        "description": "Body of the trigger endpoint: which scope to run against.\n\nBoth fields absent is the config-less credential-scoped run.\n``connector_specific_config`` overrides the connector's stored config (a\nnot-yet-saved edit) and is only meaningful with ``connector_id``."
      },
      "CapabilityCheckStatus": {
        "type": "string",
        "enum": [
          "passed",
          "failed",
          "indeterminate",
          "skipped"
        ],
        "title": "CapabilityCheckStatus"
      },
      "CapabilityCheckTrigger": {
        "type": "string",
        "enum": [
          "manual",
          "credential_created",
          "cc_pair_validation",
          "indexing_attempt",
          "perm_sync_attempt"
        ],
        "title": "CapabilityCheckTrigger",
        "description": "What initiated a capability-check run."
      },
      "CapabilityReportRunStatus": {
        "type": "string",
        "enum": [
          "running",
          "completed",
          "failed_to_run"
        ],
        "title": "CapabilityReportRunStatus",
        "description": "Lifecycle of one persisted capability-report row.\n\nKept separate from the report payload so the last COMPLETED report stays\nreadable while a re-run is RUNNING."
      },
      "CapabilityReportSnapshot": {
        "properties": {
          "credential_id": {
            "type": "integer",
            "title": "Credential Id"
          },
          "connector_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connector Id"
          },
          "source": {
            "$ref": "#/components/schemas/DocumentSource"
          },
          "trigger": {
            "$ref": "#/components/schemas/CapabilityCheckTrigger"
          },
          "run_status": {
            "$ref": "#/components/schemas/CapabilityReportRunStatus"
          },
          "run_started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Started At"
          },
          "connector_config_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connector Config Hash"
          },
          "report": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CredentialCapabilityReport"
              },
              {
                "type": "null"
              }
            ]
          },
          "time_updated": {
            "type": "string",
            "format": "date-time",
            "title": "Time Updated"
          }
        },
        "type": "object",
        "required": [
          "credential_id",
          "connector_id",
          "source",
          "trigger",
          "run_status",
          "run_started_at",
          "connector_config_hash",
          "report",
          "time_updated"
        ],
        "title": "CapabilityReportSnapshot",
        "description": "One stored report row; ``report`` is the last completed run's content."
      },
      "CapabilityVerdict": {
        "type": "string",
        "enum": [
          "passed",
          "passed_with_warnings",
          "failed",
          "indeterminate",
          "skipped",
          "not_applicable"
        ],
        "title": "CapabilityVerdict"
      },
      "CategorizedFilesSnapshot": {
        "properties": {
          "user_files": {
            "items": {
              "$ref": "#/components/schemas/UserFileSnapshot"
            },
            "type": "array",
            "title": "User Files"
          },
          "rejected_files": {
            "items": {
              "$ref": "#/components/schemas/RejectedFile"
            },
            "type": "array",
            "title": "Rejected Files"
          }
        },
        "type": "object",
        "required": [
          "user_files",
          "rejected_files"
        ],
        "title": "CategorizedFilesSnapshot"
      },
      "ChangePasswordRequest": {
        "properties": {
          "old_password": {
            "type": "string",
            "title": "Old Password"
          },
          "new_password": {
            "type": "string",
            "title": "New Password"
          }
        },
        "type": "object",
        "required": [
          "old_password",
          "new_password"
        ],
        "title": "ChangePasswordRequest"
      },
      "ChannelConfig": {
        "properties": {
          "channel_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Name"
          },
          "respond_tag_only": {
            "type": "boolean",
            "title": "Respond Tag Only"
          },
          "respond_to_bots": {
            "type": "boolean",
            "title": "Respond To Bots"
          },
          "is_ephemeral": {
            "type": "boolean",
            "title": "Is Ephemeral"
          },
          "respond_member_group_list": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Respond Member Group List"
          },
          "answer_filters": {
            "items": {
              "anyOf": [
                {
                  "type": "string",
                  "const": "well_answered_postfilter"
                },
                {
                  "type": "string",
                  "const": "questionmark_prefilter"
                }
              ]
            },
            "type": "array",
            "title": "Answer Filters"
          },
          "follow_up_tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Follow Up Tags"
          },
          "show_continue_in_web_ui": {
            "type": "boolean",
            "title": "Show Continue In Web Ui"
          },
          "disabled": {
            "type": "boolean",
            "title": "Disabled"
          }
        },
        "type": "object",
        "required": [
          "channel_name"
        ],
        "title": "ChannelConfig",
        "description": "NOTE: is a `TypedDict` so it can be used as a type hint for a JSONB column\nin Postgres"
      },
      "ChatBackgroundRequest": {
        "properties": {
          "chat_background": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chat Background"
          }
        },
        "type": "object",
        "required": [
          "chat_background"
        ],
        "title": "ChatBackgroundRequest"
      },
      "ChatCompletionRequest": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model"
          },
          "messages": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Messages"
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "tool_choice": {
            "title": "Tool Choice"
          },
          "stream": {
            "type": "boolean",
            "title": "Stream",
            "default": false
          },
          "max_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens"
          },
          "max_completion_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Completion Tokens"
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "reasoning_effort": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning Effort"
          },
          "response_format": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Format"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "model",
          "messages"
        ],
        "title": "ChatCompletionRequest",
        "description": "Unknown params (e.g. ``reasoningSummary`` from opencode) must be\naccepted and ignored, not rejected."
      },
      "ChatFeedbackRequest": {
        "properties": {
          "chat_message_id": {
            "type": "integer",
            "title": "Chat Message Id"
          },
          "is_positive": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Positive"
          },
          "feedback_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Feedback Text"
          },
          "predefined_feedback": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Predefined Feedback"
          }
        },
        "type": "object",
        "required": [
          "chat_message_id"
        ],
        "title": "ChatFeedbackRequest"
      },
      "ChatFileType": {
        "type": "string",
        "enum": [
          "image",
          "document",
          "plain_text",
          "tabular"
        ],
        "title": "ChatFileType"
      },
      "ChatFullResponse": {
        "properties": {
          "answer": {
            "type": "string",
            "title": "Answer"
          },
          "answer_citationless": {
            "type": "string",
            "title": "Answer Citationless"
          },
          "pre_answer_reasoning": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pre Answer Reasoning"
          },
          "tool_calls": {
            "items": {
              "$ref": "#/components/schemas/ToolCallResponse"
            },
            "type": "array",
            "title": "Tool Calls",
            "default": []
          },
          "top_documents": {
            "items": {
              "$ref": "#/components/schemas/SearchDoc"
            },
            "type": "array",
            "title": "Top Documents"
          },
          "citation_info": {
            "items": {
              "$ref": "#/components/schemas/CitationInfo"
            },
            "type": "array",
            "title": "Citation Info"
          },
          "message_id": {
            "type": "integer",
            "title": "Message Id"
          },
          "chat_session_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chat Session Id"
          },
          "incognito": {
            "type": "boolean",
            "title": "Incognito",
            "default": false
          },
          "error_msg": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Msg"
          }
        },
        "type": "object",
        "required": [
          "answer",
          "answer_citationless",
          "top_documents",
          "citation_info",
          "message_id"
        ],
        "title": "ChatFullResponse",
        "description": "Complete non-streaming response with all available data.\nNOTE: This model is used for the core flow of the Onyx application, any changes to it should be reviewed and approved by an\nexperienced team member. It is very important to 1. avoid bloat and 2. that this remains backwards compatible across versions."
      },
      "ChatHeartbeat": {
        "properties": {
          "type": {
            "type": "string",
            "const": "chat_heartbeat",
            "title": "Type",
            "default": "chat_heartbeat"
          }
        },
        "type": "object",
        "title": "ChatHeartbeat"
      },
      "ChatMessageDetail": {
        "properties": {
          "chat_session_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chat Session Id"
          },
          "message_id": {
            "type": "integer",
            "title": "Message Id"
          },
          "parent_message": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Message"
          },
          "latest_child_message": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latest Child Message"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "reasoning_tokens": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning Tokens"
          },
          "message_type": {
            "$ref": "#/components/schemas/MessageType"
          },
          "context_docs": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SavedSearchDoc"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context Docs"
          },
          "citations": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Citations"
          },
          "time_sent": {
            "type": "string",
            "format": "date-time",
            "title": "Time Sent"
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/FileDescriptor"
            },
            "type": "array",
            "title": "Files"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "current_feedback": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Feedback"
          },
          "processing_duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Processing Duration Seconds"
          },
          "preferred_response_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preferred Response Id"
          },
          "model_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Display Name"
          },
          "request_params": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Params"
          }
        },
        "type": "object",
        "required": [
          "message_id",
          "message",
          "message_type",
          "time_sent",
          "files"
        ],
        "title": "ChatMessageDetail"
      },
      "ChatMessageIdentifier": {
        "properties": {
          "message_id": {
            "type": "integer",
            "title": "Message Id"
          }
        },
        "type": "object",
        "required": [
          "message_id"
        ],
        "title": "ChatMessageIdentifier"
      },
      "ChatMinimalTextMessage": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          },
          "message_type": {
            "$ref": "#/components/schemas/MessageType"
          }
        },
        "type": "object",
        "required": [
          "message",
          "message_type"
        ],
        "title": "ChatMinimalTextMessage"
      },
      "ChatRenameRequest": {
        "properties": {
          "chat_session_id": {
            "type": "string",
            "format": "uuid",
            "title": "Chat Session Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "chat_session_id"
        ],
        "title": "ChatRenameRequest"
      },
      "ChatSearchResponse": {
        "properties": {
          "groups": {
            "items": {
              "$ref": "#/components/schemas/ChatSessionGroup"
            },
            "type": "array",
            "title": "Groups"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More"
          },
          "next_page": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page"
          }
        },
        "type": "object",
        "required": [
          "groups",
          "has_more"
        ],
        "title": "ChatSearchResponse"
      },
      "ChatSessionCreationRequest": {
        "properties": {
          "persona_id": {
            "type": "integer",
            "title": "Persona Id",
            "default": 0
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "school_class_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "School Class Id"
          },
          "incognito": {
            "type": "boolean",
            "title": "Incognito",
            "default": false
          },
          "incognito_session_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Incognito Session Id"
          }
        },
        "type": "object",
        "title": "ChatSessionCreationRequest"
      },
      "ChatSessionDetailResponse": {
        "properties": {
          "chat_session_id": {
            "type": "string",
            "format": "uuid",
            "title": "Chat Session Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "persona_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Persona Id"
          },
          "persona_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Persona Name"
          },
          "personal_icon_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Personal Icon Name"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/ChatMessageDetail"
            },
            "type": "array",
            "title": "Messages"
          },
          "time_created": {
            "type": "string",
            "format": "date-time",
            "title": "Time Created"
          },
          "shared_status": {
            "$ref": "#/components/schemas/ChatSessionSharedStatus"
          },
          "current_alternate_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Alternate Model"
          },
          "current_temperature_override": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Temperature Override"
          },
          "current_reasoning_effort_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Reasoning Effort Override"
          },
          "deleted": {
            "type": "boolean",
            "title": "Deleted",
            "default": false
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name"
          },
          "packets": {
            "items": {
              "items": {
                "$ref": "#/components/schemas/Packet"
              },
              "type": "array"
            },
            "type": "array",
            "title": "Packets"
          },
          "current_run": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CurrentRunInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "incognito": {
            "type": "boolean",
            "title": "Incognito",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "chat_session_id",
          "description",
          "persona_name",
          "personal_icon_name",
          "messages",
          "time_created",
          "shared_status",
          "current_alternate_model",
          "current_temperature_override",
          "current_reasoning_effort_override",
          "packets"
        ],
        "title": "ChatSessionDetailResponse"
      },
      "ChatSessionDetails": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "persona_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Persona Id"
          },
          "time_created": {
            "type": "string",
            "title": "Time Created"
          },
          "time_updated": {
            "type": "string",
            "title": "Time Updated"
          },
          "shared_status": {
            "$ref": "#/components/schemas/ChatSessionSharedStatus"
          },
          "current_alternate_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Alternate Model"
          },
          "current_temperature_override": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Temperature Override"
          },
          "current_reasoning_effort_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Reasoning Effort Override"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "time_created",
          "time_updated",
          "shared_status"
        ],
        "title": "ChatSessionDetails"
      },
      "ChatSessionGroup": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title"
          },
          "chats": {
            "items": {
              "$ref": "#/components/schemas/ChatSessionSummary"
            },
            "type": "array",
            "title": "Chats"
          }
        },
        "type": "object",
        "required": [
          "title",
          "chats"
        ],
        "title": "ChatSessionGroup"
      },
      "ChatSessionMinimal": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "user_email": {
            "type": "string",
            "title": "User Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "first_user_message": {
            "type": "string",
            "title": "First User Message"
          },
          "first_ai_message": {
            "type": "string",
            "title": "First Ai Message"
          },
          "assistant_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assistant Id"
          },
          "assistant_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assistant Name"
          },
          "time_created": {
            "type": "string",
            "format": "date-time",
            "title": "Time Created"
          },
          "feedback_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/QAFeedbackType"
              },
              {
                "type": "null"
              }
            ]
          },
          "flow_type": {
            "$ref": "#/components/schemas/SessionType"
          },
          "conversation_length": {
            "type": "integer",
            "title": "Conversation Length"
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_email",
          "name",
          "first_user_message",
          "first_ai_message",
          "assistant_id",
          "assistant_name",
          "time_created",
          "feedback_type",
          "flow_type",
          "conversation_length"
        ],
        "title": "ChatSessionMinimal"
      },
      "ChatSessionRequest": {
        "properties": {
          "chat_session_id": {
            "type": "string",
            "title": "Chat Session Id"
          }
        },
        "type": "object",
        "required": [
          "chat_session_id"
        ],
        "title": "ChatSessionRequest"
      },
      "ChatSessionSharedStatus": {
        "type": "string",
        "enum": [
          "public",
          "private"
        ],
        "title": "ChatSessionSharedStatus"
      },
      "ChatSessionSnapshot": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "user_email": {
            "type": "string",
            "title": "User Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/MessageSnapshot"
            },
            "type": "array",
            "title": "Messages"
          },
          "assistant_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assistant Id"
          },
          "assistant_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assistant Name"
          },
          "time_created": {
            "type": "string",
            "format": "date-time",
            "title": "Time Created"
          },
          "flow_type": {
            "$ref": "#/components/schemas/SessionType"
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_email",
          "name",
          "messages",
          "assistant_id",
          "assistant_name",
          "time_created",
          "flow_type"
        ],
        "title": "ChatSessionSnapshot"
      },
      "ChatSessionSummary": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "persona_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Persona Id"
          },
          "time_created": {
            "type": "string",
            "format": "date-time",
            "title": "Time Created"
          },
          "shared_status": {
            "$ref": "#/components/schemas/ChatSessionSharedStatus"
          },
          "current_alternate_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Alternate Model"
          },
          "current_temperature_override": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Temperature Override"
          },
          "current_reasoning_effort_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Reasoning Effort Override"
          }
        },
        "type": "object",
        "required": [
          "id",
          "time_created",
          "shared_status"
        ],
        "title": "ChatSessionSummary"
      },
      "ChatSessionUpdateRequest": {
        "properties": {
          "sharing_status": {
            "$ref": "#/components/schemas/ChatSessionSharedStatus"
          }
        },
        "type": "object",
        "required": [
          "sharing_status"
        ],
        "title": "ChatSessionUpdateRequest"
      },
      "ChatSessionsResponse": {
        "properties": {
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/ChatSessionDetails"
            },
            "type": "array",
            "title": "Sessions"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "sessions"
        ],
        "title": "ChatSessionsResponse"
      },
      "CheckDocSetPublicRequest": {
        "properties": {
          "document_set_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Document Set Ids"
          }
        },
        "type": "object",
        "required": [
          "document_set_ids"
        ],
        "title": "CheckDocSetPublicRequest",
        "description": "Note that this does not mean that the Document Set itself is to be viewable by everyone\nRather, this refers to the CC-Pairs in the Document Set, and if every CC-Pair is public"
      },
      "CheckDocSetPublicResponse": {
        "properties": {
          "is_public": {
            "type": "boolean",
            "title": "Is Public"
          }
        },
        "type": "object",
        "required": [
          "is_public"
        ],
        "title": "CheckDocSetPublicResponse"
      },
      "ChosenDefaultModelRequest": {
        "properties": {
          "default_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Model"
          }
        },
        "type": "object",
        "title": "ChosenDefaultModelRequest"
      },
      "ChunkInfo": {
        "properties": {
          "content": {
            "type": "string",
            "title": "Content"
          },
          "num_tokens": {
            "type": "integer",
            "title": "Num Tokens"
          }
        },
        "type": "object",
        "required": [
          "content",
          "num_tokens"
        ],
        "title": "ChunkInfo"
      },
      "CitationInfo": {
        "properties": {
          "type": {
            "type": "string",
            "const": "citation_info",
            "title": "Type",
            "default": "citation_info"
          },
          "citation_number": {
            "type": "integer",
            "title": "Citation Number"
          },
          "document_id": {
            "type": "string",
            "title": "Document Id"
          }
        },
        "type": "object",
        "required": [
          "citation_number",
          "document_id"
        ],
        "title": "CitationInfo"
      },
      "CloudEmbeddingProvider": {
        "properties": {
          "provider_type": {
            "$ref": "#/components/schemas/EmbeddingProvider"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "api_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Url"
          },
          "api_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Version"
          },
          "deployment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deployment Name"
          }
        },
        "type": "object",
        "required": [
          "provider_type"
        ],
        "title": "CloudEmbeddingProvider"
      },
      "CloudEmbeddingProviderCreationRequest": {
        "properties": {
          "provider_type": {
            "$ref": "#/components/schemas/EmbeddingProvider"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "api_key_changed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key Changed"
          },
          "api_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Url"
          },
          "api_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Version"
          },
          "deployment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deployment Name"
          }
        },
        "type": "object",
        "required": [
          "provider_type"
        ],
        "title": "CloudEmbeddingProviderCreationRequest"
      },
      "CodeInterpreterServer": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          }
        },
        "type": "object",
        "required": [
          "enabled"
        ],
        "title": "CodeInterpreterServer"
      },
      "CodeInterpreterServerHealth": {
        "properties": {
          "connected": {
            "type": "boolean",
            "title": "Connected"
          },
          "error": {
            "type": "string",
            "title": "Error",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "connected"
        ],
        "title": "CodeInterpreterServerHealth"
      },
      "CodingAgentFinal": {
        "properties": {
          "type": {
            "type": "string",
            "const": "coding_agent_final",
            "title": "Type",
            "default": "coding_agent_final"
          },
          "answer": {
            "type": "string",
            "title": "Answer"
          }
        },
        "type": "object",
        "required": [
          "answer"
        ],
        "title": "CodingAgentFinal"
      },
      "CodingAgentStart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "coding_agent_start",
            "title": "Type",
            "default": "coding_agent_start"
          },
          "query": {
            "type": "string",
            "title": "Query"
          },
          "repo": {
            "type": "string",
            "title": "Repo"
          }
        },
        "type": "object",
        "required": [
          "query",
          "repo"
        ],
        "title": "CodingAgentStart"
      },
      "CodingAgentThinkingDelta": {
        "properties": {
          "type": {
            "type": "string",
            "const": "coding_agent_thinking_delta",
            "title": "Type",
            "default": "coding_agent_thinking_delta"
          },
          "content": {
            "type": "string",
            "title": "Content"
          }
        },
        "type": "object",
        "required": [
          "content"
        ],
        "title": "CodingAgentThinkingDelta"
      },
      "ComparisonAssessment": {
        "type": "string",
        "enum": [
          "supported",
          "conflicting",
          "needs_checking"
        ],
        "title": "ComparisonAssessment",
        "description": "A student's own comparison judgment, never a system certification."
      },
      "ComparisonClaim": {
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "title": "Id"
          },
          "claim": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 1,
            "title": "Claim"
          },
          "response_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "maxItems": 3,
            "minItems": 1,
            "title": "Response Ids"
          },
          "evidence": {
            "items": {
              "$ref": "#/components/schemas/ComparisonEvidenceReference"
            },
            "type": "array",
            "maxItems": 12,
            "title": "Evidence"
          },
          "assessment": {
            "$ref": "#/components/schemas/ComparisonAssessment"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "claim",
          "response_ids",
          "evidence",
          "assessment"
        ],
        "title": "ComparisonClaim"
      },
      "ComparisonEvidenceReference": {
        "properties": {
          "response_id": {
            "type": "integer",
            "title": "Response Id"
          },
          "citation_number": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Citation Number"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "response_id",
          "citation_number"
        ],
        "title": "ComparisonEvidenceReference"
      },
      "ComparisonResponseMetadata": {
        "properties": {
          "response_id": {
            "type": "integer",
            "title": "Response Id"
          },
          "model_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Display Name"
          },
          "status": {
            "type": "string",
            "title": "Status"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "response_id",
          "model_display_name",
          "status"
        ],
        "title": "ComparisonResponseMetadata"
      },
      "ComparisonWorksheetPutRequest": {
        "properties": {
          "base_revision": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Base Revision"
          },
          "response_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "maxItems": 3,
            "minItems": 2,
            "title": "Response Ids"
          },
          "claims": {
            "items": {
              "$ref": "#/components/schemas/ComparisonClaim"
            },
            "type": "array",
            "maxItems": 12,
            "title": "Claims"
          },
          "unresolved_questions": {
            "type": "string",
            "maxLength": 4000,
            "title": "Unresolved Questions"
          },
          "student_rationale": {
            "type": "string",
            "maxLength": 4000,
            "title": "Student Rationale"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "base_revision",
          "response_ids",
          "claims",
          "unresolved_questions",
          "student_rationale"
        ],
        "title": "ComparisonWorksheetPutRequest"
      },
      "ComparisonWorksheetResponse": {
        "properties": {
          "parent_message_id": {
            "type": "integer",
            "title": "Parent Message Id"
          },
          "revision": {
            "type": "integer",
            "title": "Revision"
          },
          "time_created": {
            "type": "string",
            "format": "date-time",
            "title": "Time Created"
          },
          "time_updated": {
            "type": "string",
            "format": "date-time",
            "title": "Time Updated"
          },
          "response_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Response Ids"
          },
          "claims": {
            "items": {
              "$ref": "#/components/schemas/ComparisonClaim"
            },
            "type": "array",
            "title": "Claims"
          },
          "unresolved_questions": {
            "type": "string",
            "title": "Unresolved Questions"
          },
          "student_rationale": {
            "type": "string",
            "title": "Student Rationale"
          },
          "responses": {
            "items": {
              "$ref": "#/components/schemas/ComparisonResponseMetadata"
            },
            "type": "array",
            "title": "Responses"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "parent_message_id",
          "revision",
          "time_created",
          "time_updated",
          "response_ids",
          "claims",
          "unresolved_questions",
          "student_rationale",
          "responses"
        ],
        "title": "ComparisonWorksheetResponse"
      },
      "ConfigurationSchemaResponse": {
        "properties": {
          "configuration": {
            "additionalProperties": true,
            "type": "object",
            "title": "Configuration"
          }
        },
        "type": "object",
        "required": [
          "configuration"
        ],
        "title": "ConfigurationSchemaResponse",
        "description": "Response for configuration schema specification"
      },
      "ConnectAppDecision": {
        "type": "string",
        "enum": [
          "connected",
          "declined"
        ],
        "title": "ConnectAppDecision"
      },
      "ConnectAppDecisionRequest": {
        "properties": {
          "decision": {
            "$ref": "#/components/schemas/ConnectAppDecision"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "decision"
        ],
        "title": "ConnectAppDecisionRequest"
      },
      "ConnectorCredentialPairDescriptor": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "connector": {
            "$ref": "#/components/schemas/ConnectorSnapshot"
          },
          "credential": {
            "$ref": "#/components/schemas/CredentialSnapshot"
          },
          "access_type": {
            "$ref": "#/components/schemas/AccessType"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "connector",
          "credential",
          "access_type"
        ],
        "title": "ConnectorCredentialPairDescriptor"
      },
      "ConnectorCredentialPairIdentifier": {
        "properties": {
          "connector_id": {
            "type": "integer",
            "title": "Connector Id"
          },
          "credential_id": {
            "type": "integer",
            "title": "Credential Id"
          }
        },
        "type": "object",
        "required": [
          "connector_id",
          "credential_id"
        ],
        "title": "ConnectorCredentialPairIdentifier"
      },
      "ConnectorCredentialPairMetadata": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "access_type": {
            "$ref": "#/components/schemas/AccessType"
          },
          "auto_sync_options": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Sync Options"
          },
          "groups": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Groups"
          },
          "processing_mode": {
            "$ref": "#/components/schemas/ProcessingMode",
            "default": "REGULAR"
          }
        },
        "type": "object",
        "required": [
          "name",
          "access_type"
        ],
        "title": "ConnectorCredentialPairMetadata"
      },
      "ConnectorCredentialPairStatus": {
        "type": "string",
        "enum": [
          "SCHEDULED",
          "INITIAL_INDEXING",
          "ACTIVE",
          "PAUSED",
          "DELETING",
          "INVALID"
        ],
        "title": "ConnectorCredentialPairStatus"
      },
      "ConnectorFileInfo": {
        "properties": {
          "file_id": {
            "type": "string",
            "title": "File Id"
          },
          "file_name": {
            "type": "string",
            "title": "File Name"
          },
          "file_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Size"
          },
          "upload_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Upload Date"
          }
        },
        "type": "object",
        "required": [
          "file_id",
          "file_name"
        ],
        "title": "ConnectorFileInfo"
      },
      "ConnectorFilesResponse": {
        "properties": {
          "files": {
            "items": {
              "$ref": "#/components/schemas/ConnectorFileInfo"
            },
            "type": "array",
            "title": "Files"
          }
        },
        "type": "object",
        "required": [
          "files"
        ],
        "title": "ConnectorFilesResponse"
      },
      "ConnectorIndexingStatusLite": {
        "properties": {
          "cc_pair_id": {
            "type": "integer",
            "title": "Cc Pair Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "source": {
            "$ref": "#/components/schemas/DocumentSource"
          },
          "access_type": {
            "$ref": "#/components/schemas/AccessType"
          },
          "cc_pair_status": {
            "$ref": "#/components/schemas/ConnectorCredentialPairStatus"
          },
          "in_progress": {
            "type": "boolean",
            "title": "In Progress"
          },
          "in_repeated_error_state": {
            "type": "boolean",
            "title": "In Repeated Error State"
          },
          "last_finished_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IndexingStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IndexingStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_success": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Success"
          },
          "is_editable": {
            "type": "boolean",
            "title": "Is Editable"
          },
          "permissions": {
            "additionalProperties": {
              "type": "boolean"
            },
            "type": "object",
            "title": "Permissions"
          },
          "docs_indexed": {
            "type": "integer",
            "title": "Docs Indexed"
          },
          "latest_index_attempt_docs_indexed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latest Index Attempt Docs Indexed"
          }
        },
        "type": "object",
        "required": [
          "cc_pair_id",
          "name",
          "source",
          "access_type",
          "cc_pair_status",
          "in_progress",
          "in_repeated_error_state",
          "last_finished_status",
          "last_status",
          "last_success",
          "is_editable",
          "permissions",
          "docs_indexed",
          "latest_index_attempt_docs_indexed"
        ],
        "title": "ConnectorIndexingStatusLite"
      },
      "ConnectorIndexingStatusLiteResponse": {
        "properties": {
          "source": {
            "$ref": "#/components/schemas/DocumentSource"
          },
          "summary": {
            "$ref": "#/components/schemas/SourceSummary"
          },
          "current_page": {
            "type": "integer",
            "title": "Current Page"
          },
          "total_pages": {
            "type": "integer",
            "title": "Total Pages"
          },
          "indexing_statuses": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ConnectorIndexingStatusLite"
                },
                {
                  "$ref": "#/components/schemas/FederatedConnectorStatus"
                }
              ]
            },
            "type": "array",
            "title": "Indexing Statuses"
          }
        },
        "type": "object",
        "required": [
          "source",
          "summary",
          "current_page",
          "total_pages",
          "indexing_statuses"
        ],
        "title": "ConnectorIndexingStatusLiteResponse"
      },
      "ConnectorRequestSubmission": {
        "properties": {
          "connector_name": {
            "type": "string",
            "title": "Connector Name"
          }
        },
        "type": "object",
        "required": [
          "connector_name"
        ],
        "title": "ConnectorRequestSubmission"
      },
      "ConnectorSnapshot": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "source": {
            "$ref": "#/components/schemas/DocumentSource"
          },
          "input_type": {
            "$ref": "#/components/schemas/InputType"
          },
          "connector_specific_config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Connector Specific Config"
          },
          "refresh_freq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Refresh Freq"
          },
          "prune_freq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prune Freq"
          },
          "indexing_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Indexing Start"
          },
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "credential_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Credential Ids"
          },
          "time_created": {
            "type": "string",
            "format": "date-time",
            "title": "Time Created"
          },
          "time_updated": {
            "type": "string",
            "format": "date-time",
            "title": "Time Updated"
          }
        },
        "type": "object",
        "required": [
          "name",
          "source",
          "input_type",
          "connector_specific_config",
          "id",
          "credential_ids",
          "time_created",
          "time_updated"
        ],
        "title": "ConnectorSnapshot"
      },
      "ConnectorStatus": {
        "properties": {
          "cc_pair_id": {
            "type": "integer",
            "title": "Cc Pair Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "connector": {
            "$ref": "#/components/schemas/ConnectorSnapshot"
          },
          "credential": {
            "$ref": "#/components/schemas/CredentialSnapshot"
          },
          "access_type": {
            "$ref": "#/components/schemas/AccessType"
          },
          "groups": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Groups"
          }
        },
        "type": "object",
        "required": [
          "cc_pair_id",
          "name",
          "connector",
          "credential",
          "access_type",
          "groups"
        ],
        "title": "ConnectorStatus",
        "description": "Represents the status of a connector,\nincluding indexing status elated information"
      },
      "ConnectorUpdateRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "source": {
            "$ref": "#/components/schemas/DocumentSource"
          },
          "input_type": {
            "$ref": "#/components/schemas/InputType"
          },
          "connector_specific_config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Connector Specific Config"
          },
          "refresh_freq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Refresh Freq"
          },
          "prune_freq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prune Freq"
          },
          "indexing_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Indexing Start"
          },
          "access_type": {
            "$ref": "#/components/schemas/AccessType"
          },
          "groups": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Groups"
          }
        },
        "type": "object",
        "required": [
          "name",
          "source",
          "input_type",
          "connector_specific_config",
          "access_type"
        ],
        "title": "ConnectorUpdateRequest"
      },
      "ContainerVersions": {
        "properties": {
          "onyx": {
            "type": "string",
            "title": "Onyx"
          },
          "relational_db": {
            "type": "string",
            "title": "Relational Db"
          },
          "index": {
            "type": "string",
            "title": "Index"
          },
          "nginx": {
            "type": "string",
            "title": "Nginx"
          }
        },
        "type": "object",
        "required": [
          "onyx",
          "relational_db",
          "index",
          "nginx"
        ],
        "title": "ContainerVersions"
      },
      "ContextualRagModelUpdateResponse": {
        "properties": {
          "contextual_rag_model_configuration_id": {
            "type": "integer",
            "title": "Contextual Rag Model Configuration Id"
          }
        },
        "type": "object",
        "required": [
          "contextual_rag_model_configuration_id"
        ],
        "title": "ContextualRagModelUpdateResponse"
      },
      "CostOverride": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "input_cost_per_mtok": {
            "type": "number",
            "title": "Input Cost Per Mtok"
          },
          "output_cost_per_mtok": {
            "type": "number",
            "title": "Output Cost Per Mtok"
          },
          "cache_read_cost_per_mtok": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Read Cost Per Mtok"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "model",
          "provider",
          "input_cost_per_mtok",
          "output_cost_per_mtok",
          "cache_read_cost_per_mtok",
          "updated_at"
        ],
        "title": "CostOverride"
      },
      "CostOverrideUpsertRequest": {
        "properties": {
          "model": {
            "type": "string",
            "minLength": 1,
            "title": "Model"
          },
          "provider": {
            "type": "string",
            "title": "Provider",
            "default": ""
          },
          "input_cost_per_mtok": {
            "type": "number",
            "minimum": 0.0,
            "title": "Input Cost Per Mtok"
          },
          "output_cost_per_mtok": {
            "type": "number",
            "minimum": 0.0,
            "title": "Output Cost Per Mtok"
          },
          "cache_read_cost_per_mtok": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Read Cost Per Mtok"
          }
        },
        "type": "object",
        "required": [
          "model",
          "input_cost_per_mtok",
          "output_cost_per_mtok"
        ],
        "title": "CostOverrideUpsertRequest"
      },
      "CreateBuiltInExternalAppRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "app_type": {
            "$ref": "#/components/schemas/ExternalAppType"
          },
          "upstream_url_patterns": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Upstream Url Patterns"
          },
          "auth_template": {
            "additionalProperties": true,
            "type": "object",
            "title": "Auth Template"
          },
          "organization_credentials": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Organization Credentials"
          },
          "action_policies": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/EndpointPolicy"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Action Policies"
          }
        },
        "type": "object",
        "required": [
          "name",
          "app_type",
          "upstream_url_patterns",
          "auth_template",
          "organization_credentials"
        ],
        "title": "CreateBuiltInExternalAppRequest",
        "description": "Create a built-in external app (``POST /admin/apps/built-in``).\n\nBuilt-in providers only \u2014 ``app_type=CUSTOM`` is rejected (custom apps use\n``POST /admin/apps/custom``). Updates go through ``PATCH /admin/apps/{id}``.\n\nA new row is inserted (and a backing ``Skill`` row is created in the same\ntransaction). ``upstream_url_patterns`` is a list of regex patterns matched\nby the egress proxy against outbound request URLs.\n\nSkill identity (name, bundle bytes, sharing scope) is derived server-side\nfrom ``app_type``; admins don't supply it. New apps are enabled by default."
      },
      "CreateChatSessionID": {
        "properties": {
          "chat_session_id": {
            "type": "string",
            "format": "uuid",
            "title": "Chat Session Id"
          },
          "incognito": {
            "type": "boolean",
            "title": "Incognito",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "chat_session_id"
        ],
        "title": "CreateChatSessionID"
      },
      "CreateCheckoutSessionRequest": {
        "properties": {
          "billing_period": {
            "type": "string",
            "enum": [
              "monthly",
              "annual"
            ],
            "title": "Billing Period",
            "default": "monthly"
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          }
        },
        "type": "object",
        "title": "CreateCheckoutSessionRequest",
        "description": "Request to create a Stripe checkout session."
      },
      "CreateCheckoutSessionResponse": {
        "properties": {
          "stripe_checkout_url": {
            "type": "string",
            "title": "Stripe Checkout Url"
          }
        },
        "type": "object",
        "required": [
          "stripe_checkout_url"
        ],
        "title": "CreateCheckoutSessionResponse",
        "description": "Response containing the Stripe checkout session URL."
      },
      "CreateClassRequest": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 160,
            "minLength": 1,
            "title": "Name"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "CreateClassRequest"
      },
      "CreateCustomExternalAppRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "upstream_url_patterns": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Upstream Url Patterns"
          },
          "auth_template": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Auth Template"
          },
          "organization_credentials": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Organization Credentials"
          }
        },
        "type": "object",
        "required": [
          "name",
          "upstream_url_patterns",
          "auth_template",
          "organization_credentials"
        ],
        "title": "CreateCustomExternalAppRequest",
        "description": "Create a custom external-app gateway without creating skill content."
      },
      "CreateCustomerPortalSessionRequest": {
        "properties": {
          "return_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url"
          },
          "flow_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StripePortalFlowType"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "CreateCustomerPortalSessionRequest",
        "description": "Request to create a Stripe customer portal session."
      },
      "CreateCustomerPortalSessionResponse": {
        "properties": {
          "stripe_customer_portal_url": {
            "type": "string",
            "title": "Stripe Customer Portal Url"
          }
        },
        "type": "object",
        "required": [
          "stripe_customer_portal_url"
        ],
        "title": "CreateCustomerPortalSessionResponse",
        "description": "Response containing the Stripe customer portal URL."
      },
      "CreateDirectoryRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "parent_path": {
            "type": "string",
            "title": "Parent Path",
            "default": "/"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "CreateDirectoryRequest"
      },
      "CreateInputPromptRequest": {
        "properties": {
          "prompt": {
            "type": "string",
            "title": "Prompt"
          },
          "content": {
            "type": "string",
            "title": "Content"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public"
          }
        },
        "type": "object",
        "required": [
          "prompt",
          "content",
          "is_public"
        ],
        "title": "CreateInputPromptRequest"
      },
      "CreateSchoolInvitationRequest": {
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 320,
            "minLength": 3,
            "title": "Email"
          },
          "role": {
            "$ref": "#/components/schemas/SchoolMembershipRole"
          },
          "class_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "maxItems": 100,
            "title": "Class Ids"
          },
          "expires_days": {
            "type": "integer",
            "maximum": 30.0,
            "minimum": 1.0,
            "title": "Expires Days",
            "default": 7
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "email",
          "role"
        ],
        "title": "CreateSchoolInvitationRequest"
      },
      "CreateSkillRequest": {
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 160,
            "minLength": 1,
            "title": "Title"
          },
          "instructions_markdown": {
            "type": "string",
            "maxLength": 32000,
            "minLength": 1,
            "title": "Instructions Markdown"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "title",
          "instructions_markdown"
        ],
        "title": "CreateSkillRequest"
      },
      "CreateTokenRequest": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "description": "Human-readable token name"
          },
          "expiration_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Expiration Days",
            "description": "Days until expiration. Common values: 7, 30, 365, or null (no expiration). Must be >= 1 if provided."
          },
          "scopes": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Permission"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scopes",
            "description": "API-surface scopes to limit this token to. null = full user access."
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "CreateTokenRequest"
      },
      "CreateVersionRequest": {
        "properties": {
          "instructions_markdown": {
            "type": "string",
            "maxLength": 32000,
            "minLength": 1,
            "title": "Instructions Markdown"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "instructions_markdown"
        ],
        "title": "CreateVersionRequest"
      },
      "CreatedSchoolInvitationResponse": {
        "properties": {
          "invitation_id": {
            "type": "string",
            "format": "uuid",
            "title": "Invitation Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "role": {
            "$ref": "#/components/schemas/SchoolMembershipRole"
          },
          "class_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Class Ids"
          },
          "classes": {
            "items": {
              "$ref": "#/components/schemas/SchoolInvitationClassResponse"
            },
            "type": "array",
            "title": "Classes"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
          },
          "status": {
            "$ref": "#/components/schemas/SchoolInvitationStatus"
          },
          "token": {
            "type": "string",
            "title": "Token"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "invitation_id",
          "email",
          "role",
          "class_ids",
          "classes",
          "expires_at",
          "status",
          "token"
        ],
        "title": "CreatedSchoolInvitationResponse"
      },
      "CreatedTokenResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "token_display": {
            "type": "string",
            "title": "Token Display"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "scopes": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Permission"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scopes"
          },
          "token": {
            "type": "string",
            "title": "Token"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "token_display",
          "created_at",
          "expires_at",
          "last_used_at",
          "scopes",
          "token"
        ],
        "title": "CreatedTokenResponse"
      },
      "CredentialBase": {
        "properties": {
          "credential_json": {
            "additionalProperties": true,
            "type": "object",
            "title": "Credential Json"
          },
          "admin_public": {
            "type": "boolean",
            "title": "Admin Public"
          },
          "source": {
            "$ref": "#/components/schemas/DocumentSource"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "curator_public": {
            "type": "boolean",
            "title": "Curator Public",
            "default": false
          },
          "groups": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Groups"
          }
        },
        "type": "object",
        "required": [
          "credential_json",
          "admin_public",
          "source"
        ],
        "title": "CredentialBase"
      },
      "CredentialCapability": {
        "type": "string",
        "enum": [
          "indexing",
          "doc_permission_sync",
          "external_group_sync"
        ],
        "title": "CredentialCapability",
        "description": "User-visible capabilities a credential may or may not support for a source."
      },
      "CredentialCapabilityReport": {
        "properties": {
          "credential_id": {
            "type": "integer",
            "title": "Credential Id"
          },
          "source": {
            "$ref": "#/components/schemas/DocumentSource"
          },
          "connector_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connector Id"
          },
          "checked_at": {
            "type": "string",
            "format": "date-time",
            "title": "Checked At"
          },
          "trigger": {
            "$ref": "#/components/schemas/CapabilityCheckTrigger"
          },
          "verdicts": {
            "additionalProperties": {
              "$ref": "#/components/schemas/CapabilityVerdict"
            },
            "propertyNames": {
              "$ref": "#/components/schemas/CredentialCapability"
            },
            "type": "object",
            "title": "Verdicts"
          },
          "check_results": {
            "items": {
              "$ref": "#/components/schemas/CapabilityCheckResult"
            },
            "type": "array",
            "title": "Check Results"
          }
        },
        "type": "object",
        "required": [
          "credential_id",
          "source",
          "checked_at",
          "trigger",
          "verdicts",
          "check_results"
        ],
        "title": "CredentialCapabilityReport",
        "description": "The full outcome of one capability-check run for a credential."
      },
      "CredentialDataUpdateRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "credential_json": {
            "additionalProperties": true,
            "type": "object",
            "title": "Credential Json"
          }
        },
        "type": "object",
        "required": [
          "name",
          "credential_json"
        ],
        "title": "CredentialDataUpdateRequest"
      },
      "CredentialSchemaResponse": {
        "properties": {
          "credentials": {
            "additionalProperties": true,
            "type": "object",
            "title": "Credentials"
          }
        },
        "type": "object",
        "required": [
          "credentials"
        ],
        "title": "CredentialSchemaResponse",
        "description": "Response for credential schema specification"
      },
      "CredentialSnapshot": {
        "properties": {
          "credential_json": {
            "additionalProperties": true,
            "type": "object",
            "title": "Credential Json"
          },
          "admin_public": {
            "type": "boolean",
            "title": "Admin Public"
          },
          "source": {
            "$ref": "#/components/schemas/DocumentSource"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "curator_public": {
            "type": "boolean",
            "title": "Curator Public",
            "default": false
          },
          "groups": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Groups"
          },
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email"
          },
          "time_created": {
            "type": "string",
            "format": "date-time",
            "title": "Time Created"
          },
          "time_updated": {
            "type": "string",
            "format": "date-time",
            "title": "Time Updated"
          }
        },
        "type": "object",
        "required": [
          "credential_json",
          "admin_public",
          "source",
          "id",
          "user_id",
          "time_created",
          "time_updated"
        ],
        "title": "CredentialSnapshot"
      },
      "CredentialSwapRequest": {
        "properties": {
          "new_credential_id": {
            "type": "integer",
            "title": "New Credential Id"
          },
          "connector_id": {
            "type": "integer",
            "title": "Connector Id"
          },
          "access_type": {
            "$ref": "#/components/schemas/AccessType"
          }
        },
        "type": "object",
        "required": [
          "new_credential_id",
          "connector_id",
          "access_type"
        ],
        "title": "CredentialSwapRequest"
      },
      "CurrentRunInfo": {
        "properties": {
          "run_id": {
            "type": "integer",
            "title": "Run Id"
          }
        },
        "type": "object",
        "required": [
          "run_id"
        ],
        "title": "CurrentRunInfo",
        "description": "In-flight run whose stream buffer can be replayed/tailed."
      },
      "CustomProviderOption": {
        "properties": {
          "value": {
            "type": "string",
            "title": "Value"
          },
          "label": {
            "type": "string",
            "title": "Label"
          }
        },
        "type": "object",
        "required": [
          "value",
          "label"
        ],
        "title": "CustomProviderOption",
        "description": "A provider slug + human-friendly label for the custom-provider picker."
      },
      "CustomToolArgs": {
        "properties": {
          "type": {
            "type": "string",
            "const": "custom_tool_args",
            "title": "Type",
            "default": "custom_tool_args"
          },
          "tool_name": {
            "type": "string",
            "title": "Tool Name"
          },
          "tool_args": {
            "additionalProperties": true,
            "type": "object",
            "title": "Tool Args"
          }
        },
        "type": "object",
        "required": [
          "tool_name",
          "tool_args"
        ],
        "title": "CustomToolArgs"
      },
      "CustomToolCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "definition": {
            "additionalProperties": true,
            "type": "object",
            "title": "Definition"
          },
          "custom_headers": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Header"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Headers"
          },
          "passthrough_auth": {
            "type": "boolean",
            "title": "Passthrough Auth"
          },
          "oauth_config_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Config Id"
          }
        },
        "type": "object",
        "required": [
          "name",
          "definition",
          "passthrough_auth"
        ],
        "title": "CustomToolCreate"
      },
      "CustomToolDelta": {
        "properties": {
          "type": {
            "type": "string",
            "const": "custom_tool_delta",
            "title": "Type",
            "default": "custom_tool_delta"
          },
          "tool_name": {
            "type": "string",
            "title": "Tool Name"
          },
          "tool_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Id"
          },
          "response_type": {
            "type": "string",
            "title": "Response Type"
          },
          "data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data"
          },
          "file_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Ids"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomToolErrorInfo"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "tool_name",
          "response_type"
        ],
        "title": "CustomToolDelta"
      },
      "CustomToolErrorInfo": {
        "properties": {
          "is_auth_error": {
            "type": "boolean",
            "title": "Is Auth Error",
            "default": false
          },
          "status_code": {
            "type": "integer",
            "title": "Status Code"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "status_code",
          "message"
        ],
        "title": "CustomToolErrorInfo"
      },
      "CustomToolStart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "custom_tool_start",
            "title": "Type",
            "default": "custom_tool_start"
          },
          "tool_name": {
            "type": "string",
            "title": "Tool Name"
          },
          "tool_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Id"
          }
        },
        "type": "object",
        "required": [
          "tool_name"
        ],
        "title": "CustomToolStart"
      },
      "CustomToolUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "definition": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Definition"
          },
          "custom_headers": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Header"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Headers"
          },
          "passthrough_auth": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Passthrough Auth"
          },
          "oauth_config_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Config Id"
          }
        },
        "type": "object",
        "title": "CustomToolUpdate"
      },
      "CustomerTier": {
        "type": "string",
        "enum": [
          "BUSINESS",
          "ENTERPRISE"
        ],
        "title": "CustomerTier",
        "description": "Paid-tier wire format from the control plane (no COMMUNITY)."
      },
      "DailyWeeklyPayload": {
        "properties": {
          "time_of_day": {
            "type": "string",
            "title": "Time Of Day"
          },
          "weekdays": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Weekdays"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "time_of_day"
        ],
        "title": "DailyWeeklyPayload",
        "description": "Validated payload for ``editor_mode == \"daily_weekly\"``.\n\nWeekdays follow the cron convention (0=Sunday .. 6=Saturday). An empty\nlist means \"every day\" \u2014 equivalent to ``*`` in the weekday cron slot."
      },
      "DecisionBody": {
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "APPROVED",
              "REJECTED"
            ],
            "title": "Decision"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "decision"
        ],
        "title": "DecisionBody"
      },
      "DeepResearchPlanDelta": {
        "properties": {
          "type": {
            "type": "string",
            "const": "deep_research_plan_delta",
            "title": "Type",
            "default": "deep_research_plan_delta"
          },
          "content": {
            "type": "string",
            "title": "Content"
          }
        },
        "type": "object",
        "required": [
          "content"
        ],
        "title": "DeepResearchPlanDelta"
      },
      "DeepResearchPlanStart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "deep_research_plan_start",
            "title": "Type",
            "default": "deep_research_plan_start"
          }
        },
        "type": "object",
        "title": "DeepResearchPlanStart"
      },
      "DefaultAppMode": {
        "type": "string",
        "enum": [
          "AUTO",
          "CHAT",
          "SEARCH"
        ],
        "title": "DefaultAppMode"
      },
      "DefaultAppModeRequest": {
        "properties": {
          "default_app_mode": {
            "$ref": "#/components/schemas/DefaultAppMode"
          }
        },
        "type": "object",
        "required": [
          "default_app_mode"
        ],
        "title": "DefaultAppModeRequest"
      },
      "DefaultAssistantConfiguration": {
        "properties": {
          "tool_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Tool Ids",
            "description": "List of enabled tool IDs"
          },
          "system_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "System Prompt",
            "description": "System prompt (instructions) for the assistant. None means use default."
          },
          "default_system_prompt": {
            "type": "string",
            "title": "Default System Prompt",
            "description": "The default system prompt used when system_prompt is null."
          }
        },
        "type": "object",
        "required": [
          "system_prompt",
          "default_system_prompt"
        ],
        "title": "DefaultAssistantConfiguration",
        "description": "Simplified view of default assistant configuration for admin UI."
      },
      "DefaultAssistantUpdateRequest": {
        "properties": {
          "tool_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Ids",
            "description": "List of tool IDs to enable for the default assistant"
          },
          "system_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "System Prompt",
            "description": "New system prompt (instructions). None resets to default, empty string is allowed."
          }
        },
        "type": "object",
        "title": "DefaultAssistantUpdateRequest",
        "description": "Request model for updating default assistant configuration."
      },
      "DefaultModel": {
        "properties": {
          "provider_id": {
            "type": "integer",
            "title": "Provider Id"
          },
          "model_name": {
            "type": "string",
            "title": "Model Name"
          }
        },
        "type": "object",
        "required": [
          "provider_id",
          "model_name"
        ],
        "title": "DefaultModel"
      },
      "DeleteFileResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "deleted": {
            "type": "string",
            "title": "Deleted"
          }
        },
        "type": "object",
        "required": [
          "success",
          "deleted"
        ],
        "title": "DeleteFileResponse"
      },
      "DeletionAttemptSnapshot": {
        "properties": {
          "connector_id": {
            "type": "integer",
            "title": "Connector Id"
          },
          "credential_id": {
            "type": "integer",
            "title": "Credential Id"
          },
          "status": {
            "$ref": "#/components/schemas/TaskStatus"
          }
        },
        "type": "object",
        "required": [
          "connector_id",
          "credential_id",
          "status"
        ],
        "title": "DeletionAttemptSnapshot"
      },
      "DetailedSessionResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "status": {
            "$ref": "#/components/schemas/BuildSessionStatus"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_activity_at": {
            "type": "string",
            "format": "date-time",
            "title": "Last Activity At"
          },
          "nextjs_port": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nextjs Port"
          },
          "sandbox": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SandboxResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "artifacts": {
            "items": {
              "$ref": "#/components/schemas/ArtifactResponse"
            },
            "type": "array",
            "title": "Artifacts"
          },
          "sharing_scope": {
            "$ref": "#/components/schemas/SharingScope"
          },
          "origin": {
            "$ref": "#/components/schemas/SessionOrigin"
          },
          "agent_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Provider"
          },
          "agent_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Model"
          },
          "skills_stale": {
            "type": "boolean",
            "title": "Skills Stale"
          },
          "session_loaded_in_sandbox": {
            "type": "boolean",
            "title": "Session Loaded In Sandbox"
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_id",
          "name",
          "status",
          "created_at",
          "last_activity_at",
          "nextjs_port",
          "sandbox",
          "artifacts",
          "sharing_scope",
          "origin",
          "agent_provider",
          "agent_model",
          "skills_stale",
          "session_loaded_in_sandbox"
        ],
        "title": "DetailedSessionResponse",
        "description": "Extended session response with sandbox state details.\n\nUsed for single-session endpoints where we compute expensive fields\nlike session_loaded_in_sandbox."
      },
      "DirectoryListing": {
        "properties": {
          "path": {
            "type": "string",
            "title": "Path"
          },
          "entries": {
            "items": {
              "$ref": "#/components/schemas/FilesystemEntry"
            },
            "type": "array",
            "title": "Entries"
          }
        },
        "type": "object",
        "required": [
          "path",
          "entries"
        ],
        "title": "DirectoryListing"
      },
      "DisableKGConfigRequest": {
        "properties": {},
        "additionalProperties": false,
        "type": "object",
        "title": "DisableKGConfigRequest"
      },
      "DiscordBotConfigCreateRequest": {
        "properties": {
          "bot_token": {
            "type": "string",
            "title": "Bot Token"
          }
        },
        "type": "object",
        "required": [
          "bot_token"
        ],
        "title": "DiscordBotConfigCreateRequest"
      },
      "DiscordBotConfigResponse": {
        "properties": {
          "configured": {
            "type": "boolean",
            "title": "Configured"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "configured"
        ],
        "title": "DiscordBotConfigResponse"
      },
      "DiscordChannelConfigResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "guild_config_id": {
            "type": "integer",
            "title": "Guild Config Id"
          },
          "channel_id": {
            "type": "integer",
            "title": "Channel Id"
          },
          "channel_name": {
            "type": "string",
            "title": "Channel Name"
          },
          "channel_type": {
            "type": "string",
            "title": "Channel Type"
          },
          "is_private": {
            "type": "boolean",
            "title": "Is Private"
          },
          "require_bot_invocation": {
            "type": "boolean",
            "title": "Require Bot Invocation"
          },
          "thread_only_mode": {
            "type": "boolean",
            "title": "Thread Only Mode"
          },
          "persona_override_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Persona Override Id"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          }
        },
        "type": "object",
        "required": [
          "id",
          "guild_config_id",
          "channel_id",
          "channel_name",
          "channel_type",
          "is_private",
          "require_bot_invocation",
          "thread_only_mode",
          "persona_override_id",
          "enabled"
        ],
        "title": "DiscordChannelConfigResponse"
      },
      "DiscordChannelConfigUpdateRequest": {
        "properties": {
          "require_bot_invocation": {
            "type": "boolean",
            "title": "Require Bot Invocation"
          },
          "persona_override_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Persona Override Id"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "thread_only_mode": {
            "type": "boolean",
            "title": "Thread Only Mode"
          }
        },
        "type": "object",
        "required": [
          "require_bot_invocation",
          "persona_override_id",
          "enabled",
          "thread_only_mode"
        ],
        "title": "DiscordChannelConfigUpdateRequest"
      },
      "DiscordGuildConfigCreateResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "registration_key": {
            "type": "string",
            "title": "Registration Key"
          }
        },
        "type": "object",
        "required": [
          "id",
          "registration_key"
        ],
        "title": "DiscordGuildConfigCreateResponse"
      },
      "DiscordGuildConfigResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "guild_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guild Id"
          },
          "guild_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guild Name"
          },
          "registered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Registered At"
          },
          "default_persona_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Persona Id"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          }
        },
        "type": "object",
        "required": [
          "id",
          "guild_id",
          "guild_name",
          "registered_at",
          "default_persona_id",
          "enabled"
        ],
        "title": "DiscordGuildConfigResponse"
      },
      "DiscordGuildConfigUpdateRequest": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "default_persona_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Persona Id"
          }
        },
        "type": "object",
        "required": [
          "enabled",
          "default_persona_id"
        ],
        "title": "DiscordGuildConfigUpdateRequest"
      },
      "DisplayPriorityRequest": {
        "properties": {
          "display_priority_map": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Display Priority Map"
          }
        },
        "type": "object",
        "required": [
          "display_priority_map"
        ],
        "title": "DisplayPriorityRequest"
      },
      "DocMinimalInfo": {
        "properties": {
          "document_id": {
            "type": "string",
            "title": "Document Id"
          },
          "semantic_id": {
            "type": "string",
            "title": "Semantic Id"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          }
        },
        "type": "object",
        "required": [
          "document_id",
          "semantic_id"
        ],
        "title": "DocMinimalInfo"
      },
      "DocPermissionSyncAttemptSnapshot": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "status": {
            "$ref": "#/components/schemas/PermissionSyncStatus"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "full_exception_trace": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Exception Trace"
          },
          "total_docs_synced": {
            "type": "integer",
            "title": "Total Docs Synced"
          },
          "docs_with_permission_errors": {
            "type": "integer",
            "title": "Docs With Permission Errors"
          },
          "time_created": {
            "type": "string",
            "title": "Time Created"
          },
          "time_started": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Started"
          },
          "time_finished": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Finished"
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "error_message",
          "full_exception_trace",
          "total_docs_synced",
          "docs_with_permission_errors",
          "time_created",
          "time_started",
          "time_finished"
        ],
        "title": "DocPermissionSyncAttemptSnapshot"
      },
      "DocsCountOperator": {
        "type": "string",
        "enum": [
          ">",
          "<",
          "="
        ],
        "title": "DocsCountOperator"
      },
      "DocumentBase": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "sections": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/TextSection"
                },
                {
                  "$ref": "#/components/schemas/ImageSection"
                },
                {
                  "$ref": "#/components/schemas/TabularSection"
                }
              ]
            },
            "type": "array",
            "title": "Sections"
          },
          "source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentSource"
              },
              {
                "type": "null"
              }
            ]
          },
          "semantic_identifier": {
            "type": "string",
            "title": "Semantic Identifier"
          },
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              ]
            },
            "type": "object",
            "title": "Metadata"
          },
          "doc_updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Doc Updated At"
          },
          "doc_created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Doc Created At"
          },
          "chunk_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chunk Count"
          },
          "primary_owners": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/BasicExpertInfo"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Owners"
          },
          "secondary_owners": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/BasicExpertInfo"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secondary Owners"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "from_ingestion_api": {
            "type": "boolean",
            "title": "From Ingestion Api",
            "default": false
          },
          "additional_info": {
            "title": "Additional Info"
          },
          "external_access": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalAccess"
              },
              {
                "type": "null"
              }
            ]
          },
          "doc_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Doc Metadata"
          },
          "parent_hierarchy_raw_node_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Hierarchy Raw Node Id"
          },
          "parent_hierarchy_node_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Hierarchy Node Id"
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Id"
          }
        },
        "type": "object",
        "required": [
          "sections",
          "semantic_identifier",
          "metadata"
        ],
        "title": "DocumentBase",
        "description": "Used for Onyx ingestion api, the ID is inferred before use if not provided"
      },
      "DocumentInfo": {
        "properties": {
          "num_chunks": {
            "type": "integer",
            "title": "Num Chunks"
          },
          "num_tokens": {
            "type": "integer",
            "title": "Num Tokens"
          }
        },
        "type": "object",
        "required": [
          "num_chunks",
          "num_tokens"
        ],
        "title": "DocumentInfo"
      },
      "DocumentPageCursor": {
        "properties": {
          "last_modified": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Modified"
          },
          "last_synced": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Synced"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "document_id": {
            "type": "string",
            "title": "Document Id"
          }
        },
        "type": "object",
        "required": [
          "document_id"
        ],
        "title": "DocumentPageCursor"
      },
      "DocumentSet": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "cc_pair_descriptors": {
            "items": {
              "$ref": "#/components/schemas/ConnectorCredentialPairDescriptor"
            },
            "type": "array",
            "title": "Cc Pair Descriptors"
          },
          "is_up_to_date": {
            "type": "boolean",
            "title": "Is Up To Date"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public"
          },
          "users": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Users"
          },
          "groups": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Groups"
          },
          "federated_connectors": {
            "items": {
              "$ref": "#/components/schemas/FederatedConnectorDescriptor"
            },
            "type": "array",
            "title": "Federated Connectors"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "cc_pair_descriptors",
          "is_up_to_date",
          "is_public",
          "users",
          "groups"
        ],
        "title": "DocumentSet"
      },
      "DocumentSetCreationRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "cc_pair_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Cc Pair Ids"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public"
          },
          "users": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Users"
          },
          "groups": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Groups"
          },
          "federated_connectors": {
            "items": {
              "$ref": "#/components/schemas/FederatedConnectorConfig"
            },
            "type": "array",
            "title": "Federated Connectors"
          }
        },
        "type": "object",
        "required": [
          "name",
          "description",
          "cc_pair_ids",
          "is_public"
        ],
        "title": "DocumentSetCreationRequest"
      },
      "DocumentSetSummary": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "cc_pair_summaries": {
            "items": {
              "$ref": "#/components/schemas/CCPairSummary"
            },
            "type": "array",
            "title": "Cc Pair Summaries"
          },
          "is_up_to_date": {
            "type": "boolean",
            "title": "Is Up To Date"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public"
          },
          "users": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Users"
          },
          "groups": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Groups"
          },
          "permissions": {
            "additionalProperties": {
              "type": "boolean"
            },
            "type": "object",
            "title": "Permissions"
          },
          "federated_connector_summaries": {
            "items": {
              "$ref": "#/components/schemas/FederatedConnectorSummary"
            },
            "type": "array",
            "title": "Federated Connector Summaries"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "cc_pair_summaries",
          "is_up_to_date",
          "is_public",
          "users",
          "groups"
        ],
        "title": "DocumentSetSummary",
        "description": "Simplified document set model with minimal data for list views"
      },
      "DocumentSetUpdateRequest": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "cc_pair_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Cc Pair Ids"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public"
          },
          "users": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Users"
          },
          "groups": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Groups"
          },
          "federated_connectors": {
            "items": {
              "$ref": "#/components/schemas/FederatedConnectorConfig"
            },
            "type": "array",
            "title": "Federated Connectors"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "cc_pair_ids",
          "is_public",
          "users",
          "groups"
        ],
        "title": "DocumentSetUpdateRequest"
      },
      "DocumentSortDirection": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "title": "DocumentSortDirection"
      },
      "DocumentSortField": {
        "type": "string",
        "enum": [
          "name",
          "last_updated"
        ],
        "title": "DocumentSortField"
      },
      "DocumentSource": {
        "type": "string",
        "enum": [
          "ingestion_api",
          "slack",
          "web",
          "google_drive",
          "gmail",
          "github",
          "gitbook",
          "gitlab",
          "guru",
          "bookstack",
          "outline",
          "confluence",
          "jira",
          "slab",
          "productboard",
          "file",
          "coda",
          "canvas",
          "notion",
          "zulip",
          "linear",
          "hubspot",
          "document360",
          "gong",
          "google_sites",
          "zendesk",
          "loopio",
          "box",
          "dropbox",
          "sharepoint",
          "teams",
          "salesforce",
          "discourse",
          "axero",
          "clickup",
          "mediawiki",
          "wikipedia",
          "asana",
          "s3",
          "r2",
          "google_cloud_storage",
          "oci_storage",
          "xenforo",
          "not_applicable",
          "discord",
          "freshdesk",
          "fireflies",
          "egnyte",
          "airtable",
          "highspot",
          "drupal_wiki",
          "imap",
          "bitbucket",
          "testrail",
          "braintrust",
          "lumapps",
          "mock_connector",
          "user_file",
          "craft_file"
        ],
        "title": "DocumentSource"
      },
      "DocumentSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          },
          "last_modified": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Modified"
          },
          "last_synced": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Synced"
          }
        },
        "type": "object",
        "required": [
          "id",
          "title",
          "link",
          "parent_id",
          "last_modified",
          "last_synced"
        ],
        "title": "DocumentSummary"
      },
      "DocumentSyncStatus": {
        "properties": {
          "doc_id": {
            "type": "string",
            "title": "Doc Id"
          },
          "last_synced": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Synced"
          },
          "last_modified": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Modified"
          }
        },
        "type": "object",
        "required": [
          "doc_id",
          "last_synced",
          "last_modified"
        ],
        "title": "DocumentSyncStatus"
      },
      "DocumentTargetRequest": {
        "properties": {
          "cc_pair_id": {
            "type": "integer",
            "title": "Cc Pair Id"
          },
          "document_id": {
            "type": "string",
            "title": "Document Id"
          }
        },
        "type": "object",
        "required": [
          "cc_pair_id",
          "document_id"
        ],
        "title": "DocumentTargetRequest"
      },
      "EmailInviteStatus": {
        "type": "string",
        "enum": [
          "SENT",
          "NOT_CONFIGURED",
          "SEND_FAILED",
          "DISABLED"
        ],
        "title": "EmailInviteStatus"
      },
      "EmbeddingModelDetail": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "model_name": {
            "type": "string",
            "title": "Model Name"
          },
          "normalize": {
            "type": "boolean",
            "title": "Normalize"
          },
          "query_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Query Prefix",
            "default": ""
          },
          "passage_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Passage Prefix",
            "default": ""
          },
          "api_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Url"
          },
          "provider_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmbeddingProvider"
              },
              {
                "type": "null"
              }
            ]
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          }
        },
        "type": "object",
        "required": [
          "model_name",
          "normalize"
        ],
        "title": "EmbeddingModelDetail"
      },
      "EmbeddingPrecision": {
        "type": "string",
        "enum": [
          "bfloat16",
          "float"
        ],
        "title": "EmbeddingPrecision"
      },
      "EmbeddingProvider": {
        "type": "string",
        "enum": [
          "openai",
          "cohere",
          "voyage",
          "google",
          "litellm",
          "azure"
        ],
        "title": "EmbeddingProvider"
      },
      "EnableKGConfigRequest": {
        "properties": {
          "vendor": {
            "type": "string",
            "title": "Vendor"
          },
          "vendor_domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Vendor Domains"
          },
          "ignore_domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Ignore Domains",
            "default": []
          },
          "coverage_start": {
            "type": "string",
            "format": "date-time",
            "title": "Coverage Start"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "vendor",
          "vendor_domains",
          "coverage_start"
        ],
        "title": "EnableKGConfigRequest"
      },
      "EndTrialResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "stripe_subscription_id": {
            "type": "string",
            "title": "Stripe Subscription Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "success",
          "stripe_subscription_id",
          "status"
        ],
        "title": "EndTrialResponse",
        "description": "Response from ending a trial early."
      },
      "EndpointDescriptor": {
        "properties": {
          "action_id": {
            "type": "string",
            "title": "Action Id"
          },
          "normalised_name": {
            "type": "string",
            "title": "Normalised Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "default_policy": {
            "$ref": "#/components/schemas/EndpointPolicy"
          }
        },
        "type": "object",
        "required": [
          "action_id",
          "normalised_name",
          "description",
          "default_policy"
        ],
        "title": "EndpointDescriptor",
        "description": "One action in a built-in provider's catalog, flattened for the admin UI.\nThe admin picks a policy per action; recognition rules stay backend-side."
      },
      "EndpointPolicy": {
        "type": "string",
        "enum": [
          "ALWAYS",
          "ASK",
          "DENY"
        ],
        "title": "EndpointPolicy",
        "description": "What the egress layer does with an outbound request once it has been\nmatched to an action of a connected external app."
      },
      "EnterpriseSettings": {
        "properties": {
          "application_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Application Name"
          },
          "use_custom_logo": {
            "type": "boolean",
            "title": "Use Custom Logo",
            "default": false
          },
          "use_custom_logotype": {
            "type": "boolean",
            "title": "Use Custom Logotype",
            "default": false
          },
          "logo_display_style": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LogoDisplayStyle"
              },
              {
                "type": "null"
              }
            ]
          },
          "custom_nav_items": {
            "items": {
              "$ref": "#/components/schemas/NavigationItem"
            },
            "type": "array",
            "title": "Custom Nav Items"
          },
          "two_lines_for_chat_header": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Two Lines For Chat Header"
          },
          "custom_lower_disclaimer_content": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Lower Disclaimer Content"
          },
          "custom_header_content": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Header Content"
          },
          "custom_popup_header": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Popup Header"
          },
          "custom_popup_content": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Popup Content"
          },
          "enable_consent_screen": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enable Consent Screen"
          },
          "consent_screen_prompt": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Consent Screen Prompt"
          },
          "show_first_visit_notice": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Show First Visit Notice"
          },
          "custom_greeting_message": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Greeting Message"
          },
          "custom_login_subtitle": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Login Subtitle"
          },
          "custom_help_link_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Help Link Url"
          },
          "custom_help_link_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Help Link Label"
          },
          "hide_onyx_branding": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hide Onyx Branding"
          }
        },
        "type": "object",
        "title": "EnterpriseSettings",
        "description": "General settings that only apply to the Enterprise Edition of Onyx\n\nNOTE: don't put anything sensitive in here, as this is accessible without auth."
      },
      "EntitySpecResponse": {
        "properties": {
          "entities": {
            "additionalProperties": true,
            "type": "object",
            "title": "Entities"
          }
        },
        "type": "object",
        "required": [
          "entities"
        ],
        "title": "EntitySpecResponse",
        "description": "Response for entity specification"
      },
      "EntityType": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          },
          "grounded_source_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grounded Source Name"
          }
        },
        "type": "object",
        "required": [
          "name",
          "description",
          "active"
        ],
        "title": "EntityType"
      },
      "ErrorModel": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              }
            ],
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "detail"
        ],
        "title": "ErrorModel"
      },
      "EvalConfigurationOptions": {
        "properties": {
          "builtin_tool_types": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Builtin Tool Types",
            "default": [
              "SearchTool",
              "ImageGenerationTool",
              "WebSearchTool",
              "KnowledgeGraphTool",
              "OpenURLTool",
              "PythonTool",
              "FileReaderTool",
              "MemoryTool",
              "CodingAgentTool"
            ]
          },
          "llm": {
            "$ref": "#/components/schemas/LLMOverride",
            "default": {
              "model_version": "gpt-4o",
              "temperature": 0.0
            }
          },
          "search_permissions_email": {
            "type": "string",
            "title": "Search Permissions Email"
          },
          "dataset_name": {
            "type": "string",
            "title": "Dataset Name"
          },
          "no_send_logs": {
            "type": "boolean",
            "title": "No Send Logs",
            "default": false
          },
          "braintrust_project": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Braintrust Project"
          },
          "experiment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Experiment Name"
          }
        },
        "type": "object",
        "required": [
          "search_permissions_email",
          "dataset_name"
        ],
        "title": "EvalConfigurationOptions"
      },
      "EvalRunAck": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          }
        },
        "type": "object",
        "required": [
          "success"
        ],
        "title": "EvalRunAck",
        "description": "Response model for evaluation runs"
      },
      "ExpiryWarningStage": {
        "type": "string",
        "enum": [
          "none",
          "t_30d",
          "t_14d",
          "t_1d",
          "grace"
        ],
        "title": "ExpiryWarningStage"
      },
      "ExternalAccess": {
        "properties": {
          "external_user_emails": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "External User Emails"
          },
          "external_user_group_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "External User Group Ids"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public"
          }
        },
        "type": "object",
        "required": [
          "external_user_emails",
          "external_user_group_ids",
          "is_public"
        ],
        "title": "ExternalAccess"
      },
      "ExternalAppAdminResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "app_type": {
            "$ref": "#/components/schemas/ExternalAppType"
          },
          "upstream_url_patterns": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Upstream Url Patterns"
          },
          "auth_template": {
            "additionalProperties": true,
            "type": "object",
            "title": "Auth Template"
          },
          "organization_credentials": {
            "additionalProperties": true,
            "type": "object",
            "title": "Organization Credentials"
          },
          "credential_placeholder_keys": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Credential Placeholder Keys"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "actions": {
            "items": {
              "$ref": "#/components/schemas/ActionPolicyView"
            },
            "type": "array",
            "title": "Actions"
          },
          "associated_skills": {
            "items": {
              "$ref": "#/components/schemas/ExternalAppAssociatedSkill"
            },
            "type": "array",
            "title": "Associated Skills"
          },
          "is_onyx_managed": {
            "type": "boolean",
            "title": "Is Onyx Managed",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "app_type",
          "upstream_url_patterns",
          "auth_template",
          "organization_credentials",
          "credential_placeholder_keys",
          "enabled",
          "actions",
          "associated_skills"
        ],
        "title": "ExternalAppAdminResponse",
        "description": "Admin-facing view of an external app (includes org credentials)."
      },
      "ExternalAppAssociatedSkill": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "is_valid": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Valid"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "is_valid"
        ],
        "title": "ExternalAppAssociatedSkill"
      },
      "ExternalAppType": {
        "type": "string",
        "enum": [
          "GOOGLE_CALENDAR",
          "GOOGLE_DRIVE",
          "GMAIL",
          "SLACK",
          "LINEAR",
          "GITHUB",
          "HUBSPOT",
          "NOTION",
          "CUSTOM"
        ],
        "title": "ExternalAppType",
        "description": "Discriminator for the External Apps OAuth dispatch layer.\n\nEach built-in value names a provider with its own configured\nauthorize URL, token URL, scope, and response parser in\n`external_apps.providers`. `CUSTOM` is for admin-defined apps\nthat don't go through any built-in OAuth flow (static-token\nintegrations, internal services, etc.)."
      },
      "ExternalAppUserResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "app_type": {
            "$ref": "#/components/schemas/ExternalAppType"
          },
          "credential_keys": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Credential Keys"
          },
          "credential_values": {
            "additionalProperties": true,
            "type": "object",
            "title": "Credential Values"
          },
          "authenticated": {
            "type": "boolean",
            "title": "Authenticated"
          },
          "supports_oauth": {
            "type": "boolean",
            "title": "Supports Oauth"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "app_type",
          "credential_keys",
          "credential_values",
          "authenticated",
          "supports_oauth"
        ],
        "title": "ExternalAppUserResponse",
        "description": "User-facing view of an external app.\n\n`credential_keys` are the parameter names the calling user must supply \u2014\nderived from the app's `auth_template` minus whatever the organization\nhas already filled in. `credential_values` are display-safe masked values\nfor credentials the user has previously stored for those keys (intersection\n\u2014 stale keys from deleted/migrated templates are filtered out).\n`authenticated` is true iff the user has a stored value for every key in\n`credential_keys`.\n\nAdmin-only fields (``organization_credentials``, ``auth_template``,\n``upstream_url_patterns``, ``enabled``) are intentionally omitted.\n``app_type`` is included \u2014 it's the non-sensitive provider\ndiscriminator the UI needs to render the app."
      },
      "ExternalGroupSyncAttemptSnapshot": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "status": {
            "$ref": "#/components/schemas/PermissionSyncStatus"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "full_exception_trace": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Exception Trace"
          },
          "total_users_processed": {
            "type": "integer",
            "title": "Total Users Processed"
          },
          "total_groups_processed": {
            "type": "integer",
            "title": "Total Groups Processed"
          },
          "total_group_memberships_synced": {
            "type": "integer",
            "title": "Total Group Memberships Synced"
          },
          "time_created": {
            "type": "string",
            "title": "Time Created"
          },
          "time_started": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Started"
          },
          "time_finished": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Finished"
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "error_message",
          "full_exception_trace",
          "total_users_processed",
          "total_groups_processed",
          "total_group_memberships_synced",
          "time_created",
          "time_started",
          "time_finished"
        ],
        "title": "ExternalGroupSyncAttemptSnapshot"
      },
      "FailedConnectorIndexingStatus": {
        "properties": {
          "cc_pair_id": {
            "type": "integer",
            "title": "Cc Pair Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "error_msg": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Msg"
          },
          "is_deletable": {
            "type": "boolean",
            "title": "Is Deletable"
          },
          "connector_id": {
            "type": "integer",
            "title": "Connector Id"
          },
          "credential_id": {
            "type": "integer",
            "title": "Credential Id"
          }
        },
        "type": "object",
        "required": [
          "cc_pair_id",
          "name",
          "error_msg",
          "is_deletable",
          "connector_id",
          "credential_id"
        ],
        "title": "FailedConnectorIndexingStatus",
        "description": "Simplified version of ConnectorIndexingStatus for failed indexing attempts"
      },
      "FederatedConnectorConfig": {
        "properties": {
          "federated_connector_id": {
            "type": "integer",
            "title": "Federated Connector Id"
          },
          "entities": {
            "additionalProperties": true,
            "type": "object",
            "title": "Entities"
          }
        },
        "type": "object",
        "required": [
          "federated_connector_id",
          "entities"
        ],
        "title": "FederatedConnectorConfig",
        "description": "Configuration for adding a federated connector to a document set"
      },
      "FederatedConnectorCredentials": {
        "properties": {
          "client_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Id"
          },
          "client_secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Secret"
          },
          "redirect_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redirect Uri"
          }
        },
        "type": "object",
        "title": "FederatedConnectorCredentials",
        "description": "Credentials for federated connector"
      },
      "FederatedConnectorDescriptor": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "source": {
            "type": "string",
            "title": "Source"
          },
          "entities": {
            "additionalProperties": true,
            "type": "object",
            "title": "Entities"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "source",
          "entities"
        ],
        "title": "FederatedConnectorDescriptor",
        "description": "Descriptor for a federated connector in a document set"
      },
      "FederatedConnectorDetail": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "source": {
            "$ref": "#/components/schemas/FederatedConnectorSource"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "credentials": {
            "$ref": "#/components/schemas/FederatedConnectorCredentials"
          },
          "config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Config"
          },
          "oauth_token_exists": {
            "type": "boolean",
            "title": "Oauth Token Exists"
          },
          "oauth_token_expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Token Expires At"
          },
          "document_sets": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Document Sets"
          }
        },
        "type": "object",
        "required": [
          "id",
          "source",
          "name",
          "credentials",
          "oauth_token_exists"
        ],
        "title": "FederatedConnectorDetail"
      },
      "FederatedConnectorRequest": {
        "properties": {
          "source": {
            "$ref": "#/components/schemas/FederatedConnectorSource"
          },
          "credentials": {
            "$ref": "#/components/schemas/FederatedConnectorCredentials"
          },
          "config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Config"
          }
        },
        "type": "object",
        "required": [
          "source",
          "credentials"
        ],
        "title": "FederatedConnectorRequest"
      },
      "FederatedConnectorResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "source": {
            "$ref": "#/components/schemas/FederatedConnectorSource"
          }
        },
        "type": "object",
        "required": [
          "id",
          "source"
        ],
        "title": "FederatedConnectorResponse"
      },
      "FederatedConnectorSource": {
        "type": "string",
        "enum": [
          "federated_slack"
        ],
        "title": "FederatedConnectorSource"
      },
      "FederatedConnectorStatus": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "source": {
            "$ref": "#/components/schemas/FederatedConnectorSource"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "source",
          "name"
        ],
        "title": "FederatedConnectorStatus"
      },
      "FederatedConnectorSummary": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "source": {
            "$ref": "#/components/schemas/FederatedConnectorSource"
          },
          "entities": {
            "additionalProperties": true,
            "type": "object",
            "title": "Entities"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "source",
          "entities"
        ],
        "title": "FederatedConnectorSummary",
        "description": "Simplified federated connector information with just essential data"
      },
      "FederatedConnectorUpdateRequest": {
        "properties": {
          "credentials": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FederatedConnectorCredentials"
              },
              {
                "type": "null"
              }
            ]
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          }
        },
        "type": "object",
        "title": "FederatedConnectorUpdateRequest"
      },
      "FileDescriptor": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "type": {
            "$ref": "#/components/schemas/ChatFileType"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "user_file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User File Id"
          }
        },
        "type": "object",
        "required": [
          "id",
          "type"
        ],
        "title": "FileDescriptor",
        "description": "NOTE: is a `TypedDict` so it can be used as a type hint for a JSONB column\nin Postgres"
      },
      "FileReaderResult": {
        "properties": {
          "type": {
            "type": "string",
            "const": "file_reader_result",
            "title": "Type",
            "default": "file_reader_result"
          },
          "file_name": {
            "type": "string",
            "title": "File Name"
          },
          "file_id": {
            "type": "string",
            "title": "File Id"
          },
          "start_char": {
            "type": "integer",
            "title": "Start Char"
          },
          "end_char": {
            "type": "integer",
            "title": "End Char"
          },
          "total_chars": {
            "type": "integer",
            "title": "Total Chars"
          },
          "preview_start": {
            "type": "string",
            "title": "Preview Start",
            "default": ""
          },
          "preview_end": {
            "type": "string",
            "title": "Preview End",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "file_name",
          "file_id",
          "start_char",
          "end_char",
          "total_chars"
        ],
        "title": "FileReaderResult"
      },
      "FileReaderStart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "file_reader_start",
            "title": "Type",
            "default": "file_reader_start"
          }
        },
        "type": "object",
        "title": "FileReaderStart"
      },
      "FileUploadResponse": {
        "properties": {
          "file_paths": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "File Paths"
          },
          "file_names": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "File Names"
          },
          "zip_metadata_file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Zip Metadata File Id"
          }
        },
        "type": "object",
        "required": [
          "file_paths",
          "file_names",
          "zip_metadata_file_id"
        ],
        "title": "FileUploadResponse"
      },
      "FilesystemEntry": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "is_directory": {
            "type": "boolean",
            "title": "Is Directory"
          },
          "size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size"
          },
          "mime_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mime Type"
          }
        },
        "type": "object",
        "required": [
          "name",
          "path",
          "is_directory"
        ],
        "title": "FilesystemEntry",
        "description": "Represents a file or directory entry in the sandbox filesystem.\n\nUsed for directory listing operations. This is the canonical model used\nby both sandbox managers and the API layer."
      },
      "FolderPosition": {
        "type": "string",
        "enum": [
          "on_top",
          "mixed"
        ],
        "title": "FolderPosition"
      },
      "FullModelVersionResponse": {
        "properties": {
          "current_settings": {
            "$ref": "#/components/schemas/SavedSearchSettings"
          },
          "secondary_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SavedSearchSettings"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "current_settings",
          "secondary_settings"
        ],
        "title": "FullModelVersionResponse"
      },
      "FullPersonaSnapshot": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public"
          },
          "is_listed": {
            "type": "boolean",
            "title": "Is Listed"
          },
          "uploaded_image_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uploaded Image Id"
          },
          "icon_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Name"
          },
          "user_file_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "User File Ids"
          },
          "display_priority": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Priority"
          },
          "is_featured": {
            "type": "boolean",
            "title": "Is Featured"
          },
          "builtin_persona": {
            "type": "boolean",
            "title": "Builtin Persona"
          },
          "starter_messages": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/StarterMessage"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starter Messages"
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/ToolSnapshot"
            },
            "type": "array",
            "title": "Tools"
          },
          "labels": {
            "items": {
              "$ref": "#/components/schemas/PersonaLabelSnapshot"
            },
            "type": "array",
            "title": "Labels"
          },
          "owner": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MinimalUserSnapshot"
              },
              {
                "type": "null"
              }
            ]
          },
          "owner_group": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonaOwnerGroupSnapshot"
              },
              {
                "type": "null"
              }
            ]
          },
          "users": {
            "items": {
              "$ref": "#/components/schemas/MinimalUserSnapshot"
            },
            "type": "array",
            "title": "Users"
          },
          "groups": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Groups"
          },
          "user_shares": {
            "items": {
              "$ref": "#/components/schemas/PersonaUserShare"
            },
            "type": "array",
            "title": "User Shares"
          },
          "group_shares": {
            "items": {
              "$ref": "#/components/schemas/PersonaGroupShare"
            },
            "type": "array",
            "title": "Group Shares"
          },
          "public_permission": {
            "$ref": "#/components/schemas/PersonaSharePermission"
          },
          "sharing_status": {
            "$ref": "#/components/schemas/PersonaSharingStatus"
          },
          "document_sets": {
            "items": {
              "$ref": "#/components/schemas/DocumentSetSummary"
            },
            "type": "array",
            "title": "Document Sets"
          },
          "default_model_configuration_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Model Configuration Id"
          },
          "hierarchy_nodes": {
            "items": {
              "$ref": "#/components/schemas/HierarchyNodeSnapshot"
            },
            "type": "array",
            "title": "Hierarchy Nodes"
          },
          "attached_documents": {
            "items": {
              "$ref": "#/components/schemas/AttachedDocumentSnapshot"
            },
            "type": "array",
            "title": "Attached Documents"
          },
          "permissions": {
            "additionalProperties": {
              "type": "boolean"
            },
            "type": "object",
            "title": "Permissions"
          },
          "system_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "System Prompt"
          },
          "replace_base_system_prompt": {
            "type": "boolean",
            "title": "Replace Base System Prompt",
            "default": false
          },
          "task_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Prompt"
          },
          "datetime_aware": {
            "type": "boolean",
            "title": "Datetime Aware",
            "default": true
          },
          "search_start_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Search Start Date"
          },
          "user_permission": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonaAccessLevel"
              },
              {
                "type": "null"
              }
            ]
          },
          "admin_count": {
            "type": "integer",
            "title": "Admin Count",
            "default": 0
          },
          "ownership_vacant": {
            "type": "boolean",
            "title": "Ownership Vacant",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "is_public",
          "is_listed",
          "uploaded_image_id",
          "icon_name",
          "user_file_ids",
          "display_priority",
          "is_featured",
          "builtin_persona",
          "starter_messages",
          "tools",
          "labels",
          "owner",
          "owner_group",
          "users",
          "groups",
          "user_shares",
          "group_shares",
          "public_permission",
          "sharing_status",
          "document_sets"
        ],
        "title": "FullPersonaSnapshot"
      },
      "FullUserSnapshot": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "account_type": {
            "$ref": "#/components/schemas/AccountType"
          },
          "is_admin": {
            "type": "boolean",
            "title": "Is Admin",
            "default": false
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active"
          },
          "password_configured": {
            "type": "boolean",
            "title": "Password Configured"
          },
          "personal_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Personal Name"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/UserGroupInfo"
            },
            "type": "array",
            "title": "Groups"
          },
          "is_scim_synced": {
            "type": "boolean",
            "title": "Is Scim Synced"
          },
          "craft_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Craft Enabled"
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "account_type",
          "is_active",
          "password_configured",
          "personal_name",
          "created_at",
          "updated_at",
          "groups",
          "is_scim_synced",
          "craft_enabled"
        ],
        "title": "FullUserSnapshot"
      },
      "GenerateUsageReportParams": {
        "properties": {
          "period_from": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period From"
          },
          "period_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period To"
          },
          "report_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Id"
          }
        },
        "type": "object",
        "title": "GenerateUsageReportParams"
      },
      "GeneratedImage": {
        "properties": {
          "file_id": {
            "type": "string",
            "title": "File Id"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "revised_prompt": {
            "type": "string",
            "title": "Revised Prompt"
          },
          "shape": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shape"
          }
        },
        "type": "object",
        "required": [
          "file_id",
          "url",
          "revised_prompt"
        ],
        "title": "GeneratedImage",
        "description": "Represents an image generated by an image generation tool."
      },
      "GeneratedImagePayload": {
        "properties": {
          "data_base64": {
            "type": "string",
            "title": "Data Base64"
          },
          "mime_type": {
            "type": "string",
            "title": "Mime Type"
          },
          "revised_prompt": {
            "type": "string",
            "title": "Revised Prompt"
          }
        },
        "type": "object",
        "required": [
          "data_base64",
          "mime_type",
          "revised_prompt"
        ],
        "title": "GeneratedImagePayload"
      },
      "GitHubImportedSkill": {
        "properties": {
          "skill": {
            "$ref": "#/components/schemas/SkillResponse"
          },
          "disabled_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disabled Reason"
          }
        },
        "type": "object",
        "required": [
          "skill"
        ],
        "title": "GitHubImportedSkill"
      },
      "GitHubSkillNotImported": {
        "properties": {
          "path": {
            "type": "string",
            "title": "Path"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "reason": {
            "type": "string",
            "title": "Reason"
          }
        },
        "type": "object",
        "required": [
          "path",
          "name",
          "reason"
        ],
        "title": "GitHubSkillNotImported"
      },
      "GitHubSkillPreview": {
        "properties": {
          "path": {
            "type": "string",
            "title": "Path"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "unavailable_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unavailable Reason"
          }
        },
        "type": "object",
        "required": [
          "path",
          "name",
          "description",
          "unavailable_reason"
        ],
        "title": "GitHubSkillPreview"
      },
      "GitHubSkillsImportRequest": {
        "properties": {
          "repository": {
            "type": "string",
            "title": "Repository"
          },
          "revision": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{40}$",
            "title": "Revision"
          },
          "subpath": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subpath"
          },
          "paths": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 500,
            "minItems": 1,
            "title": "Paths"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "repository",
          "revision",
          "paths"
        ],
        "title": "GitHubSkillsImportRequest"
      },
      "GitHubSkillsImportResponse": {
        "properties": {
          "imported": {
            "items": {
              "$ref": "#/components/schemas/GitHubImportedSkill"
            },
            "type": "array",
            "title": "Imported"
          },
          "not_imported": {
            "items": {
              "$ref": "#/components/schemas/GitHubSkillNotImported"
            },
            "type": "array",
            "title": "Not Imported"
          }
        },
        "type": "object",
        "required": [
          "imported",
          "not_imported"
        ],
        "title": "GitHubSkillsImportResponse"
      },
      "GitHubSkillsPreviewRequest": {
        "properties": {
          "repository": {
            "type": "string",
            "title": "Repository"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "repository"
        ],
        "title": "GitHubSkillsPreviewRequest"
      },
      "GitHubSkillsPreviewResponse": {
        "properties": {
          "repository": {
            "type": "string",
            "title": "Repository"
          },
          "revision": {
            "type": "string",
            "title": "Revision"
          },
          "subpath": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subpath"
          },
          "skills": {
            "items": {
              "$ref": "#/components/schemas/GitHubSkillPreview"
            },
            "type": "array",
            "title": "Skills"
          }
        },
        "type": "object",
        "required": [
          "repository",
          "revision",
          "subpath",
          "skills"
        ],
        "title": "GitHubSkillsPreviewResponse"
      },
      "GoogleServiceAccountCredentialRequest": {
        "properties": {
          "google_primary_admin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Google Primary Admin"
          },
          "service_account_key": {
            "$ref": "#/components/schemas/GoogleServiceAccountKey"
          }
        },
        "type": "object",
        "required": [
          "service_account_key"
        ],
        "title": "GoogleServiceAccountCredentialRequest"
      },
      "GoogleServiceAccountKey": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type"
          },
          "project_id": {
            "type": "string",
            "title": "Project Id"
          },
          "private_key_id": {
            "type": "string",
            "title": "Private Key Id"
          },
          "private_key": {
            "type": "string",
            "title": "Private Key"
          },
          "client_email": {
            "type": "string",
            "title": "Client Email"
          },
          "client_id": {
            "type": "string",
            "title": "Client Id"
          },
          "auth_uri": {
            "type": "string",
            "title": "Auth Uri"
          },
          "token_uri": {
            "type": "string",
            "title": "Token Uri"
          },
          "auth_provider_x509_cert_url": {
            "type": "string",
            "title": "Auth Provider X509 Cert Url"
          },
          "client_x509_cert_url": {
            "type": "string",
            "title": "Client X509 Cert Url"
          },
          "universe_domain": {
            "type": "string",
            "title": "Universe Domain"
          }
        },
        "type": "object",
        "required": [
          "type",
          "project_id",
          "private_key_id",
          "private_key",
          "client_email",
          "client_id",
          "auth_uri",
          "token_uri",
          "auth_provider_x509_cert_url",
          "client_x509_cert_url",
          "universe_domain"
        ],
        "title": "GoogleServiceAccountKey"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "Header": {
        "properties": {
          "key": {
            "type": "string",
            "title": "Key"
          },
          "value": {
            "type": "string",
            "title": "Value"
          }
        },
        "type": "object",
        "required": [
          "key",
          "value"
        ],
        "title": "Header"
      },
      "HiddenUpdateRequest": {
        "properties": {
          "document_id": {
            "type": "string",
            "title": "Document Id"
          },
          "hidden": {
            "type": "boolean",
            "title": "Hidden"
          }
        },
        "type": "object",
        "required": [
          "document_id",
          "hidden"
        ],
        "title": "HiddenUpdateRequest"
      },
      "HierarchyNodeDocumentsRequest": {
        "properties": {
          "parent_hierarchy_node_id": {
            "type": "integer",
            "title": "Parent Hierarchy Node Id"
          },
          "cursor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentPageCursor"
              },
              {
                "type": "null"
              }
            ]
          },
          "sort_field": {
            "$ref": "#/components/schemas/DocumentSortField",
            "default": "last_updated"
          },
          "sort_direction": {
            "$ref": "#/components/schemas/DocumentSortDirection",
            "default": "desc"
          },
          "folder_position": {
            "$ref": "#/components/schemas/FolderPosition",
            "default": "on_top"
          }
        },
        "type": "object",
        "required": [
          "parent_hierarchy_node_id"
        ],
        "title": "HierarchyNodeDocumentsRequest"
      },
      "HierarchyNodeDocumentsResponse": {
        "properties": {
          "documents": {
            "items": {
              "$ref": "#/components/schemas/DocumentSummary"
            },
            "type": "array",
            "title": "Documents"
          },
          "next_cursor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentPageCursor"
              },
              {
                "type": "null"
              }
            ]
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size",
            "default": 50
          },
          "sort_field": {
            "$ref": "#/components/schemas/DocumentSortField",
            "default": "last_updated"
          },
          "sort_direction": {
            "$ref": "#/components/schemas/DocumentSortDirection",
            "default": "desc"
          },
          "folder_position": {
            "$ref": "#/components/schemas/FolderPosition",
            "default": "on_top"
          }
        },
        "type": "object",
        "required": [
          "documents",
          "next_cursor"
        ],
        "title": "HierarchyNodeDocumentsResponse"
      },
      "HierarchyNodeSearchResponse": {
        "properties": {
          "nodes": {
            "items": {
              "$ref": "#/components/schemas/HierarchyNodeSearchSummary"
            },
            "type": "array",
            "title": "Nodes"
          }
        },
        "type": "object",
        "required": [
          "nodes"
        ],
        "title": "HierarchyNodeSearchResponse"
      },
      "HierarchyNodeSearchSummary": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          },
          "source": {
            "$ref": "#/components/schemas/DocumentSource"
          }
        },
        "type": "object",
        "required": [
          "id",
          "title",
          "link",
          "parent_id",
          "source"
        ],
        "title": "HierarchyNodeSearchSummary"
      },
      "HierarchyNodeSnapshot": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "raw_node_id": {
            "type": "string",
            "title": "Raw Node Id"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          },
          "source": {
            "$ref": "#/components/schemas/DocumentSource"
          },
          "node_type": {
            "$ref": "#/components/schemas/HierarchyNodeType"
          }
        },
        "type": "object",
        "required": [
          "id",
          "raw_node_id",
          "display_name",
          "link",
          "source",
          "node_type"
        ],
        "title": "HierarchyNodeSnapshot",
        "description": "Minimal representation of a hierarchy node for persona responses."
      },
      "HierarchyNodeSummary": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          }
        },
        "type": "object",
        "required": [
          "id",
          "title",
          "link",
          "parent_id"
        ],
        "title": "HierarchyNodeSummary"
      },
      "HierarchyNodeType": {
        "type": "string",
        "enum": [
          "folder",
          "source",
          "stub",
          "shared_drive",
          "my_drive",
          "space",
          "page",
          "project",
          "database",
          "workspace",
          "site",
          "drive",
          "channel"
        ],
        "title": "HierarchyNodeType",
        "description": "Types of hierarchy nodes across different sources"
      },
      "HierarchyNodesResponse": {
        "properties": {
          "nodes": {
            "items": {
              "$ref": "#/components/schemas/HierarchyNodeSummary"
            },
            "type": "array",
            "title": "Nodes"
          }
        },
        "type": "object",
        "required": [
          "nodes"
        ],
        "title": "HierarchyNodesResponse"
      },
      "HookCreateRequest": {
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name"
          },
          "hook_point": {
            "$ref": "#/components/schemas/HookPoint"
          },
          "endpoint_url": {
            "type": "string",
            "minLength": 1,
            "title": "Endpoint Url"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "format": "password",
                "writeOnly": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "fail_strategy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/HookFailStrategy"
              },
              {
                "type": "null"
              }
            ]
          },
          "timeout_seconds": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Timeout Seconds"
          }
        },
        "type": "object",
        "required": [
          "name",
          "hook_point",
          "endpoint_url"
        ],
        "title": "HookCreateRequest"
      },
      "HookExecutionRecord": {
        "properties": {
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "status_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Code"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "created_at"
        ],
        "title": "HookExecutionRecord"
      },
      "HookFailStrategy": {
        "type": "string",
        "enum": [
          "hard",
          "soft"
        ],
        "title": "HookFailStrategy"
      },
      "HookPoint": {
        "type": "string",
        "enum": [
          "document_ingestion",
          "document_push",
          "query_processing"
        ],
        "title": "HookPoint"
      },
      "HookPointMetaResponse": {
        "properties": {
          "hook_point": {
            "$ref": "#/components/schemas/HookPoint"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "docs_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docs Url"
          },
          "input_schema": {
            "additionalProperties": true,
            "type": "object",
            "title": "Input Schema"
          },
          "output_schema": {
            "additionalProperties": true,
            "type": "object",
            "title": "Output Schema"
          },
          "default_timeout_seconds": {
            "type": "number",
            "title": "Default Timeout Seconds"
          },
          "default_fail_strategy": {
            "$ref": "#/components/schemas/HookFailStrategy"
          },
          "fail_hard_description": {
            "type": "string",
            "title": "Fail Hard Description"
          }
        },
        "type": "object",
        "required": [
          "hook_point",
          "display_name",
          "description",
          "docs_url",
          "input_schema",
          "output_schema",
          "default_timeout_seconds",
          "default_fail_strategy",
          "fail_hard_description"
        ],
        "title": "HookPointMetaResponse"
      },
      "HookResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "hook_point": {
            "$ref": "#/components/schemas/HookPoint"
          },
          "endpoint_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoint Url"
          },
          "api_key_masked": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key Masked"
          },
          "fail_strategy": {
            "$ref": "#/components/schemas/HookFailStrategy"
          },
          "timeout_seconds": {
            "type": "number",
            "title": "Timeout Seconds"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active"
          },
          "is_reachable": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Reachable"
          },
          "creator_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Creator Email"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "hook_point",
          "endpoint_url",
          "api_key_masked",
          "fail_strategy",
          "timeout_seconds",
          "is_active",
          "is_reachable",
          "creator_email",
          "created_at",
          "updated_at"
        ],
        "title": "HookResponse"
      },
      "HookUpdateRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "endpoint_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoint Url"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "format": "password",
                "writeOnly": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "fail_strategy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/HookFailStrategy"
              },
              {
                "type": "null"
              }
            ]
          },
          "timeout_seconds": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Timeout Seconds"
          }
        },
        "type": "object",
        "title": "HookUpdateRequest"
      },
      "HookValidateResponse": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/HookValidateStatus"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "HookValidateResponse"
      },
      "HookValidateStatus": {
        "type": "string",
        "enum": [
          "passed",
          "auth_failed",
          "timeout",
          "cannot_connect"
        ],
        "title": "HookValidateStatus"
      },
      "Icon": {
        "properties": {
          "src": {
            "type": "string",
            "title": "Src"
          },
          "mimeType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mimetype"
          },
          "sizes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sizes"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "src"
        ],
        "title": "Icon",
        "description": "An icon for display in user interfaces."
      },
      "IdReturn": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "IdReturn"
      },
      "ImageGenerationConfigCreate": {
        "properties": {
          "image_provider_id": {
            "type": "string",
            "title": "Image Provider Id"
          },
          "model_name": {
            "type": "string",
            "title": "Model Name"
          },
          "source_llm_provider_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Llm Provider Id"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "api_base": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Base"
          },
          "api_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Version"
          },
          "deployment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deployment Name"
          },
          "custom_config": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Config"
          },
          "is_default": {
            "type": "boolean",
            "title": "Is Default",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "image_provider_id",
          "model_name"
        ],
        "title": "ImageGenerationConfigCreate",
        "description": "Request model for creating an image generation config.\n\nTwo creation modes (backend always creates new LLM provider + model config):\n\n1. Clone mode: Provide source_llm_provider_id + model_name\n   \u2192 Backend extracts credentials from existing provider and creates new provider\n\n2. New credentials mode: Provide api_key + provider + model_name (+ optional fields)\n   \u2192 Backend creates new provider with provided credentials"
      },
      "ImageGenerationConfigUpdate": {
        "properties": {
          "model_name": {
            "type": "string",
            "title": "Model Name"
          },
          "source_llm_provider_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Llm Provider Id"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "api_base": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Base"
          },
          "api_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Version"
          },
          "deployment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deployment Name"
          },
          "custom_config": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Config"
          },
          "api_key_changed": {
            "type": "boolean",
            "title": "Api Key Changed",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "model_name"
        ],
        "title": "ImageGenerationConfigUpdate",
        "description": "Request model for updating an image generation config.\n\nSame modes as create - either clone from existing provider or use new credentials.\nBackend will delete old LLM provider and create new one."
      },
      "ImageGenerationConfigView": {
        "properties": {
          "image_provider_id": {
            "type": "string",
            "title": "Image Provider Id"
          },
          "model_configuration_id": {
            "type": "integer",
            "title": "Model Configuration Id"
          },
          "model_name": {
            "type": "string",
            "title": "Model Name"
          },
          "llm_provider_id": {
            "type": "integer",
            "title": "Llm Provider Id"
          },
          "llm_provider_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Provider Name"
          },
          "is_default": {
            "type": "boolean",
            "title": "Is Default"
          }
        },
        "type": "object",
        "required": [
          "image_provider_id",
          "model_configuration_id",
          "model_name",
          "llm_provider_id",
          "llm_provider_name",
          "is_default"
        ],
        "title": "ImageGenerationConfigView",
        "description": "Response model for image generation config with related data."
      },
      "ImageGenerationCredentials": {
        "properties": {
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "api_base": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Base"
          },
          "api_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Version"
          },
          "deployment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deployment Name"
          }
        },
        "type": "object",
        "required": [
          "api_key",
          "api_base",
          "api_version",
          "deployment_name"
        ],
        "title": "ImageGenerationCredentials",
        "description": "Response model for image generation config credentials (edit mode)."
      },
      "ImageGenerationFinal": {
        "properties": {
          "type": {
            "type": "string",
            "const": "image_generation_final",
            "title": "Type",
            "default": "image_generation_final"
          },
          "images": {
            "items": {
              "$ref": "#/components/schemas/GeneratedImage"
            },
            "type": "array",
            "title": "Images"
          }
        },
        "type": "object",
        "required": [
          "images"
        ],
        "title": "ImageGenerationFinal"
      },
      "ImageGenerationRequest": {
        "properties": {
          "prompt": {
            "type": "string",
            "title": "Prompt"
          },
          "shape": {
            "$ref": "#/components/schemas/ImageShape",
            "default": "square"
          },
          "n": {
            "type": "integer",
            "title": "N",
            "default": 1
          },
          "quality": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quality"
          },
          "reference_images": {
            "items": {
              "$ref": "#/components/schemas/ReferenceImagePayload"
            },
            "type": "array",
            "title": "Reference Images",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "prompt"
        ],
        "title": "ImageGenerationRequest"
      },
      "ImageGenerationResponse": {
        "properties": {
          "images": {
            "items": {
              "$ref": "#/components/schemas/GeneratedImagePayload"
            },
            "type": "array",
            "title": "Images"
          }
        },
        "type": "object",
        "required": [
          "images"
        ],
        "title": "ImageGenerationResponse"
      },
      "ImageGenerationToolHeartbeat": {
        "properties": {
          "type": {
            "type": "string",
            "const": "image_generation_heartbeat",
            "title": "Type",
            "default": "image_generation_heartbeat"
          }
        },
        "type": "object",
        "title": "ImageGenerationToolHeartbeat"
      },
      "ImageGenerationToolStart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "image_generation_start",
            "title": "Type",
            "default": "image_generation_start"
          }
        },
        "type": "object",
        "title": "ImageGenerationToolStart"
      },
      "ImageSection": {
        "properties": {
          "type": {
            "type": "string",
            "const": "image",
            "title": "Type",
            "default": "image"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          },
          "image_file_id": {
            "type": "string",
            "title": "Image File Id"
          },
          "heading": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Heading"
          }
        },
        "type": "object",
        "required": [
          "image_file_id"
        ],
        "title": "ImageSection",
        "description": "Section containing an image reference"
      },
      "ImageShape": {
        "type": "string",
        "enum": [
          "square",
          "portrait",
          "landscape"
        ],
        "title": "ImageShape"
      },
      "IncognitoAvailability": {
        "type": "string",
        "enum": [
          "off",
          "everyone",
          "groups"
        ],
        "title": "IncognitoAvailability",
        "description": "Who may start incognito chats. Secure default is OFF: the feature is\ninvisible until an admin turns it on."
      },
      "IncognitoAvailabilityResponse": {
        "properties": {
          "available": {
            "type": "boolean",
            "title": "Available"
          }
        },
        "type": "object",
        "required": [
          "available"
        ],
        "title": "IncognitoAvailabilityResponse"
      },
      "IncognitoRecordMode": {
        "type": "string",
        "enum": [
          "full_history",
          "usage_only"
        ],
        "title": "IncognitoRecordMode",
        "description": "What a workspace retains from an incognito chat.\n\nBoth modes keep the chat out of the owner's own history and refuse memory\nwrites. The mode governs what else the workspace may record. Every mode\nmeters usage, since token rate limits read those rows and incognito must\nnever become a quota-evasion route. Feature-off is deliberately not a\nmember: disabling incognito is an admin setting, never a mode pinned on a\nsession.\n\nValues differ from member names here, so the column storing this passes\n``values_callable`` to persist the value rather than the default name."
      },
      "IndexAttemptErrorPydantic": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "connector_credential_pair_id": {
            "type": "integer",
            "title": "Connector Credential Pair Id"
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Id"
          },
          "document_link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Link"
          },
          "entity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entity Id"
          },
          "failed_time_range_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failed Time Range Start"
          },
          "failed_time_range_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failed Time Range End"
          },
          "failure_message": {
            "type": "string",
            "title": "Failure Message"
          },
          "is_resolved": {
            "type": "boolean",
            "title": "Is Resolved",
            "default": false
          },
          "time_created": {
            "type": "string",
            "format": "date-time",
            "title": "Time Created"
          },
          "index_attempt_id": {
            "type": "integer",
            "title": "Index Attempt Id"
          },
          "error_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "id",
          "connector_credential_pair_id",
          "document_id",
          "document_link",
          "entity_id",
          "failed_time_range_start",
          "failed_time_range_end",
          "failure_message",
          "time_created",
          "index_attempt_id"
        ],
        "title": "IndexAttemptErrorPydantic"
      },
      "IndexAttemptSnapshot": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IndexingStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "from_beginning": {
            "type": "boolean",
            "title": "From Beginning"
          },
          "new_docs_indexed": {
            "type": "integer",
            "title": "New Docs Indexed"
          },
          "total_docs_indexed": {
            "type": "integer",
            "title": "Total Docs Indexed"
          },
          "docs_removed_from_index": {
            "type": "integer",
            "title": "Docs Removed From Index"
          },
          "error_msg": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Msg"
          },
          "error_count": {
            "type": "integer",
            "title": "Error Count"
          },
          "full_exception_trace": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Exception Trace"
          },
          "time_started": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Started"
          },
          "time_updated": {
            "type": "string",
            "title": "Time Updated"
          },
          "poll_range_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Poll Range Start"
          },
          "poll_range_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Poll Range End"
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "from_beginning",
          "new_docs_indexed",
          "total_docs_indexed",
          "docs_removed_from_index",
          "error_msg",
          "error_count",
          "full_exception_trace",
          "time_started",
          "time_updated"
        ],
        "title": "IndexAttemptSnapshot"
      },
      "IndexAttemptStage": {
        "type": "string",
        "enum": [
          "CONNECTOR_VALIDATION",
          "PERMISSION_VALIDATION",
          "CHECKPOINT_LOAD",
          "CONNECTOR_FETCH",
          "HIERARCHY_UPSERT",
          "DOC_BATCH_STORE",
          "DOC_BATCH_ENQUEUE",
          "QUEUE_WAIT",
          "DOCPROCESSING_SETUP",
          "BATCH_LOAD",
          "DOC_DB_PREPARE",
          "IMAGE_PROCESSING",
          "CHUNKING",
          "CONTEXTUAL_RAG",
          "EMBEDDING",
          "DOC_LOCK_ACQUIRE_WAIT",
          "ENRICHMENT_PREP",
          "VECTOR_DB_WRITE",
          "POST_INDEX_DB_UPDATE",
          "COORD_LOCK_ACQUIRE_WAIT",
          "COORDINATION_UPDATE",
          "FINALIZATION",
          "GC_COLLECT",
          "BATCH_UNACCOUNTED",
          "BATCH_TOTAL"
        ],
        "title": "IndexAttemptStage",
        "description": "Canonical pipeline stages for an `IndexAttempt`.\n\nMember declaration order matches the natural temporal order of the\npipeline (docfetching first, then docprocessing). Both backend\nserialization and frontend \"Pipeline order\" display rely on this."
      },
      "IndexAttemptStageMetricSnapshot": {
        "properties": {
          "stage": {
            "$ref": "#/components/schemas/IndexAttemptStage"
          },
          "scope": {
            "$ref": "#/components/schemas/StageScope"
          },
          "event_count": {
            "type": "integer",
            "title": "Event Count"
          },
          "total_duration_ms": {
            "type": "integer",
            "title": "Total Duration Ms"
          },
          "avg_duration_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avg Duration Ms"
          },
          "std_dev_duration_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Std Dev Duration Ms"
          },
          "min_duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Duration Ms"
          },
          "max_duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Duration Ms"
          },
          "time_first_event": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time First Event"
          },
          "time_last_event": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Last Event"
          }
        },
        "type": "object",
        "required": [
          "stage",
          "scope",
          "event_count",
          "total_duration_ms",
          "avg_duration_ms",
          "std_dev_duration_ms",
          "min_duration_ms",
          "max_duration_ms",
          "time_first_event",
          "time_last_event"
        ],
        "title": "IndexAttemptStageMetricSnapshot",
        "description": "Per-stage timing aggregate for a single ``IndexAttempt``.\n\n``avg_duration_ms`` and ``std_dev_duration_ms`` are derived at\nserialization time from the stored ``total_duration_ms`` and\n``m2_duration_ms`` (Welford / Chan accumulator). ``std_dev_duration_ms``\nis undefined for ``event_count <= 1`` and is reported as ``None`` in\nthat case so the frontend can render \"avg\" without \"\u00b1 std dev\"."
      },
      "IndexAttemptStageMetricsResponse": {
        "properties": {
          "index_attempt_id": {
            "type": "integer",
            "title": "Index Attempt Id"
          },
          "stages": {
            "items": {
              "$ref": "#/components/schemas/IndexAttemptStageMetricSnapshot"
            },
            "type": "array",
            "title": "Stages"
          }
        },
        "type": "object",
        "required": [
          "index_attempt_id",
          "stages"
        ],
        "title": "IndexAttemptStageMetricsResponse",
        "description": "Per-attempt stage rows (pipeline order) plus the BATCH_UNACCOUNTED residual\nappended last; the frontend re-sorts, so array order isn't load-bearing."
      },
      "IndexedSourcesResponse": {
        "properties": {
          "sources": {
            "items": {
              "$ref": "#/components/schemas/DocumentSource"
            },
            "type": "array",
            "title": "Sources"
          }
        },
        "type": "object",
        "required": [
          "sources"
        ],
        "title": "IndexedSourcesResponse"
      },
      "IndexingStatus": {
        "type": "string",
        "enum": [
          "not_started",
          "in_progress",
          "success",
          "canceled",
          "interrupted",
          "failed",
          "completed_with_errors"
        ],
        "title": "IndexingStatus"
      },
      "IndexingStatusRequest": {
        "properties": {
          "secondary_index": {
            "type": "boolean",
            "title": "Secondary Index",
            "default": false
          },
          "source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentSource"
              },
              {
                "type": "null"
              }
            ]
          },
          "access_type_filters": {
            "items": {
              "$ref": "#/components/schemas/AccessType"
            },
            "type": "array",
            "title": "Access Type Filters"
          },
          "last_status_filters": {
            "items": {
              "$ref": "#/components/schemas/IndexingStatus"
            },
            "type": "array",
            "title": "Last Status Filters"
          },
          "docs_count_operator": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocsCountOperator"
              },
              {
                "type": "null"
              }
            ]
          },
          "docs_count_value": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docs Count Value"
          },
          "name_filter": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name Filter"
          },
          "source_to_page": {
            "additionalProperties": {
              "type": "integer"
            },
            "propertyNames": {
              "$ref": "#/components/schemas/DocumentSource"
            },
            "type": "object",
            "title": "Source To Page"
          },
          "get_all_connectors": {
            "type": "boolean",
            "title": "Get All Connectors",
            "default": false
          }
        },
        "type": "object",
        "title": "IndexingStatusRequest"
      },
      "IngestionDocument": {
        "properties": {
          "document": {
            "$ref": "#/components/schemas/DocumentBase"
          },
          "cc_pair_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cc Pair Id"
          }
        },
        "type": "object",
        "required": [
          "document"
        ],
        "title": "IngestionDocument"
      },
      "IngestionResult": {
        "properties": {
          "document_id": {
            "type": "string",
            "title": "Document Id"
          },
          "already_existed": {
            "type": "boolean",
            "title": "Already Existed"
          }
        },
        "type": "object",
        "required": [
          "document_id",
          "already_existed"
        ],
        "title": "IngestionResult"
      },
      "InputPromptSnapshot": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "prompt": {
            "type": "string",
            "title": "Prompt"
          },
          "content": {
            "type": "string",
            "title": "Content"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public"
          }
        },
        "type": "object",
        "required": [
          "id",
          "prompt",
          "content",
          "active",
          "user_id",
          "is_public"
        ],
        "title": "InputPromptSnapshot"
      },
      "InputType": {
        "type": "string",
        "enum": [
          "load_state",
          "poll",
          "event",
          "slim_retrieval"
        ],
        "title": "InputType"
      },
      "InteractiveTurnResponse": {
        "properties": {
          "turn_id": {
            "type": "string",
            "title": "Turn Id"
          },
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "turn_index": {
            "type": "integer",
            "title": "Turn Index"
          }
        },
        "type": "object",
        "required": [
          "turn_id",
          "session_id",
          "status",
          "turn_index"
        ],
        "title": "InteractiveTurnResponse",
        "description": "Interactive turn lifecycle response."
      },
      "IntermediateReportCitedDocs": {
        "properties": {
          "type": {
            "type": "string",
            "const": "intermediate_report_cited_docs",
            "title": "Type",
            "default": "intermediate_report_cited_docs"
          },
          "cited_docs": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SearchDoc"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cited Docs"
          }
        },
        "type": "object",
        "title": "IntermediateReportCitedDocs"
      },
      "IntermediateReportDelta": {
        "properties": {
          "type": {
            "type": "string",
            "const": "intermediate_report_delta",
            "title": "Type",
            "default": "intermediate_report_delta"
          },
          "content": {
            "type": "string",
            "title": "Content"
          }
        },
        "type": "object",
        "required": [
          "content"
        ],
        "title": "IntermediateReportDelta"
      },
      "IntermediateReportStart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "intermediate_report_start",
            "title": "Type",
            "default": "intermediate_report_start"
          }
        },
        "type": "object",
        "title": "IntermediateReportStart"
      },
      "IntervalPayload": {
        "properties": {
          "unit": {
            "type": "string",
            "enum": [
              "minutes",
              "hours",
              "days"
            ],
            "title": "Unit"
          },
          "every": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Every"
          },
          "time_of_day": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Of Day"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "unit",
          "every"
        ],
        "title": "IntervalPayload",
        "description": "Validated payload for ``editor_mode == \"interval\"``."
      },
      "InvitedUserSnapshot": {
        "properties": {
          "email": {
            "type": "string",
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "InvitedUserSnapshot"
      },
      "IsFeaturedRequest": {
        "properties": {
          "is_featured": {
            "type": "boolean",
            "title": "Is Featured"
          }
        },
        "type": "object",
        "required": [
          "is_featured"
        ],
        "title": "IsFeaturedRequest"
      },
      "IsListedRequest": {
        "properties": {
          "is_listed": {
            "type": "boolean",
            "title": "Is Listed"
          }
        },
        "type": "object",
        "required": [
          "is_listed"
        ],
        "title": "IsListedRequest"
      },
      "IsPublicRequest": {
        "properties": {
          "is_public": {
            "type": "boolean",
            "title": "Is Public"
          }
        },
        "type": "object",
        "required": [
          "is_public"
        ],
        "title": "IsPublicRequest"
      },
      "KGConfig": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "vendor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vendor"
          },
          "vendor_domains": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vendor Domains"
          },
          "ignore_domains": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ignore Domains"
          },
          "coverage_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Coverage Start"
          }
        },
        "type": "object",
        "required": [
          "enabled",
          "vendor",
          "vendor_domains",
          "ignore_domains",
          "coverage_start"
        ],
        "title": "KGConfig"
      },
      "LLMCost": {
        "properties": {
          "provider_name": {
            "type": "string",
            "title": "Provider Name"
          },
          "model_name": {
            "type": "string",
            "title": "Model Name"
          },
          "cost": {
            "type": "number",
            "title": "Cost"
          }
        },
        "type": "object",
        "required": [
          "provider_name",
          "model_name",
          "cost"
        ],
        "title": "LLMCost"
      },
      "LLMOverride": {
        "properties": {
          "model_configuration_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Configuration Id"
          },
          "model_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Provider"
          },
          "model_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Version"
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          }
        },
        "type": "object",
        "title": "LLMOverride",
        "description": "Per-request LLM settings that override persona defaults.\n\nAll fields are optional \u2014 only the fields that differ from the persona's\nconfigured LLM need to be supplied. Used both over the wire (API requests)\nand for multi-model comparison, where one override is supplied per model.\n\nAttributes:\n    model_configuration_id: Exact model configuration to use. Preferred\n        over the name-based fields \u2014 provider display names are not\n        unique, so only the id routes unambiguously.\n    model_provider: LLM provider display name. When ``None``, the\n        persona's default provider is used.\n    model_version: Specific model version string (e.g. ``\"gpt-4o\"``).\n        When ``None``, the persona's default model is used.\n    temperature: Sampling temperature in ``[0, 2]``. When ``None``, the\n        persona's default temperature is used.\n    display_name: Human-readable label shown in the UI for this model,\n        e.g. ``\"GPT-4 Turbo\"``. Optional; falls back to ``model_version``\n        when not set."
      },
      "LLMProviderDescriptor": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "provider_display_name": {
            "type": "string",
            "title": "Provider Display Name"
          },
          "model_configurations": {
            "items": {
              "$ref": "#/components/schemas/ModelConfigurationView"
            },
            "type": "array",
            "title": "Model Configurations"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "provider",
          "provider_display_name",
          "model_configurations"
        ],
        "title": "LLMProviderDescriptor",
        "description": "A descriptor for an LLM provider that can be safely viewed by\nnon-admin users. Used when giving a list of available LLMs."
      },
      "LLMProviderResponse_LLMProviderDescriptor_": {
        "properties": {
          "providers": {
            "items": {
              "$ref": "#/components/schemas/LLMProviderDescriptor"
            },
            "type": "array",
            "title": "Providers"
          },
          "default_text": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DefaultModel"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_vision": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DefaultModel"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_chat_naming": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DefaultModel"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_craft": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DefaultModel"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "providers"
        ],
        "title": "LLMProviderResponse[LLMProviderDescriptor]"
      },
      "LLMProviderResponse_LLMProviderView_": {
        "properties": {
          "providers": {
            "items": {
              "$ref": "#/components/schemas/LLMProviderView"
            },
            "type": "array",
            "title": "Providers"
          },
          "default_text": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DefaultModel"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_vision": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DefaultModel"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_chat_naming": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DefaultModel"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_craft": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DefaultModel"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "providers"
        ],
        "title": "LLMProviderResponse[LLMProviderView]"
      },
      "LLMProviderResponse_VisionProviderResponse_": {
        "properties": {
          "providers": {
            "items": {
              "$ref": "#/components/schemas/VisionProviderResponse"
            },
            "type": "array",
            "title": "Providers"
          },
          "default_text": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DefaultModel"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_vision": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DefaultModel"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_chat_naming": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DefaultModel"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_craft": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DefaultModel"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "providers"
        ],
        "title": "LLMProviderResponse[VisionProviderResponse]"
      },
      "LLMProviderUpsertRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "api_base": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Base"
          },
          "api_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Version"
          },
          "custom_config": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Config"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public",
            "default": true
          },
          "is_auto_mode": {
            "type": "boolean",
            "title": "Is Auto Mode",
            "default": false
          },
          "groups": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Groups"
          },
          "personas": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Personas"
          },
          "deployment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deployment Name"
          },
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "api_key_changed": {
            "type": "boolean",
            "title": "Api Key Changed",
            "default": false
          },
          "custom_config_changed": {
            "type": "boolean",
            "title": "Custom Config Changed",
            "default": false
          },
          "keep_existing_models": {
            "type": "boolean",
            "title": "Keep Existing Models",
            "default": false
          },
          "model_configurations": {
            "items": {
              "$ref": "#/components/schemas/ModelConfigurationUpsertRequest"
            },
            "type": "array",
            "title": "Model Configurations",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "provider"
        ],
        "title": "LLMProviderUpsertRequest"
      },
      "LLMProviderView": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "api_base": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Base"
          },
          "api_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Version"
          },
          "custom_config": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Config"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public",
            "default": true
          },
          "is_auto_mode": {
            "type": "boolean",
            "title": "Is Auto Mode",
            "default": false
          },
          "groups": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Groups"
          },
          "personas": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Personas"
          },
          "deployment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deployment Name"
          },
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "model_configurations": {
            "items": {
              "$ref": "#/components/schemas/ModelConfigurationView"
            },
            "type": "array",
            "title": "Model Configurations"
          }
        },
        "type": "object",
        "required": [
          "provider",
          "id",
          "model_configurations"
        ],
        "title": "LLMProviderView",
        "description": "Stripped down representation of LLMProvider for display / limited access info only"
      },
      "LMStudioFinalModelResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "max_input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Tokens"
          },
          "supports_image_input": {
            "type": "boolean",
            "title": "Supports Image Input"
          },
          "supports_reasoning": {
            "type": "boolean",
            "title": "Supports Reasoning"
          }
        },
        "type": "object",
        "required": [
          "name",
          "display_name",
          "max_input_tokens",
          "supports_image_input",
          "supports_reasoning"
        ],
        "title": "LMStudioFinalModelResponse"
      },
      "LMStudioModelsRequest": {
        "properties": {
          "api_base": {
            "type": "string",
            "title": "Api Base"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "api_key_changed": {
            "type": "boolean",
            "title": "Api Key Changed",
            "default": false
          },
          "provider_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Id"
          }
        },
        "type": "object",
        "required": [
          "api_base"
        ],
        "title": "LMStudioModelsRequest"
      },
      "LanguageRequest": {
        "properties": {
          "language": {
            "$ref": "#/components/schemas/SupportedLanguage"
          }
        },
        "type": "object",
        "required": [
          "language"
        ],
        "title": "LanguageRequest"
      },
      "LearningPolicyRequest": {
        "properties": {
          "mode": {
            "$ref": "#/components/schemas/SchoolLearningMode"
          },
          "base_revision": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Base Revision"
          },
          "guardrail_text": {
            "type": "string",
            "maxLength": 4000,
            "title": "Guardrail Text",
            "default": ""
          },
          "allowed_model_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "maxItems": 20,
            "minItems": 1,
            "title": "Allowed Model Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "mode",
          "base_revision",
          "allowed_model_ids"
        ],
        "title": "LearningPolicyRequest"
      },
      "LearningPolicyResponse": {
        "properties": {
          "class_id": {
            "type": "string",
            "format": "uuid",
            "title": "Class Id"
          },
          "mode": {
            "$ref": "#/components/schemas/SchoolLearningMode"
          },
          "revision": {
            "type": "integer",
            "title": "Revision"
          },
          "guardrail_text": {
            "type": "string",
            "title": "Guardrail Text"
          },
          "allowed_model_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Allowed Model Ids"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "class_id",
          "mode",
          "revision",
          "guardrail_text",
          "allowed_model_ids"
        ],
        "title": "LearningPolicyResponse"
      },
      "LibraryEntryResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "is_directory": {
            "type": "boolean",
            "title": "Is Directory"
          },
          "file_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Size"
          },
          "mime_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mime Type"
          },
          "sync_enabled": {
            "type": "boolean",
            "title": "Sync Enabled"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "children": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/LibraryEntryResponse"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Children"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "path",
          "is_directory",
          "file_size",
          "mime_type",
          "sync_enabled",
          "created_at"
        ],
        "title": "LibraryEntryResponse"
      },
      "LicensePayload": {
        "properties": {
          "version": {
            "type": "string",
            "title": "Version"
          },
          "tenant_id": {
            "type": "string",
            "title": "Tenant Id"
          },
          "organization_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Name"
          },
          "issued_at": {
            "type": "string",
            "format": "date-time",
            "title": "Issued At"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
          },
          "seats": {
            "type": "integer",
            "title": "Seats"
          },
          "plan_type": {
            "$ref": "#/components/schemas/PlanType"
          },
          "billing_cycle": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Cycle"
          },
          "grace_period_days": {
            "type": "integer",
            "title": "Grace Period Days",
            "default": 30
          },
          "stripe_subscription_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Subscription Id"
          },
          "stripe_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Customer Id"
          },
          "customer_tier": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomerTier"
              },
              {
                "type": "null"
              }
            ]
          },
          "trial_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial End"
          }
        },
        "type": "object",
        "required": [
          "version",
          "tenant_id",
          "issued_at",
          "expires_at",
          "seats",
          "plan_type"
        ],
        "title": "LicensePayload",
        "description": "The payload portion of a signed license."
      },
      "LicenseResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "license": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LicensePayload"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "success"
        ],
        "title": "LicenseResponse",
        "description": "Response after license fetch/upload."
      },
      "LicenseSource": {
        "type": "string",
        "enum": [
          "auto_fetch",
          "manual_upload"
        ],
        "title": "LicenseSource",
        "description": "Whether a license can be re-fetched from the control plane on its own."
      },
      "LicenseStatusResponse": {
        "properties": {
          "has_license": {
            "type": "boolean",
            "title": "Has License"
          },
          "seats": {
            "type": "integer",
            "title": "Seats",
            "default": 0
          },
          "used_seats": {
            "type": "integer",
            "title": "Used Seats",
            "default": 0
          },
          "plan_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PlanType"
              },
              {
                "type": "null"
              }
            ]
          },
          "issued_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issued At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "grace_period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grace Period End"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApplicationStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "expiry_warning_stage": {
            "$ref": "#/components/schemas/ExpiryWarningStage",
            "default": "none"
          },
          "source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LicenseSource"
              },
              {
                "type": "null"
              }
            ]
          },
          "trial_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial End"
          }
        },
        "type": "object",
        "required": [
          "has_license"
        ],
        "title": "LicenseStatusResponse",
        "description": "Response for license status API."
      },
      "LicenseUploadResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "success"
        ],
        "title": "LicenseUploadResponse",
        "description": "Response after license upload."
      },
      "LitellmFinalModelResponse": {
        "properties": {
          "provider_name": {
            "type": "string",
            "title": "Provider Name"
          },
          "model_name": {
            "type": "string",
            "title": "Model Name"
          },
          "litellm_params_model": {
            "type": "string",
            "title": "Litellm Params Model"
          },
          "max_input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Tokens"
          },
          "supports_image_input": {
            "type": "boolean",
            "title": "Supports Image Input",
            "default": false
          },
          "supports_reasoning": {
            "type": "boolean",
            "title": "Supports Reasoning",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "provider_name",
          "model_name",
          "litellm_params_model"
        ],
        "title": "LitellmFinalModelResponse"
      },
      "LitellmModelsRequest": {
        "properties": {
          "api_key": {
            "type": "string",
            "title": "Api Key"
          },
          "api_base": {
            "type": "string",
            "title": "Api Base"
          },
          "provider_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Id"
          }
        },
        "type": "object",
        "required": [
          "api_key",
          "api_base"
        ],
        "title": "LitellmModelsRequest"
      },
      "LlmOpenUrlResult": {
        "properties": {
          "document_citation_number": {
            "type": "integer",
            "title": "Document Citation Number"
          },
          "unique_identifier_to_strip_away": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unique Identifier To Strip Away"
          },
          "type": {
            "type": "string",
            "const": "open_url",
            "title": "Type",
            "default": "open_url"
          },
          "content": {
            "type": "string",
            "title": "Content"
          }
        },
        "type": "object",
        "required": [
          "document_citation_number",
          "content"
        ],
        "title": "LlmOpenUrlResult",
        "description": "Result from opening/fetching a URL"
      },
      "LlmWebSearchResult": {
        "properties": {
          "document_citation_number": {
            "type": "integer",
            "title": "Document Citation Number"
          },
          "unique_identifier_to_strip_away": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unique Identifier To Strip Away"
          },
          "type": {
            "type": "string",
            "const": "web_search",
            "title": "Type",
            "default": "web_search"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "snippet": {
            "type": "string",
            "title": "Snippet"
          }
        },
        "type": "object",
        "required": [
          "document_citation_number",
          "url",
          "title",
          "snippet"
        ],
        "title": "LlmWebSearchResult",
        "description": "Result from a web search query"
      },
      "LogExportReceipt": {
        "properties": {
          "export_id": {
            "type": "string",
            "title": "Export Id"
          },
          "worker_name": {
            "type": "string",
            "title": "Worker Name"
          },
          "hostname": {
            "type": "string",
            "title": "Hostname"
          },
          "status": {
            "$ref": "#/components/schemas/LogExportReceiptStatus"
          },
          "file_count": {
            "type": "integer",
            "title": "File Count"
          },
          "size_bytes": {
            "type": "integer",
            "title": "Size Bytes"
          },
          "collected_at": {
            "type": "string",
            "format": "date-time",
            "title": "Collected At"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "export_id",
          "worker_name",
          "hostname",
          "status",
          "file_count",
          "size_bytes",
          "collected_at"
        ],
        "title": "LogExportReceipt",
        "description": "Outcome report written by each collector, one per fanned-out worker.\n\nReceipts mean \"this worker reported\"; pieces must be discovered by listing\nthe export's file-ID prefix, never derived from receipt statuses."
      },
      "LogExportReceiptStatus": {
        "type": "string",
        "enum": [
          "uploaded",
          "duplicate_host",
          "no_logs_found",
          "failed"
        ],
        "title": "LogExportReceiptStatus"
      },
      "LogExportStartResponse": {
        "properties": {
          "export_id": {
            "type": "string",
            "title": "Export Id"
          }
        },
        "type": "object",
        "required": [
          "export_id"
        ],
        "title": "LogExportStartResponse"
      },
      "LogExportState": {
        "type": "string",
        "enum": [
          "collecting",
          "ready"
        ],
        "title": "LogExportState"
      },
      "LogExportStatusResponse": {
        "properties": {
          "export_id": {
            "type": "string",
            "title": "Export Id"
          },
          "state": {
            "$ref": "#/components/schemas/LogExportState"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "deadline": {
            "type": "string",
            "format": "date-time",
            "title": "Deadline"
          },
          "receipts": {
            "items": {
              "$ref": "#/components/schemas/LogExportReceipt"
            },
            "type": "array",
            "title": "Receipts"
          },
          "pending_worker_names": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Pending Worker Names"
          }
        },
        "type": "object",
        "required": [
          "export_id",
          "state",
          "created_at",
          "deadline",
          "receipts",
          "pending_worker_names"
        ],
        "title": "LogExportStatusResponse"
      },
      "LogoDisplayStyle": {
        "type": "string",
        "enum": [
          "logo_and_name",
          "logo_only",
          "name_only"
        ],
        "title": "LogoDisplayStyle"
      },
      "MCPApiKeyResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "server_id": {
            "type": "integer",
            "title": "Server Id"
          },
          "server_name": {
            "type": "string",
            "title": "Server Name"
          },
          "authenticated": {
            "type": "boolean",
            "title": "Authenticated"
          },
          "validation_tested": {
            "type": "boolean",
            "title": "Validation Tested",
            "description": "Whether credentials were tested against MCP server",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "success",
          "message",
          "server_id",
          "server_name",
          "authenticated"
        ],
        "title": "MCPApiKeyResponse"
      },
      "MCPAuthTemplate": {
        "properties": {
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Headers",
            "description": "Map of header names to templates with placeholders"
          },
          "required_fields": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Required Fields",
            "description": "List of required field names that users must provide"
          }
        },
        "type": "object",
        "title": "MCPAuthTemplate",
        "description": "Header template shared by every MCP authentication type."
      },
      "MCPAuthenticationPerformer": {
        "type": "string",
        "enum": [
          "ADMIN",
          "PER_USER"
        ],
        "title": "MCPAuthenticationPerformer"
      },
      "MCPAuthenticationType": {
        "type": "string",
        "enum": [
          "NONE",
          "API_TOKEN",
          "OAUTH",
          "PT_OAUTH"
        ],
        "title": "MCPAuthenticationType"
      },
      "MCPOAuthCallbackResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "server_id": {
            "type": "integer",
            "title": "Server Id"
          },
          "server_name": {
            "type": "string",
            "title": "Server Name"
          },
          "redirect_url": {
            "type": "string",
            "title": "Redirect Url"
          }
        },
        "type": "object",
        "required": [
          "success",
          "message",
          "server_id",
          "server_name",
          "redirect_url"
        ],
        "title": "MCPOAuthCallbackResponse"
      },
      "MCPOAuthClientMetadataDocument": {
        "properties": {
          "client_id": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "title": "Client Id"
          },
          "client_name": {
            "type": "string",
            "title": "Client Name"
          },
          "redirect_uris": {
            "items": {
              "type": "string",
              "minLength": 1,
              "format": "uri"
            },
            "type": "array",
            "title": "Redirect Uris"
          },
          "grant_types": {
            "items": {
              "type": "string",
              "enum": [
                "authorization_code",
                "refresh_token"
              ]
            },
            "type": "array",
            "title": "Grant Types"
          },
          "response_types": {
            "items": {
              "type": "string",
              "const": "code"
            },
            "type": "array",
            "title": "Response Types"
          },
          "token_endpoint_auth_method": {
            "type": "string",
            "const": "none",
            "title": "Token Endpoint Auth Method"
          }
        },
        "type": "object",
        "required": [
          "client_id",
          "client_name",
          "redirect_uris",
          "grant_types",
          "response_types",
          "token_endpoint_auth_method"
        ],
        "title": "MCPOAuthClientMetadataDocument"
      },
      "MCPOAuthProviderMode": {
        "type": "string",
        "enum": [
          "AUTO_DISCOVERY",
          "KNOWN_PROVIDER"
        ],
        "title": "MCPOAuthProviderMode"
      },
      "MCPServer": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "server_url": {
            "type": "string",
            "title": "Server Url"
          },
          "owner": {
            "type": "string",
            "title": "Owner"
          },
          "transport": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCPTransport"
              },
              {
                "type": "null"
              }
            ]
          },
          "auth_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCPAuthenticationType"
              },
              {
                "type": "null"
              }
            ]
          },
          "auth_performer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCPAuthenticationPerformer"
              },
              {
                "type": "null"
              }
            ]
          },
          "oauth_provider_mode": {
            "$ref": "#/components/schemas/MCPOAuthProviderMode",
            "default": "AUTO_DISCOVERY"
          },
          "oauth_authorization_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Authorization Endpoint"
          },
          "oauth_token_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Token Endpoint"
          },
          "oauth_scopes_override": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Scopes Override"
          },
          "oauth_additional_auth_params": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Additional Auth Params"
          },
          "user_can_authenticate": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Can Authenticate"
          },
          "status": {
            "$ref": "#/components/schemas/MCPServerStatus"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public",
            "default": true
          },
          "groups": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Groups"
          },
          "users": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Users"
          },
          "available_in_craft": {
            "type": "boolean",
            "title": "Available In Craft",
            "default": false
          },
          "tool_policies": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/EndpointPolicy"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Policies",
            "description": "Stored per-tool Craft approval overrides (sparse; unlisted tools default to ASK). Owner/admin views only."
          },
          "last_refreshed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Refreshed At"
          },
          "tool_count": {
            "type": "integer",
            "title": "Tool Count",
            "description": "Number of tools associated with this server",
            "default": 0
          },
          "auth_template": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCPAuthTemplate"
              },
              {
                "type": "null"
              }
            ],
            "description": "Authentication template for per-user auth"
          },
          "user_credentials": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Credentials",
            "description": "User's existing credentials for pre-filling forms"
          },
          "admin_credentials": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Admin Credentials",
            "description": "Admin's credential key-value pairs for template substitution and storage"
          },
          "permissions": {
            "additionalProperties": {
              "type": "boolean"
            },
            "type": "object",
            "title": "Permissions"
          },
          "craft_connected": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Craft Connected",
            "description": "Whether Craft can authenticate this user against the server. None outside the Craft listing, the only one that computes it."
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "server_url",
          "owner",
          "status"
        ],
        "title": "MCPServer"
      },
      "MCPServerCreateResponse": {
        "properties": {
          "server_id": {
            "type": "integer",
            "title": "Server Id"
          },
          "server_name": {
            "type": "string",
            "title": "Server Name"
          },
          "server_url": {
            "type": "string",
            "title": "Server Url"
          },
          "auth_type": {
            "type": "string",
            "title": "Auth Type"
          },
          "auth_performer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auth Performer"
          },
          "oauth_provider_mode": {
            "$ref": "#/components/schemas/MCPOAuthProviderMode",
            "default": "AUTO_DISCOVERY"
          },
          "oauth_authorization_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Authorization Endpoint"
          },
          "oauth_token_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Token Endpoint"
          },
          "oauth_scopes_override": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Scopes Override"
          },
          "oauth_additional_auth_params": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Additional Auth Params"
          },
          "no_user_authentication_required": {
            "type": "boolean",
            "title": "No User Authentication Required"
          }
        },
        "type": "object",
        "required": [
          "server_id",
          "server_name",
          "server_url",
          "auth_type",
          "auth_performer",
          "no_user_authentication_required"
        ],
        "title": "MCPServerCreateResponse",
        "description": "Response for creating multiple MCP tools"
      },
      "MCPServerSimpleCreateRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the MCP server"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Description of the MCP server"
          },
          "server_url": {
            "type": "string",
            "title": "Server Url",
            "description": "URL of the MCP server"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public",
            "description": "If True, any user may add this server's tools to their agents. If False, access is limited to `users` / `groups`.",
            "default": true
          },
          "groups": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Groups",
            "description": "User group IDs allowed to use this server when not public"
          },
          "users": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Users",
            "description": "User IDs allowed to use this server when not public"
          }
        },
        "type": "object",
        "required": [
          "name",
          "server_url"
        ],
        "title": "MCPServerSimpleCreateRequest"
      },
      "MCPServerSimpleUpdateRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Name of the MCP server"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Description of the MCP server"
          },
          "server_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Server Url",
            "description": "URL of the MCP server"
          },
          "tool_policies": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/EndpointPolicy"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Policies",
            "description": "Sparse per-tool Craft approval overrides keyed by tool name; replaces the stored set. Unlisted tools use the default (ASK). None leaves existing overrides unchanged."
          },
          "is_public": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Public",
            "description": "If True, any user may add this server's tools to their agents. If False, access is limited to `users` / `groups`. None leaves existing access unchanged."
          },
          "groups": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Groups",
            "description": "User group IDs allowed to use this server when not public"
          },
          "users": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Users",
            "description": "User IDs allowed to use this server when not public"
          },
          "available_in_craft": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Available In Craft",
            "description": "Whether the Craft agent may use this server"
          }
        },
        "type": "object",
        "title": "MCPServerSimpleUpdateRequest"
      },
      "MCPServerStatus": {
        "type": "string",
        "enum": [
          "CREATED",
          "AWAITING_AUTH",
          "FETCHING_TOOLS",
          "CONNECTED",
          "DISCONNECTED"
        ],
        "title": "MCPServerStatus"
      },
      "MCPServerUpdateResponse": {
        "properties": {
          "server_id": {
            "type": "integer",
            "title": "Server Id"
          },
          "server_name": {
            "type": "string",
            "title": "Server Name"
          },
          "updated_tools": {
            "type": "integer",
            "title": "Updated Tools"
          }
        },
        "type": "object",
        "required": [
          "server_id",
          "server_name",
          "updated_tools"
        ],
        "title": "MCPServerUpdateResponse",
        "description": "Response for updating multiple MCP tools"
      },
      "MCPServersResponse": {
        "properties": {
          "assistant_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assistant Id"
          },
          "mcp_servers": {
            "items": {
              "$ref": "#/components/schemas/MCPServer"
            },
            "type": "array",
            "title": "Mcp Servers"
          }
        },
        "type": "object",
        "required": [
          "mcp_servers"
        ],
        "title": "MCPServersResponse"
      },
      "MCPToolCreateRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the MCP tool"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Description of the MCP tool"
          },
          "server_url": {
            "type": "string",
            "title": "Server Url",
            "description": "URL of the MCP server"
          },
          "auth_type": {
            "$ref": "#/components/schemas/MCPAuthenticationType",
            "description": "Authentication type"
          },
          "auth_performer": {
            "$ref": "#/components/schemas/MCPAuthenticationPerformer",
            "description": "Who performs authentication"
          },
          "api_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Token",
            "description": "API token for api_token auth type"
          },
          "api_token_changed": {
            "type": "boolean",
            "title": "Api Token Changed",
            "description": "True if the shared API token was edited. When False on an update, the stored token is reused instead of the masked request value.",
            "default": false
          },
          "oauth_client_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Client Id",
            "description": "OAuth client ID"
          },
          "oauth_client_secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Client Secret",
            "description": "OAuth client secret"
          },
          "oauth_provider_mode": {
            "$ref": "#/components/schemas/MCPOAuthProviderMode",
            "description": "OAuth provider bootstrap mode. AUTO_DISCOVERY uses SDK challenge/metadata discovery; KNOWN_PROVIDER uses admin-configured endpoints.",
            "default": "AUTO_DISCOVERY"
          },
          "oauth_authorization_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Authorization Endpoint",
            "description": "Known-provider OAuth authorization endpoint URL"
          },
          "oauth_token_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Token Endpoint",
            "description": "Known-provider OAuth token endpoint URL"
          },
          "oauth_scopes_override": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Scopes Override",
            "description": "Optional scope override for known-provider OAuth"
          },
          "oauth_additional_auth_params": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Additional Auth Params",
            "description": "Optional extra query parameters for the authorization URL"
          },
          "oauth_client_id_changed": {
            "type": "boolean",
            "title": "Oauth Client Id Changed",
            "description": "True if `oauth_client_id` was edited by the user. When False on an update of an existing server, the stored value is reused and the request value is ignored. Defaults to False for backward compatibility with older clients that don't send the flag.",
            "default": false
          },
          "oauth_client_secret_changed": {
            "type": "boolean",
            "title": "Oauth Client Secret Changed",
            "description": "True if `oauth_client_secret` was edited by the user. When False on an update of an existing server, the stored value is reused and the request value is ignored.",
            "default": false
          },
          "transport": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCPTransport"
              },
              {
                "type": "null"
              }
            ],
            "description": "MCP transport type (STREAMABLE_HTTP or SSE)"
          },
          "auth_template": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCPAuthTemplate"
              },
              {
                "type": "null"
              }
            ],
            "description": "Headers sent to the MCP server. Values may contain placeholders supplied per user."
          },
          "auth_template_headers_changed": {
            "additionalProperties": {
              "type": "boolean"
            },
            "type": "object",
            "title": "Auth Template Headers Changed",
            "description": "Per-header flags marking edited template values."
          },
          "admin_credentials": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Admin Credentials",
            "description": "Admin's credential key-value pairs for template substitution and storage"
          },
          "admin_credentials_changed": {
            "additionalProperties": {
              "type": "boolean"
            },
            "type": "object",
            "title": "Admin Credentials Changed",
            "description": "Per-field flags marking which `admin_credentials` were edited"
          },
          "existing_server_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Existing Server Id",
            "description": "ID of existing server to update (for editing)"
          },
          "is_public": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Public",
            "description": "If True, any user may add this server's tools to their agents. If False, access is limited to `users` / `groups`. None leaves existing access unchanged."
          },
          "groups": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Groups",
            "description": "User group IDs allowed to use this server when not public"
          },
          "users": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Users",
            "description": "User IDs allowed to use this server when not public"
          }
        },
        "type": "object",
        "required": [
          "name",
          "server_url",
          "auth_type",
          "auth_performer"
        ],
        "title": "MCPToolCreateRequest"
      },
      "MCPToolDescription": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "display_name",
          "description"
        ],
        "title": "MCPToolDescription"
      },
      "MCPToolListResponse": {
        "properties": {
          "server_id": {
            "type": "integer",
            "title": "Server Id"
          },
          "server_name": {
            "type": "string",
            "title": "Server Name"
          },
          "server_url": {
            "type": "string",
            "title": "Server Url"
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/Tool"
            },
            "type": "array",
            "title": "Tools"
          }
        },
        "type": "object",
        "required": [
          "server_id",
          "server_name",
          "server_url",
          "tools"
        ],
        "title": "MCPToolListResponse"
      },
      "MCPToolUpdateRequest": {
        "properties": {
          "server_id": {
            "type": "integer",
            "title": "Server Id",
            "description": "ID of the MCP server"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Updated name of the MCP server"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Updated description of the MCP server"
          },
          "selected_tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Selected Tools",
            "description": "List of selected tool names to create"
          }
        },
        "type": "object",
        "required": [
          "server_id"
        ],
        "title": "MCPToolUpdateRequest"
      },
      "MCPTransport": {
        "type": "string",
        "enum": [
          "STDIO",
          "SSE",
          "STREAMABLE_HTTP"
        ],
        "title": "MCPTransport",
        "description": "MCP transport types"
      },
      "MCPUserCredentialsRequest": {
        "properties": {
          "server_id": {
            "type": "integer",
            "title": "Server Id",
            "description": "ID of the MCP server"
          },
          "credentials": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Credentials",
            "description": "User-provided credentials (api_key, custom_token, etc.)"
          },
          "transport": {
            "type": "string",
            "title": "Transport",
            "description": "Transport type"
          }
        },
        "type": "object",
        "required": [
          "server_id",
          "credentials",
          "transport"
        ],
        "title": "MCPUserCredentialsRequest",
        "description": "Enhanced request for template-based user credentials"
      },
      "MCPUserOAuthConnectRequest": {
        "properties": {
          "server_id": {
            "type": "integer",
            "title": "Server Id",
            "description": "ID of the MCP server"
          },
          "return_path": {
            "type": "string",
            "title": "Return Path",
            "description": "Path to redirect to after callback"
          },
          "include_resource_param": {
            "type": "boolean",
            "title": "Include Resource Param",
            "description": "Include resource parameter"
          },
          "force_reauthentication": {
            "type": "boolean",
            "title": "Force Reauthentication",
            "description": "Ignore stored OAuth tokens and start a fresh authorization flow",
            "default": false
          },
          "oauth_client_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Client Id",
            "description": "OAuth client ID (optional for CIMD or DCR)"
          },
          "oauth_client_secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Client Secret",
            "description": "OAuth client secret (optional for CIMD or DCR)"
          },
          "oauth_client_id_changed": {
            "type": "boolean",
            "title": "Oauth Client Id Changed",
            "description": "True if `oauth_client_id` was edited by the user. When False, the stored value is reused and the request value is ignored. Defaults to False for backward compatibility.",
            "default": false
          },
          "oauth_client_secret_changed": {
            "type": "boolean",
            "title": "Oauth Client Secret Changed",
            "description": "True if `oauth_client_secret` was edited by the user. When False, the stored value is reused and the request value is ignored.",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "server_id",
          "return_path",
          "include_resource_param"
        ],
        "title": "MCPUserOAuthConnectRequest"
      },
      "MCPUserOAuthConnectResponse": {
        "properties": {
          "server_id": {
            "type": "integer",
            "title": "Server Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "authorization_required",
              "already_authenticated"
            ],
            "title": "Status"
          },
          "authorization_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Authorization Url"
          },
          "redirect_url": {
            "type": "string",
            "title": "Redirect Url"
          }
        },
        "type": "object",
        "required": [
          "server_id",
          "status",
          "redirect_url"
        ],
        "title": "MCPUserOAuthConnectResponse"
      },
      "MatchedAction": {
        "properties": {
          "action_type": {
            "type": "string",
            "title": "Action Type"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "policy": {
            "$ref": "#/components/schemas/EndpointPolicy"
          }
        },
        "type": "object",
        "required": [
          "action_type",
          "display_name",
          "description",
          "policy"
        ],
        "title": "MatchedAction",
        "description": "One catalog action a request invoked, with the display strings the\nFE renders. Carried verbatim from matcher through DB JSONB to API."
      },
      "MaxSelectedDocumentTokens": {
        "properties": {
          "max_tokens": {
            "type": "integer",
            "title": "Max Tokens"
          }
        },
        "type": "object",
        "required": [
          "max_tokens"
        ],
        "title": "MaxSelectedDocumentTokens"
      },
      "MembershipRequest": {
        "properties": {
          "role": {
            "$ref": "#/components/schemas/SchoolMembershipRole"
          },
          "active": {
            "type": "boolean",
            "title": "Active",
            "default": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "role"
        ],
        "title": "MembershipRequest"
      },
      "MemoryItem": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "content": {
            "type": "string",
            "title": "Content"
          }
        },
        "type": "object",
        "required": [
          "content"
        ],
        "title": "MemoryItem"
      },
      "MemoryToolDelta": {
        "properties": {
          "type": {
            "type": "string",
            "const": "memory_tool_delta",
            "title": "Type",
            "default": "memory_tool_delta"
          },
          "memory_text": {
            "type": "string",
            "title": "Memory Text"
          },
          "operation": {
            "type": "string",
            "enum": [
              "add",
              "update"
            ],
            "title": "Operation"
          },
          "memory_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memory Id"
          },
          "index": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Index"
          }
        },
        "type": "object",
        "required": [
          "memory_text",
          "operation"
        ],
        "title": "MemoryToolDelta"
      },
      "MemoryToolNoAccess": {
        "properties": {
          "type": {
            "type": "string",
            "const": "memory_tool_no_access",
            "title": "Type",
            "default": "memory_tool_no_access"
          }
        },
        "type": "object",
        "title": "MemoryToolNoAccess"
      },
      "MemoryToolStart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "memory_tool_start",
            "title": "Type",
            "default": "memory_tool_start"
          }
        },
        "type": "object",
        "title": "MemoryToolStart"
      },
      "MessageAttachment": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "mime_type": {
            "type": "string",
            "title": "Mime Type"
          }
        },
        "type": "object",
        "required": [
          "name",
          "path",
          "mime_type"
        ],
        "title": "MessageAttachment",
        "description": "A sandbox file attached to a user message."
      },
      "MessageInterruptResponse": {
        "properties": {
          "interrupted": {
            "type": "boolean",
            "title": "Interrupted"
          }
        },
        "type": "object",
        "required": [
          "interrupted"
        ],
        "title": "MessageInterruptResponse",
        "description": "Response to an interrupt request. ``interrupted`` is False when there was\nno directly-interruptible turn (no running sandbox or no opencode session);\nthe interrupt fence is set regardless."
      },
      "MessageListResponse": {
        "properties": {
          "messages": {
            "items": {
              "$ref": "#/components/schemas/MessageResponse"
            },
            "type": "array",
            "title": "Messages"
          }
        },
        "type": "object",
        "required": [
          "messages"
        ],
        "title": "MessageListResponse",
        "description": "Response containing list of messages."
      },
      "MessageOrigin": {
        "type": "string",
        "enum": [
          "webapp",
          "chrome_extension",
          "api",
          "slackbot",
          "widget",
          "discordbot",
          "mobile",
          "unknown",
          "unset"
        ],
        "title": "MessageOrigin",
        "description": "Origin of a chat message for telemetry tracking."
      },
      "MessageRequest": {
        "properties": {
          "content": {
            "type": "string",
            "title": "Content"
          },
          "client_request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Request Id"
          },
          "attachments": {
            "items": {
              "$ref": "#/components/schemas/MessageAttachment"
            },
            "type": "array",
            "title": "Attachments"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "provider_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Id"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          }
        },
        "type": "object",
        "required": [
          "content"
        ],
        "title": "MessageRequest",
        "description": "Request to send a message to the CLI agent."
      },
      "MessageResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "turn_index": {
            "type": "integer",
            "title": "Turn Index"
          },
          "type": {
            "$ref": "#/components/schemas/MessageType"
          },
          "message_metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Message Metadata"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "session_id",
          "turn_index",
          "type",
          "message_metadata",
          "created_at"
        ],
        "title": "MessageResponse",
        "description": "Response containing message details.\n\nAll message data is stored in message_metadata as JSON (the raw sandbox event packet).\nThe turn_index groups all assistant responses under the user prompt they respond to.\n\nPacket types in message_metadata:\n- user_message: {type: \"user_message\", content: {...}}\n- agent_message: {type: \"agent_message\", content: {...}}\n- agent_thought: {type: \"agent_thought\", content: {...}}\n- tool_call_progress: {type: \"tool_call_progress\", status: \"completed\", ...}\n- agent_plan_update: {type: \"agent_plan_update\", entries: [...]}"
      },
      "MessageSnapshot": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "message_type": {
            "$ref": "#/components/schemas/MessageType"
          },
          "documents": {
            "items": {
              "$ref": "#/components/schemas/AbridgedSearchDoc"
            },
            "type": "array",
            "title": "Documents"
          },
          "feedback_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/QAFeedbackType"
              },
              {
                "type": "null"
              }
            ]
          },
          "feedback_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Feedback Text"
          },
          "time_created": {
            "type": "string",
            "format": "date-time",
            "title": "Time Created"
          }
        },
        "type": "object",
        "required": [
          "id",
          "message",
          "message_type",
          "documents",
          "feedback_type",
          "feedback_text",
          "time_created"
        ],
        "title": "MessageSnapshot"
      },
      "MessageType": {
        "type": "string",
        "enum": [
          "system",
          "user",
          "assistant",
          "tool_call_response",
          "user_reminder"
        ],
        "title": "MessageType"
      },
      "MethodSpec": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "raw_name": {
            "type": "string",
            "title": "Raw Name"
          },
          "summary": {
            "type": "string",
            "title": "Summary"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "method": {
            "type": "string",
            "title": "Method"
          },
          "spec": {
            "additionalProperties": true,
            "type": "object",
            "title": "Spec"
          }
        },
        "type": "object",
        "required": [
          "name",
          "raw_name",
          "summary",
          "path",
          "method",
          "spec"
        ],
        "title": "MethodSpec"
      },
      "MinimalPersonaSnapshot": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/ToolSnapshot"
            },
            "type": "array",
            "title": "Tools"
          },
          "starter_messages": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/StarterMessage"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starter Messages"
          },
          "document_sets": {
            "items": {
              "$ref": "#/components/schemas/DocumentSetSummary"
            },
            "type": "array",
            "title": "Document Sets"
          },
          "hierarchy_node_count": {
            "type": "integer",
            "title": "Hierarchy Node Count"
          },
          "attached_document_count": {
            "type": "integer",
            "title": "Attached Document Count"
          },
          "knowledge_sources": {
            "items": {
              "$ref": "#/components/schemas/DocumentSource"
            },
            "type": "array",
            "title": "Knowledge Sources"
          },
          "default_model_configuration_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Model Configuration Id"
          },
          "uploaded_image_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uploaded Image Id"
          },
          "icon_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Name"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public"
          },
          "is_listed": {
            "type": "boolean",
            "title": "Is Listed"
          },
          "display_priority": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Priority"
          },
          "is_featured": {
            "type": "boolean",
            "title": "Is Featured"
          },
          "builtin_persona": {
            "type": "boolean",
            "title": "Builtin Persona"
          },
          "labels": {
            "items": {
              "$ref": "#/components/schemas/PersonaLabelSnapshot"
            },
            "type": "array",
            "title": "Labels"
          },
          "owner": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MinimalUserSnapshot"
              },
              {
                "type": "null"
              }
            ]
          },
          "owner_group": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonaOwnerGroupSnapshot"
              },
              {
                "type": "null"
              }
            ]
          },
          "user_permission": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonaAccessLevel"
              },
              {
                "type": "null"
              }
            ]
          },
          "permissions": {
            "additionalProperties": {
              "type": "boolean"
            },
            "type": "object",
            "title": "Permissions"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "tools",
          "starter_messages",
          "document_sets",
          "hierarchy_node_count",
          "attached_document_count",
          "knowledge_sources",
          "default_model_configuration_id",
          "uploaded_image_id",
          "icon_name",
          "is_public",
          "is_listed",
          "display_priority",
          "is_featured",
          "builtin_persona",
          "labels",
          "owner",
          "owner_group"
        ],
        "title": "MinimalPersonaSnapshot",
        "description": "Minimal persona model optimized for ChatPage.tsx - only includes fields actually used"
      },
      "MinimalUserGroupSnapshot": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "is_default": {
            "type": "boolean",
            "title": "Is Default"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "is_default"
        ],
        "title": "MinimalUserGroupSnapshot"
      },
      "MinimalUserSnapshot": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "id",
          "email"
        ],
        "title": "MinimalUserSnapshot"
      },
      "MobileSsoExchangeRequest": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "code_verifier": {
            "type": "string",
            "title": "Code Verifier"
          }
        },
        "type": "object",
        "required": [
          "code",
          "code_verifier"
        ],
        "title": "MobileSsoExchangeRequest"
      },
      "MobileSsoTokenResponse": {
        "properties": {
          "access_token": {
            "type": "string",
            "title": "Access Token"
          },
          "token_type": {
            "type": "string",
            "title": "Token Type",
            "default": "bearer"
          }
        },
        "type": "object",
        "required": [
          "access_token"
        ],
        "title": "MobileSsoTokenResponse"
      },
      "ModelConfigurationUpsertRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "is_visible": {
            "type": "boolean",
            "title": "Is Visible"
          },
          "max_input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Tokens"
          },
          "supports_image_input": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Supports Image Input"
          },
          "supports_reasoning": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Supports Reasoning"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "custom_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Display Name"
          },
          "reasoning_effort_max": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReasoningEffort"
              },
              {
                "type": "null"
              }
            ]
          },
          "reasoning_effort_default": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReasoningEffort"
              },
              {
                "type": "null"
              }
            ]
          },
          "temperature_default": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature Default"
          }
        },
        "type": "object",
        "required": [
          "name",
          "is_visible"
        ],
        "title": "ModelConfigurationUpsertRequest"
      },
      "ModelConfigurationView": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "is_visible": {
            "type": "boolean",
            "title": "Is Visible"
          },
          "max_input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Tokens"
          },
          "supports_image_input": {
            "type": "boolean",
            "title": "Supports Image Input"
          },
          "supports_reasoning": {
            "type": "boolean",
            "title": "Supports Reasoning",
            "default": false
          },
          "supported_reasoning_efforts": {
            "items": {
              "$ref": "#/components/schemas/ReasoningEffort"
            },
            "type": "array",
            "title": "Supported Reasoning Efforts"
          },
          "reasoning_effort_max": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReasoningEffort"
              },
              {
                "type": "null"
              }
            ]
          },
          "reasoning_effort_default": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReasoningEffort"
              },
              {
                "type": "null"
              }
            ]
          },
          "temperature_default": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature Default"
          },
          "is_recommended_default": {
            "type": "boolean",
            "title": "Is Recommended Default",
            "default": false
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "custom_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Display Name"
          },
          "provider_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Display Name"
          },
          "vendor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vendor"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region"
          }
        },
        "type": "object",
        "required": [
          "name",
          "is_visible",
          "supports_image_input"
        ],
        "title": "ModelConfigurationView"
      },
      "ModelPrice": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "input_per_mtok": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Per Mtok"
          },
          "output_per_mtok": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Per Mtok"
          },
          "cache_per_mtok": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Per Mtok"
          }
        },
        "type": "object",
        "required": [
          "model",
          "provider",
          "input_per_mtok",
          "output_per_mtok",
          "cache_per_mtok"
        ],
        "title": "ModelPrice"
      },
      "NavigationItem": {
        "properties": {
          "link": {
            "type": "string",
            "title": "Link"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          },
          "svg_logo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Svg Logo"
          }
        },
        "type": "object",
        "required": [
          "link",
          "title"
        ],
        "title": "NavigationItem"
      },
      "NebiusTokenfactoryFinalModelResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "max_input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Tokens"
          },
          "supports_image_input": {
            "type": "boolean",
            "title": "Supports Image Input"
          },
          "supports_reasoning": {
            "type": "boolean",
            "title": "Supports Reasoning"
          },
          "quantization": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quantization"
          },
          "country_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country Code"
          },
          "requests_per_minute": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requests Per Minute"
          },
          "supported_features": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Supported Features",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "name",
          "display_name",
          "max_input_tokens",
          "supports_image_input",
          "supports_reasoning"
        ],
        "title": "NebiusTokenfactoryFinalModelResponse"
      },
      "NebiusTokenfactoryModelsRequest": {
        "properties": {
          "api_base": {
            "type": "string",
            "title": "Api Base"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "provider_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Id"
          }
        },
        "type": "object",
        "required": [
          "api_base"
        ],
        "title": "NebiusTokenfactoryModelsRequest"
      },
      "NotificationResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "notif_type": {
            "$ref": "#/components/schemas/NotificationType"
          },
          "severity": {
            "$ref": "#/components/schemas/NotificationSeverity",
            "default": "info"
          },
          "dismissed": {
            "type": "boolean",
            "title": "Dismissed"
          },
          "last_shown": {
            "type": "string",
            "format": "date-time",
            "title": "Last Shown"
          },
          "first_shown": {
            "type": "string",
            "format": "date-time",
            "title": "First Shown"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "additional_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Additional Data"
          }
        },
        "type": "object",
        "required": [
          "id",
          "notif_type",
          "dismissed",
          "last_shown",
          "first_shown",
          "title"
        ],
        "title": "NotificationResponse"
      },
      "NotificationSeverity": {
        "type": "string",
        "enum": [
          "info",
          "warning",
          "error"
        ],
        "title": "NotificationSeverity",
        "description": "How loud a notification renders: INFO stays in the bell popover,\nWARNING and ERROR also surface in the banner queue. Declared in\nascending loudness."
      },
      "NotificationSummary": {
        "properties": {
          "total_items": {
            "type": "integer",
            "title": "Total Items"
          },
          "undismissed_count": {
            "type": "integer",
            "title": "Undismissed Count"
          }
        },
        "type": "object",
        "required": [
          "total_items",
          "undismissed_count"
        ],
        "title": "NotificationSummary"
      },
      "NotificationType": {
        "type": "string",
        "enum": [
          "reindex",
          "persona_shared",
          "two_day_trial_ending",
          "release_notes",
          "assistant_files_ready",
          "feature_announcement",
          "system_announcement",
          "connector_repeated_errors",
          "connector_invalid",
          "license_expiry_warning",
          "scheduled_task_failed",
          "scheduled_task_awaiting_approval",
          "scheduled_task_pre_approved_action",
          "approval_requested"
        ],
        "title": "NotificationType"
      },
      "OAuthAdditionalKwargDescription": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          }
        },
        "type": "object",
        "required": [
          "name",
          "display_name",
          "description"
        ],
        "title": "OAuthAdditionalKwargDescription"
      },
      "OAuthCallbackRequest": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "state": {
            "type": "string",
            "title": "State"
          }
        },
        "type": "object",
        "required": [
          "code",
          "state"
        ],
        "title": "OAuthCallbackRequest"
      },
      "OAuthCallbackResult": {
        "properties": {
          "access_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Access Token"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "refresh_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Refresh Token"
          },
          "token_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Token Type"
          },
          "scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scope"
          },
          "source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FederatedConnectorSource"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "OAuthCallbackResult"
      },
      "OAuthCaptchaVerifyRequest": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          }
        },
        "type": "object",
        "required": [
          "token"
        ],
        "title": "OAuthCaptchaVerifyRequest"
      },
      "OAuthCaptchaVerifyResponse": {
        "properties": {
          "ok": {
            "type": "boolean",
            "title": "Ok"
          }
        },
        "type": "object",
        "required": [
          "ok"
        ],
        "title": "OAuthCaptchaVerifyResponse"
      },
      "OAuthClaimsSnapshot": {
        "properties": {
          "found": {
            "type": "boolean",
            "title": "Found"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "enrichment_enabled": {
            "type": "boolean",
            "title": "Enrichment Enabled",
            "default": false
          },
          "captured_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Captured At"
          },
          "oauth_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Name"
          },
          "id_token_claims": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id Token Claims"
          },
          "userinfo": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Userinfo"
          },
          "directory_profile": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Directory Profile"
          },
          "directory_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Directory Source"
          },
          "resolved_profile": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved Profile"
          },
          "token_meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Token Meta"
          }
        },
        "type": "object",
        "required": [
          "found",
          "email"
        ],
        "title": "OAuthClaimsSnapshot"
      },
      "OAuthConfigCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "authorization_url": {
            "type": "string",
            "title": "Authorization Url"
          },
          "token_url": {
            "type": "string",
            "title": "Token Url"
          },
          "client_id": {
            "type": "string",
            "title": "Client Id"
          },
          "client_secret": {
            "type": "string",
            "title": "Client Secret"
          },
          "scopes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scopes"
          },
          "additional_params": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Additional Params"
          }
        },
        "type": "object",
        "required": [
          "name",
          "authorization_url",
          "token_url",
          "client_id",
          "client_secret"
        ],
        "title": "OAuthConfigCreate"
      },
      "OAuthConfigSnapshot": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "authorization_url": {
            "type": "string",
            "title": "Authorization Url"
          },
          "token_url": {
            "type": "string",
            "title": "Token Url"
          },
          "scopes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scopes"
          },
          "has_client_credentials": {
            "type": "boolean",
            "title": "Has Client Credentials"
          },
          "tool_count": {
            "type": "integer",
            "title": "Tool Count"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "authorization_url",
          "token_url",
          "scopes",
          "has_client_credentials",
          "tool_count",
          "created_at",
          "updated_at"
        ],
        "title": "OAuthConfigSnapshot"
      },
      "OAuthConfigUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "authorization_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Authorization Url"
          },
          "token_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Token Url"
          },
          "client_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Id"
          },
          "client_secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Secret"
          },
          "scopes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scopes"
          },
          "additional_params": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Additional Params"
          },
          "clear_client_id": {
            "type": "boolean",
            "title": "Clear Client Id",
            "default": false
          },
          "clear_client_secret": {
            "type": "boolean",
            "title": "Clear Client Secret",
            "default": false
          }
        },
        "type": "object",
        "title": "OAuthConfigUpdate"
      },
      "OAuthDetails": {
        "properties": {
          "oauth_enabled": {
            "type": "boolean",
            "title": "Oauth Enabled"
          },
          "supports_manual_credentials": {
            "type": "boolean",
            "title": "Supports Manual Credentials"
          },
          "additional_kwargs": {
            "items": {
              "$ref": "#/components/schemas/OAuthAdditionalKwargDescription"
            },
            "type": "array",
            "title": "Additional Kwargs"
          }
        },
        "type": "object",
        "required": [
          "oauth_enabled",
          "supports_manual_credentials",
          "additional_kwargs"
        ],
        "title": "OAuthDetails"
      },
      "OAuthInitiateRequest": {
        "properties": {
          "oauth_config_id": {
            "type": "integer",
            "title": "Oauth Config Id"
          },
          "return_path": {
            "type": "string",
            "title": "Return Path",
            "default": "/chat"
          }
        },
        "type": "object",
        "required": [
          "oauth_config_id"
        ],
        "title": "OAuthInitiateRequest"
      },
      "OAuthInitiateResponse": {
        "properties": {
          "authorization_url": {
            "type": "string",
            "title": "Authorization Url"
          },
          "state": {
            "type": "string",
            "title": "State"
          }
        },
        "type": "object",
        "required": [
          "authorization_url",
          "state"
        ],
        "title": "OAuthInitiateResponse"
      },
      "OAuthStartResponse": {
        "properties": {
          "authorize_url": {
            "type": "string",
            "title": "Authorize Url"
          }
        },
        "type": "object",
        "required": [
          "authorize_url"
        ],
        "title": "OAuthStartResponse"
      },
      "OAuthTokenStatus": {
        "properties": {
          "oauth_config_id": {
            "type": "integer",
            "title": "Oauth Config Id"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "is_expired": {
            "type": "boolean",
            "title": "Is Expired"
          }
        },
        "type": "object",
        "required": [
          "oauth_config_id",
          "expires_at",
          "is_expired"
        ],
        "title": "OAuthTokenStatus"
      },
      "ObjectCreationIdResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "credential": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CredentialSnapshot"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "ObjectCreationIdResponse"
      },
      "OllamaFinalModelResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "max_input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Tokens"
          },
          "supports_image_input": {
            "type": "boolean",
            "title": "Supports Image Input"
          }
        },
        "type": "object",
        "required": [
          "name",
          "display_name",
          "max_input_tokens",
          "supports_image_input"
        ],
        "title": "OllamaFinalModelResponse"
      },
      "OllamaModelsRequest": {
        "properties": {
          "api_base": {
            "type": "string",
            "title": "Api Base"
          },
          "provider_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Id"
          }
        },
        "type": "object",
        "required": [
          "api_base"
        ],
        "title": "OllamaModelsRequest"
      },
      "OnyxbotAnalyticsResponse": {
        "properties": {
          "total_queries": {
            "type": "integer",
            "title": "Total Queries"
          },
          "auto_resolved": {
            "type": "integer",
            "title": "Auto Resolved"
          },
          "date": {
            "type": "string",
            "format": "date",
            "title": "Date"
          }
        },
        "type": "object",
        "required": [
          "total_queries",
          "auto_resolved",
          "date"
        ],
        "title": "OnyxbotAnalyticsResponse"
      },
      "OpenAICompatibleFinalModelResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "max_input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Tokens"
          },
          "supports_image_input": {
            "type": "boolean",
            "title": "Supports Image Input"
          },
          "supports_reasoning": {
            "type": "boolean",
            "title": "Supports Reasoning"
          }
        },
        "type": "object",
        "required": [
          "name",
          "display_name",
          "max_input_tokens",
          "supports_image_input",
          "supports_reasoning"
        ],
        "title": "OpenAICompatibleFinalModelResponse"
      },
      "OpenAICompatibleModelsRequest": {
        "properties": {
          "api_base": {
            "type": "string",
            "title": "Api Base"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "provider_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Id"
          }
        },
        "type": "object",
        "required": [
          "api_base"
        ],
        "title": "OpenAICompatibleModelsRequest"
      },
      "OpenRouterFinalModelResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "max_input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Tokens"
          },
          "supports_image_input": {
            "type": "boolean",
            "title": "Supports Image Input"
          }
        },
        "type": "object",
        "required": [
          "name",
          "display_name",
          "max_input_tokens",
          "supports_image_input"
        ],
        "title": "OpenRouterFinalModelResponse"
      },
      "OpenRouterModelsRequest": {
        "properties": {
          "api_base": {
            "type": "string",
            "title": "Api Base"
          },
          "api_key": {
            "type": "string",
            "title": "Api Key"
          },
          "provider_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Id"
          }
        },
        "type": "object",
        "required": [
          "api_base",
          "api_key"
        ],
        "title": "OpenRouterModelsRequest"
      },
      "OpenSearchMigrationStatusResponse": {
        "properties": {
          "total_chunks_migrated": {
            "type": "integer",
            "title": "Total Chunks Migrated"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "migration_completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Migration Completed At"
          },
          "approx_chunk_count_in_vespa": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approx Chunk Count In Vespa"
          }
        },
        "type": "object",
        "required": [
          "total_chunks_migrated",
          "created_at",
          "migration_completed_at",
          "approx_chunk_count_in_vespa"
        ],
        "title": "OpenSearchMigrationStatusResponse"
      },
      "OpenSearchRetrievalStatusRequest": {
        "properties": {
          "enable_opensearch_retrieval": {
            "type": "boolean",
            "title": "Enable Opensearch Retrieval"
          }
        },
        "type": "object",
        "required": [
          "enable_opensearch_retrieval"
        ],
        "title": "OpenSearchRetrievalStatusRequest"
      },
      "OpenSearchRetrievalStatusResponse": {
        "properties": {
          "enable_opensearch_retrieval": {
            "type": "boolean",
            "title": "Enable Opensearch Retrieval"
          },
          "toggling_retrieval_is_disabled": {
            "type": "boolean",
            "title": "Toggling Retrieval Is Disabled",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "enable_opensearch_retrieval"
        ],
        "title": "OpenSearchRetrievalStatusResponse"
      },
      "OpenUrlDocuments": {
        "properties": {
          "type": {
            "type": "string",
            "const": "open_url_documents",
            "title": "Type",
            "default": "open_url_documents"
          },
          "documents": {
            "items": {
              "$ref": "#/components/schemas/SearchDoc"
            },
            "type": "array",
            "title": "Documents"
          }
        },
        "type": "object",
        "required": [
          "documents"
        ],
        "title": "OpenUrlDocuments",
        "description": "Final documents after crawling completes."
      },
      "OpenUrlStart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "open_url_start",
            "title": "Type",
            "default": "open_url_start"
          }
        },
        "type": "object",
        "title": "OpenUrlStart",
        "description": "Signal that OpenURL tool has started."
      },
      "OpenUrlUrls": {
        "properties": {
          "type": {
            "type": "string",
            "const": "open_url_urls",
            "title": "Type",
            "default": "open_url_urls"
          },
          "urls": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Urls"
          }
        },
        "type": "object",
        "required": [
          "urls"
        ],
        "title": "OpenUrlUrls",
        "description": "URLs to be fetched (sent before crawling begins)."
      },
      "OpenUrlsToolRequest": {
        "properties": {
          "urls": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Urls",
            "description": "URLs to fetch using the configured content provider."
          }
        },
        "type": "object",
        "required": [
          "urls"
        ],
        "title": "OpenUrlsToolRequest"
      },
      "OpenUrlsToolResponse": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/LlmOpenUrlResult"
            },
            "type": "array",
            "title": "Results"
          },
          "provider_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebContentProviderType"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "results"
        ],
        "title": "OpenUrlsToolResponse"
      },
      "OpencodeHistorySnapshotResponse": {
        "properties": {
          "created": {
            "type": "boolean",
            "title": "Created"
          }
        },
        "type": "object",
        "required": [
          "created"
        ],
        "title": "OpencodeHistorySnapshotResponse",
        "description": "Response for an opencode history snapshot attempt."
      },
      "OrgCredentialFieldDescriptor": {
        "properties": {
          "key": {
            "type": "string",
            "title": "Key"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "secret": {
            "type": "boolean",
            "title": "Secret"
          }
        },
        "type": "object",
        "required": [
          "key",
          "label",
          "description",
          "secret"
        ],
        "title": "OrgCredentialFieldDescriptor",
        "description": "One credential field the admin must fill in to configure a\nbuilt-in provider."
      },
      "OverallStop": {
        "properties": {
          "type": {
            "type": "string",
            "const": "stop",
            "title": "Type",
            "default": "stop"
          },
          "stop_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop Reason"
          }
        },
        "type": "object",
        "title": "OverallStop"
      },
      "Packet": {
        "properties": {
          "placement": {
            "$ref": "#/components/schemas/Placement"
          },
          "obj": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/OverallStop"
              },
              {
                "$ref": "#/components/schemas/SectionEnd"
              },
              {
                "$ref": "#/components/schemas/TopLevelBranching"
              },
              {
                "$ref": "#/components/schemas/PacketException"
              },
              {
                "$ref": "#/components/schemas/ChatHeartbeat"
              },
              {
                "$ref": "#/components/schemas/AgentResponseStart"
              },
              {
                "$ref": "#/components/schemas/AgentResponseDelta"
              },
              {
                "$ref": "#/components/schemas/SearchToolStart"
              },
              {
                "$ref": "#/components/schemas/SearchToolQueriesDelta"
              },
              {
                "$ref": "#/components/schemas/SearchToolFilterDelta"
              },
              {
                "$ref": "#/components/schemas/SearchToolDocumentsDelta"
              },
              {
                "$ref": "#/components/schemas/ImageGenerationToolStart"
              },
              {
                "$ref": "#/components/schemas/ImageGenerationToolHeartbeat"
              },
              {
                "$ref": "#/components/schemas/ImageGenerationFinal"
              },
              {
                "$ref": "#/components/schemas/OpenUrlStart"
              },
              {
                "$ref": "#/components/schemas/OpenUrlUrls"
              },
              {
                "$ref": "#/components/schemas/OpenUrlDocuments"
              },
              {
                "$ref": "#/components/schemas/PythonToolStart"
              },
              {
                "$ref": "#/components/schemas/PythonToolDelta"
              },
              {
                "$ref": "#/components/schemas/CustomToolStart"
              },
              {
                "$ref": "#/components/schemas/CustomToolArgs"
              },
              {
                "$ref": "#/components/schemas/CustomToolDelta"
              },
              {
                "$ref": "#/components/schemas/FileReaderStart"
              },
              {
                "$ref": "#/components/schemas/FileReaderResult"
              },
              {
                "$ref": "#/components/schemas/MemoryToolStart"
              },
              {
                "$ref": "#/components/schemas/MemoryToolDelta"
              },
              {
                "$ref": "#/components/schemas/MemoryToolNoAccess"
              },
              {
                "$ref": "#/components/schemas/ReasoningStart"
              },
              {
                "$ref": "#/components/schemas/ReasoningDelta"
              },
              {
                "$ref": "#/components/schemas/ReasoningDone"
              },
              {
                "$ref": "#/components/schemas/CitationInfo"
              },
              {
                "$ref": "#/components/schemas/ToolCallDebug"
              },
              {
                "$ref": "#/components/schemas/ToolCallArgumentDelta"
              },
              {
                "$ref": "#/components/schemas/DeepResearchPlanStart"
              },
              {
                "$ref": "#/components/schemas/DeepResearchPlanDelta"
              },
              {
                "$ref": "#/components/schemas/ResearchAgentStart"
              },
              {
                "$ref": "#/components/schemas/IntermediateReportStart"
              },
              {
                "$ref": "#/components/schemas/IntermediateReportDelta"
              },
              {
                "$ref": "#/components/schemas/IntermediateReportCitedDocs"
              },
              {
                "$ref": "#/components/schemas/CodingAgentStart"
              },
              {
                "$ref": "#/components/schemas/CodingAgentThinkingDelta"
              },
              {
                "$ref": "#/components/schemas/CodingAgentFinal"
              },
              {
                "$ref": "#/components/schemas/BashToolStart"
              },
              {
                "$ref": "#/components/schemas/BashToolDelta"
              }
            ],
            "title": "Obj",
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "bash_tool_delta": "#/components/schemas/BashToolDelta",
                "bash_tool_start": "#/components/schemas/BashToolStart",
                "chat_heartbeat": "#/components/schemas/ChatHeartbeat",
                "citation_info": "#/components/schemas/CitationInfo",
                "coding_agent_final": "#/components/schemas/CodingAgentFinal",
                "coding_agent_start": "#/components/schemas/CodingAgentStart",
                "coding_agent_thinking_delta": "#/components/schemas/CodingAgentThinkingDelta",
                "custom_tool_args": "#/components/schemas/CustomToolArgs",
                "custom_tool_delta": "#/components/schemas/CustomToolDelta",
                "custom_tool_start": "#/components/schemas/CustomToolStart",
                "deep_research_plan_delta": "#/components/schemas/DeepResearchPlanDelta",
                "deep_research_plan_start": "#/components/schemas/DeepResearchPlanStart",
                "error": "#/components/schemas/PacketException",
                "file_reader_result": "#/components/schemas/FileReaderResult",
                "file_reader_start": "#/components/schemas/FileReaderStart",
                "image_generation_final": "#/components/schemas/ImageGenerationFinal",
                "image_generation_heartbeat": "#/components/schemas/ImageGenerationToolHeartbeat",
                "image_generation_start": "#/components/schemas/ImageGenerationToolStart",
                "intermediate_report_cited_docs": "#/components/schemas/IntermediateReportCitedDocs",
                "intermediate_report_delta": "#/components/schemas/IntermediateReportDelta",
                "intermediate_report_start": "#/components/schemas/IntermediateReportStart",
                "memory_tool_delta": "#/components/schemas/MemoryToolDelta",
                "memory_tool_no_access": "#/components/schemas/MemoryToolNoAccess",
                "memory_tool_start": "#/components/schemas/MemoryToolStart",
                "message_delta": "#/components/schemas/AgentResponseDelta",
                "message_start": "#/components/schemas/AgentResponseStart",
                "open_url_documents": "#/components/schemas/OpenUrlDocuments",
                "open_url_start": "#/components/schemas/OpenUrlStart",
                "open_url_urls": "#/components/schemas/OpenUrlUrls",
                "python_tool_delta": "#/components/schemas/PythonToolDelta",
                "python_tool_start": "#/components/schemas/PythonToolStart",
                "reasoning_delta": "#/components/schemas/ReasoningDelta",
                "reasoning_done": "#/components/schemas/ReasoningDone",
                "reasoning_start": "#/components/schemas/ReasoningStart",
                "research_agent_start": "#/components/schemas/ResearchAgentStart",
                "search_tool_documents_delta": "#/components/schemas/SearchToolDocumentsDelta",
                "search_tool_filter_delta": "#/components/schemas/SearchToolFilterDelta",
                "search_tool_queries_delta": "#/components/schemas/SearchToolQueriesDelta",
                "search_tool_start": "#/components/schemas/SearchToolStart",
                "section_end": "#/components/schemas/SectionEnd",
                "stop": "#/components/schemas/OverallStop",
                "tool_call_argument_delta": "#/components/schemas/ToolCallArgumentDelta",
                "tool_call_debug": "#/components/schemas/ToolCallDebug",
                "top_level_branching": "#/components/schemas/TopLevelBranching"
              }
            }
          }
        },
        "type": "object",
        "required": [
          "placement",
          "obj"
        ],
        "title": "Packet"
      },
      "PacketException": {
        "properties": {
          "type": {
            "type": "string",
            "const": "error",
            "title": "Type",
            "default": "error"
          }
        },
        "type": "object",
        "title": "PacketException"
      },
      "PaginatedNotifications": {
        "properties": {
          "notifications": {
            "items": {
              "$ref": "#/components/schemas/NotificationResponse"
            },
            "type": "array",
            "title": "Notifications"
          },
          "total_items": {
            "type": "integer",
            "title": "Total Items"
          },
          "undismissed_count": {
            "type": "integer",
            "title": "Undismissed Count"
          },
          "page_num": {
            "type": "integer",
            "title": "Page Num"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More"
          }
        },
        "type": "object",
        "required": [
          "notifications",
          "total_items",
          "undismissed_count",
          "page_num",
          "page_size",
          "has_more"
        ],
        "title": "PaginatedNotifications"
      },
      "PaginatedReturn_ChatSessionMinimal_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ChatSessionMinimal"
            },
            "type": "array",
            "title": "Items"
          },
          "total_items": {
            "type": "integer",
            "title": "Total Items"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total_items"
        ],
        "title": "PaginatedReturn[ChatSessionMinimal]"
      },
      "PaginatedReturn_FullUserSnapshot_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FullUserSnapshot"
            },
            "type": "array",
            "title": "Items"
          },
          "total_items": {
            "type": "integer",
            "title": "Total Items"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total_items"
        ],
        "title": "PaginatedReturn[FullUserSnapshot]"
      },
      "PaginatedReturn_IndexAttemptErrorPydantic_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/IndexAttemptErrorPydantic"
            },
            "type": "array",
            "title": "Items"
          },
          "total_items": {
            "type": "integer",
            "title": "Total Items"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total_items"
        ],
        "title": "PaginatedReturn[IndexAttemptErrorPydantic]"
      },
      "PaginatedReturn_IndexAttemptSnapshot_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/IndexAttemptSnapshot"
            },
            "type": "array",
            "title": "Items"
          },
          "total_items": {
            "type": "integer",
            "title": "Total Items"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total_items"
        ],
        "title": "PaginatedReturn[IndexAttemptSnapshot]"
      },
      "PaginatedReturn_MinimalPersonaSnapshot_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/MinimalPersonaSnapshot"
            },
            "type": "array",
            "title": "Items"
          },
          "total_items": {
            "type": "integer",
            "title": "Total Items"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total_items"
        ],
        "title": "PaginatedReturn[MinimalPersonaSnapshot]"
      },
      "PaginatedReturn_PersonaSnapshot_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PersonaSnapshot"
            },
            "type": "array",
            "title": "Items"
          },
          "total_items": {
            "type": "integer",
            "title": "Total Items"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total_items"
        ],
        "title": "PaginatedReturn[PersonaSnapshot]"
      },
      "PatScopeOption": {
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/Permission"
          },
          "group_label": {
            "type": "string",
            "title": "Group Label"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "min_tier": {
            "$ref": "#/components/schemas/Tier",
            "default": "community"
          },
          "implies": {
            "items": {
              "$ref": "#/components/schemas/Permission"
            },
            "type": "array",
            "title": "Implies",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "scope",
          "group_label",
          "label",
          "description",
          "implies"
        ],
        "title": "PatScopeOption"
      },
      "Permission": {
        "type": "string",
        "enum": [
          "basic",
          "read:connectors",
          "read:document_sets",
          "read:agents",
          "read:users",
          "read:user_groups",
          "read:search",
          "read:chat",
          "write:chat",
          "read:admin",
          "generate:image",
          "use:llm_gateway",
          "add:agents",
          "manage:agents",
          "manage:document_sets",
          "manage:connectors",
          "manage:llms",
          "read:agent_analytics",
          "manage:actions",
          "manage:skills",
          "read:query_history",
          "manage:user_groups",
          "create:user_api_keys",
          "manage:service_account_api_keys",
          "manage:bots",
          "craft_sandbox",
          "admin"
        ],
        "title": "Permission",
        "description": "Permission tokens for group-based authorization and PAT scoping.\nfull_admin_panel_access is an override \u2014 if present, any permission\ncheck passes.\n\nThe read:*/write:* \"API-surface scopes\" are coarser than the capability\ntokens: they name request surfaces (search, chat, admin-read) rather than\nadmin capabilities. They are implied by basic / admin (so they're never\ngranted directly to a group) and exist primarily to scope Personal Access\nTokens."
      },
      "PermissionRegistryEntry": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "permissions": {
            "items": {
              "$ref": "#/components/schemas/Permission"
            },
            "type": "array",
            "title": "Permissions"
          },
          "group": {
            "type": "integer",
            "title": "Group"
          }
        },
        "type": "object",
        "required": [
          "id",
          "display_name",
          "description",
          "permissions",
          "group"
        ],
        "title": "PermissionRegistryEntry",
        "description": "A UI-facing permission row served by GET /admin/permissions/registry.\n\nThe field_validator ensures non-toggleable permissions (BASIC_ACCESS,\nFULL_ADMIN_PANEL_ACCESS, READ_*) can never appear in the registry."
      },
      "PermissionSyncStatus": {
        "type": "string",
        "enum": [
          "not_started",
          "in_progress",
          "success",
          "canceled",
          "failed",
          "completed_with_errors"
        ],
        "title": "PermissionSyncStatus",
        "description": "Status enum for permission sync attempts"
      },
      "PersonaAccessLevel": {
        "type": "string",
        "enum": [
          "OWNER",
          "EDITOR",
          "VIEWER"
        ],
        "title": "PersonaAccessLevel",
        "description": "Computed access the requesting user holds on a persona.\n\nOWNER outranks share rows; admins are reported as EDITOR unless owner."
      },
      "PersonaGroupShare": {
        "properties": {
          "group_id": {
            "type": "integer",
            "title": "Group Id"
          },
          "group_name": {
            "type": "string",
            "title": "Group Name"
          },
          "permission": {
            "$ref": "#/components/schemas/PersonaSharePermission"
          }
        },
        "type": "object",
        "required": [
          "group_id",
          "group_name",
          "permission"
        ],
        "title": "PersonaGroupShare"
      },
      "PersonaGroupShareRequest": {
        "properties": {
          "group_id": {
            "type": "integer",
            "title": "Group Id"
          },
          "permission": {
            "$ref": "#/components/schemas/PersonaSharePermission"
          }
        },
        "type": "object",
        "required": [
          "group_id",
          "permission"
        ],
        "title": "PersonaGroupShareRequest"
      },
      "PersonaLabelCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "PersonaLabelCreate"
      },
      "PersonaLabelPatchRequest": {
        "properties": {
          "label_name": {
            "type": "string",
            "title": "Label Name"
          }
        },
        "type": "object",
        "required": [
          "label_name"
        ],
        "title": "PersonaLabelPatchRequest"
      },
      "PersonaLabelResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "PersonaLabelResponse"
      },
      "PersonaLabelSnapshot": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "PersonaLabelSnapshot"
      },
      "PersonaMessageAnalyticsResponse": {
        "properties": {
          "total_messages": {
            "type": "integer",
            "title": "Total Messages"
          },
          "date": {
            "type": "string",
            "format": "date",
            "title": "Date"
          },
          "persona_id": {
            "type": "integer",
            "title": "Persona Id"
          }
        },
        "type": "object",
        "required": [
          "total_messages",
          "date",
          "persona_id"
        ],
        "title": "PersonaMessageAnalyticsResponse"
      },
      "PersonaOwnerGroupSnapshot": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "PersonaOwnerGroupSnapshot"
      },
      "PersonaSharePermission": {
        "type": "string",
        "enum": [
          "EDITOR",
          "VIEWER"
        ],
        "title": "PersonaSharePermission",
        "description": "Level granted by a persona share row (user or group), or to the whole\norg via `Persona.public_permission`."
      },
      "PersonaShareRequest": {
        "properties": {
          "user_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Ids"
          },
          "group_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Ids"
          },
          "user_shares": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PersonaUserShareRequest"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Shares"
          },
          "group_shares": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PersonaGroupShareRequest"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Shares"
          },
          "is_public": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Public"
          },
          "public_permission": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonaSharePermission"
              },
              {
                "type": "null"
              }
            ]
          },
          "label_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label Ids"
          }
        },
        "type": "object",
        "title": "PersonaShareRequest"
      },
      "PersonaSharingStatus": {
        "type": "string",
        "enum": [
          "PRIVATE",
          "SHARED",
          "PUBLIC"
        ],
        "title": "PersonaSharingStatus",
        "description": "Derived share state computed from a persona's columns by the sharing\nhelpers (no DB column of its own): group-owned or row-shared counts as\nSHARED even with an empty share list; PUBLIC wins over both."
      },
      "PersonaSnapshot": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public"
          },
          "is_listed": {
            "type": "boolean",
            "title": "Is Listed"
          },
          "uploaded_image_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uploaded Image Id"
          },
          "icon_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Name"
          },
          "user_file_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "User File Ids"
          },
          "display_priority": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Priority"
          },
          "is_featured": {
            "type": "boolean",
            "title": "Is Featured"
          },
          "builtin_persona": {
            "type": "boolean",
            "title": "Builtin Persona"
          },
          "starter_messages": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/StarterMessage"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starter Messages"
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/ToolSnapshot"
            },
            "type": "array",
            "title": "Tools"
          },
          "labels": {
            "items": {
              "$ref": "#/components/schemas/PersonaLabelSnapshot"
            },
            "type": "array",
            "title": "Labels"
          },
          "owner": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MinimalUserSnapshot"
              },
              {
                "type": "null"
              }
            ]
          },
          "owner_group": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonaOwnerGroupSnapshot"
              },
              {
                "type": "null"
              }
            ]
          },
          "users": {
            "items": {
              "$ref": "#/components/schemas/MinimalUserSnapshot"
            },
            "type": "array",
            "title": "Users"
          },
          "groups": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Groups"
          },
          "user_shares": {
            "items": {
              "$ref": "#/components/schemas/PersonaUserShare"
            },
            "type": "array",
            "title": "User Shares"
          },
          "group_shares": {
            "items": {
              "$ref": "#/components/schemas/PersonaGroupShare"
            },
            "type": "array",
            "title": "Group Shares"
          },
          "public_permission": {
            "$ref": "#/components/schemas/PersonaSharePermission"
          },
          "sharing_status": {
            "$ref": "#/components/schemas/PersonaSharingStatus"
          },
          "document_sets": {
            "items": {
              "$ref": "#/components/schemas/DocumentSetSummary"
            },
            "type": "array",
            "title": "Document Sets"
          },
          "default_model_configuration_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Model Configuration Id"
          },
          "hierarchy_nodes": {
            "items": {
              "$ref": "#/components/schemas/HierarchyNodeSnapshot"
            },
            "type": "array",
            "title": "Hierarchy Nodes"
          },
          "attached_documents": {
            "items": {
              "$ref": "#/components/schemas/AttachedDocumentSnapshot"
            },
            "type": "array",
            "title": "Attached Documents"
          },
          "permissions": {
            "additionalProperties": {
              "type": "boolean"
            },
            "type": "object",
            "title": "Permissions"
          },
          "system_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "System Prompt"
          },
          "replace_base_system_prompt": {
            "type": "boolean",
            "title": "Replace Base System Prompt",
            "default": false
          },
          "task_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Prompt"
          },
          "datetime_aware": {
            "type": "boolean",
            "title": "Datetime Aware",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "is_public",
          "is_listed",
          "uploaded_image_id",
          "icon_name",
          "user_file_ids",
          "display_priority",
          "is_featured",
          "builtin_persona",
          "starter_messages",
          "tools",
          "labels",
          "owner",
          "owner_group",
          "users",
          "groups",
          "user_shares",
          "group_shares",
          "public_permission",
          "sharing_status",
          "document_sets"
        ],
        "title": "PersonaSnapshot"
      },
      "PersonaUniqueUsersResponse": {
        "properties": {
          "unique_users": {
            "type": "integer",
            "title": "Unique Users"
          },
          "date": {
            "type": "string",
            "format": "date",
            "title": "Date"
          },
          "persona_id": {
            "type": "integer",
            "title": "Persona Id"
          }
        },
        "type": "object",
        "required": [
          "unique_users",
          "date",
          "persona_id"
        ],
        "title": "PersonaUniqueUsersResponse"
      },
      "PersonaUpsertRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "document_set_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Document Set Ids"
          },
          "is_public": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Public"
          },
          "default_model_configuration_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Model Configuration Id"
          },
          "starter_messages": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/StarterMessage"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starter Messages"
          },
          "users": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Users"
          },
          "groups": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Groups"
          },
          "tool_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Tool Ids"
          },
          "remove_image": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remove Image"
          },
          "uploaded_image_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uploaded Image Id"
          },
          "icon_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Name"
          },
          "search_start_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Search Start Date"
          },
          "label_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label Ids"
          },
          "is_featured": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Featured"
          },
          "display_priority": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Priority"
          },
          "user_file_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "User File Ids"
          },
          "hierarchy_node_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hierarchy Node Ids"
          },
          "document_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Ids"
          },
          "system_prompt": {
            "type": "string",
            "title": "System Prompt"
          },
          "replace_base_system_prompt": {
            "type": "boolean",
            "title": "Replace Base System Prompt",
            "default": false
          },
          "task_prompt": {
            "type": "string",
            "title": "Task Prompt"
          },
          "datetime_aware": {
            "type": "boolean",
            "title": "Datetime Aware"
          }
        },
        "type": "object",
        "required": [
          "name",
          "description",
          "document_set_ids",
          "tool_ids",
          "system_prompt",
          "task_prompt",
          "datetime_aware"
        ],
        "title": "PersonaUpsertRequest"
      },
      "PersonaUserShare": {
        "properties": {
          "user": {
            "$ref": "#/components/schemas/MinimalUserSnapshot"
          },
          "permission": {
            "$ref": "#/components/schemas/PersonaSharePermission"
          }
        },
        "type": "object",
        "required": [
          "user",
          "permission"
        ],
        "title": "PersonaUserShare"
      },
      "PersonaUserShareRequest": {
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id"
          },
          "permission": {
            "$ref": "#/components/schemas/PersonaSharePermission"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "permission"
        ],
        "title": "PersonaUserShareRequest"
      },
      "PersonalizationUpdateRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "use_memories": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Use Memories"
          },
          "enable_memory_tool": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enable Memory Tool"
          },
          "memories": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/MemoryItem"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memories"
          },
          "user_preferences": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "User Preferences"
          }
        },
        "type": "object",
        "title": "PersonalizationUpdateRequest"
      },
      "Placement": {
        "properties": {
          "turn_index": {
            "type": "integer",
            "title": "Turn Index"
          },
          "tab_index": {
            "type": "integer",
            "title": "Tab Index",
            "default": 0
          },
          "sub_turn_index": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sub Turn Index"
          },
          "model_index": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Index"
          }
        },
        "type": "object",
        "required": [
          "turn_index"
        ],
        "title": "Placement",
        "description": "Coordinates that identify where a streaming packet belongs in the UI.\n\nThe frontend uses these fields to route each packet to the correct turn,\ntool tab, agent sub-turn, and (in multi-model mode) response column.\n\nAttributes:\n    turn_index: Monotonically increasing index of the iterative reasoning block\n        (e.g. tool call round) within this chat message. Lower values happened first.\n    tab_index: Disambiguates parallel tool calls within the same turn so each\n        tool's output can be displayed in its own tab.\n    sub_turn_index: Nesting level for tools that invoke other tools. ``None`` for\n        top-level packets; an integer for tool-within-tool output.\n    model_index: Which model this packet belongs to. ``0`` for single-model\n        responses; ``0``, ``1``, or ``2`` for multi-model comparison. ``None``\n        for pre-LLM setup packets (e.g. message ID info) that are yielded\n        before any Emitter runs."
      },
      "PlanType": {
        "type": "string",
        "enum": [
          "monthly",
          "annual"
        ],
        "title": "PlanType"
      },
      "PortActionRequest": {
        "properties": {
          "cc_pair_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cc Pair Id"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "type": "object",
        "title": "PortActionRequest",
        "description": "Resume one paused port unit \u2014 exactly one scope set."
      },
      "PortActionResponse": {
        "properties": {
          "ok": {
            "type": "boolean",
            "title": "Ok"
          }
        },
        "type": "object",
        "required": [
          "ok"
        ],
        "title": "PortActionResponse"
      },
      "PortkeyFinalModelResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "max_input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Tokens"
          },
          "supports_image_input": {
            "type": "boolean",
            "title": "Supports Image Input"
          },
          "supports_reasoning": {
            "type": "boolean",
            "title": "Supports Reasoning"
          }
        },
        "type": "object",
        "required": [
          "name",
          "display_name",
          "max_input_tokens",
          "supports_image_input",
          "supports_reasoning"
        ],
        "title": "PortkeyFinalModelResponse"
      },
      "PortkeyModelsRequest": {
        "properties": {
          "api_base": {
            "type": "string",
            "title": "Api Base"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "provider_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Id"
          }
        },
        "type": "object",
        "required": [
          "api_base"
        ],
        "title": "PortkeyModelsRequest"
      },
      "PptxPreviewResponse": {
        "properties": {
          "slide_count": {
            "type": "integer",
            "title": "Slide Count"
          },
          "slide_paths": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Slide Paths"
          },
          "cached": {
            "type": "boolean",
            "title": "Cached"
          }
        },
        "type": "object",
        "required": [
          "slide_count",
          "slide_paths",
          "cached"
        ],
        "title": "PptxPreviewResponse",
        "description": "Response with PPTX slide preview metadata."
      },
      "PreProvisionedCheckResponse": {
        "properties": {
          "valid": {
            "type": "boolean",
            "title": "Valid"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          }
        },
        "type": "object",
        "required": [
          "valid"
        ],
        "title": "PreProvisionedCheckResponse",
        "description": "Response for checking if a pre-provisioned session is still valid (empty)."
      },
      "ProcessingMode": {
        "type": "string",
        "enum": [
          "REGULAR",
          "FILE_SYSTEM",
          "RAW_BINARY"
        ],
        "title": "ProcessingMode",
        "description": "Determines how documents are processed after fetching."
      },
      "ProjectInstructionsResponse": {
        "properties": {
          "instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          }
        },
        "type": "object",
        "required": [
          "instructions"
        ],
        "title": "ProjectInstructionsResponse"
      },
      "ProjectPayload": {
        "properties": {
          "project": {
            "$ref": "#/components/schemas/UserProjectSnapshot"
          },
          "files": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/UserFileSnapshot"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Files"
          },
          "persona_id_to_is_featured": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "boolean"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Persona Id To Is Featured"
          }
        },
        "type": "object",
        "required": [
          "project"
        ],
        "title": "ProjectPayload"
      },
      "PythonToolDelta": {
        "properties": {
          "type": {
            "type": "string",
            "const": "python_tool_delta",
            "title": "Type",
            "default": "python_tool_delta"
          },
          "stdout": {
            "type": "string",
            "title": "Stdout",
            "default": ""
          },
          "stderr": {
            "type": "string",
            "title": "Stderr",
            "default": ""
          },
          "file_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "File Ids",
            "default": []
          }
        },
        "type": "object",
        "title": "PythonToolDelta"
      },
      "PythonToolStart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "python_tool_start",
            "title": "Type",
            "default": "python_tool_start"
          },
          "code": {
            "type": "string",
            "title": "Code"
          }
        },
        "type": "object",
        "required": [
          "code"
        ],
        "title": "PythonToolStart"
      },
      "QAFeedbackType": {
        "type": "string",
        "enum": [
          "like",
          "dislike",
          "mixed"
        ],
        "title": "QAFeedbackType"
      },
      "QueryAnalyticsResponse": {
        "properties": {
          "total_queries": {
            "type": "integer",
            "title": "Total Queries"
          },
          "total_likes": {
            "type": "integer",
            "title": "Total Likes"
          },
          "total_dislikes": {
            "type": "integer",
            "title": "Total Dislikes"
          },
          "date": {
            "type": "string",
            "format": "date",
            "title": "Date"
          }
        },
        "type": "object",
        "required": [
          "total_queries",
          "total_likes",
          "total_dislikes",
          "date"
        ],
        "title": "QueryAnalyticsResponse"
      },
      "QueryHistoryExport": {
        "properties": {
          "task_id": {
            "type": "string",
            "title": "Task Id"
          },
          "status": {
            "$ref": "#/components/schemas/TaskStatus"
          },
          "start": {
            "type": "string",
            "format": "date-time",
            "title": "Start"
          },
          "end": {
            "type": "string",
            "format": "date-time",
            "title": "End"
          },
          "start_time": {
            "type": "string",
            "format": "date-time",
            "title": "Start Time"
          }
        },
        "type": "object",
        "required": [
          "task_id",
          "status",
          "start",
          "end",
          "start_time"
        ],
        "title": "QueryHistoryExport"
      },
      "QueryHistoryType": {
        "type": "string",
        "enum": [
          "disabled",
          "anonymized",
          "normal"
        ],
        "title": "QueryHistoryType"
      },
      "ReasoningDelta": {
        "properties": {
          "type": {
            "type": "string",
            "const": "reasoning_delta",
            "title": "Type",
            "default": "reasoning_delta"
          },
          "reasoning": {
            "type": "string",
            "title": "Reasoning"
          }
        },
        "type": "object",
        "required": [
          "reasoning"
        ],
        "title": "ReasoningDelta"
      },
      "ReasoningDone": {
        "properties": {
          "type": {
            "type": "string",
            "const": "reasoning_done",
            "title": "Type",
            "default": "reasoning_done"
          }
        },
        "type": "object",
        "title": "ReasoningDone"
      },
      "ReasoningEffort": {
        "type": "string",
        "enum": [
          "auto",
          "off",
          "low",
          "medium",
          "high",
          "xhigh"
        ],
        "title": "ReasoningEffort",
        "description": "Reasoning effort levels for models that support extended thinking.\n\nDifferent providers map these values differently:\n- OpenAI: Uses \"low\", \"medium\", \"high\" directly for reasoning_effort. Recently added \"none\" for 5 series\n          which is like \"minimal\"\n- Claude: Uses budget_tokens with different values for each level\n- Gemini: Uses \"none\", \"low\", \"medium\", \"high\" for thinking_budget (via litellm mapping)"
      },
      "ReasoningEffortDefaultRequest": {
        "properties": {
          "reasoning_effort_default": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReasoningEffort"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "ReasoningEffortDefaultRequest",
        "description": "The user's own default reasoning effort. Null clears it."
      },
      "ReasoningStart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "reasoning_start",
            "title": "Type",
            "default": "reasoning_start"
          }
        },
        "type": "object",
        "title": "ReasoningStart"
      },
      "ReferenceImagePayload": {
        "properties": {
          "data_base64": {
            "type": "string",
            "title": "Data Base64"
          },
          "mime_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mime Type"
          }
        },
        "type": "object",
        "required": [
          "data_base64"
        ],
        "title": "ReferenceImagePayload"
      },
      "RefreshTokenData": {
        "properties": {
          "access_token": {
            "type": "string",
            "title": "Access Token"
          },
          "refresh_token": {
            "type": "string",
            "title": "Refresh Token"
          },
          "session": {
            "additionalProperties": true,
            "type": "object",
            "title": "Session",
            "description": "Contains session information"
          },
          "userinfo": {
            "additionalProperties": true,
            "type": "object",
            "title": "Userinfo",
            "description": "Contains user information"
          }
        },
        "type": "object",
        "required": [
          "access_token",
          "refresh_token",
          "session",
          "userinfo"
        ],
        "title": "RefreshTokenData"
      },
      "ReindexErrorRow": {
        "properties": {
          "scope": {
            "type": "string",
            "enum": [
              "connector",
              "user_file"
            ],
            "title": "Scope"
          },
          "cc_pair_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cc Pair Id"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "error_msg": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Msg"
          },
          "paused": {
            "type": "boolean",
            "title": "Paused"
          }
        },
        "type": "object",
        "required": [
          "scope",
          "cc_pair_id",
          "user_id",
          "name",
          "error_msg",
          "paused"
        ],
        "title": "ReindexErrorRow",
        "description": "A port unit needing attention (FAILED or PAUSED) for the modal; exactly one of\ncc_pair_id / user_id set, name = connector name or user email. `paused` = Resume-able."
      },
      "ReindexProgressCounts": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "waiting": {
            "type": "integer",
            "title": "Waiting"
          },
          "in_progress": {
            "type": "integer",
            "title": "In Progress"
          },
          "completed": {
            "type": "integer",
            "title": "Completed"
          },
          "failed": {
            "type": "integer",
            "title": "Failed"
          },
          "paused": {
            "type": "integer",
            "title": "Paused"
          }
        },
        "type": "object",
        "required": [
          "total",
          "waiting",
          "in_progress",
          "completed",
          "failed",
          "paused"
        ],
        "title": "ReindexProgressCounts",
        "description": "Combined connector + user-file port progress; buckets partition `total`."
      },
      "RejectedFile": {
        "properties": {
          "file_name": {
            "type": "string",
            "title": "File Name"
          },
          "reason": {
            "type": "string",
            "title": "Reason"
          }
        },
        "type": "object",
        "required": [
          "file_name",
          "reason"
        ],
        "title": "RejectedFile"
      },
      "RenameChatSessionResponse": {
        "properties": {
          "new_name": {
            "type": "string",
            "title": "New Name"
          }
        },
        "type": "object",
        "required": [
          "new_name"
        ],
        "title": "RenameChatSessionResponse"
      },
      "ReorderPinnedAssistantsRequest": {
        "properties": {
          "ordered_assistant_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Ordered Assistant Ids"
          }
        },
        "type": "object",
        "required": [
          "ordered_assistant_ids"
        ],
        "title": "ReorderPinnedAssistantsRequest"
      },
      "ResearchAgentStart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "research_agent_start",
            "title": "Type",
            "default": "research_agent_start"
          },
          "research_task": {
            "type": "string",
            "title": "Research Task"
          }
        },
        "type": "object",
        "required": [
          "research_task"
        ],
        "title": "ResearchAgentStart"
      },
      "ResetConnectionResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "success",
          "message"
        ],
        "title": "ResetConnectionResponse"
      },
      "ResetUsageRequest": {
        "properties": {
          "user_email": {
            "type": "string",
            "minLength": 1,
            "title": "User Email"
          }
        },
        "type": "object",
        "required": [
          "user_email"
        ],
        "title": "ResetUsageRequest"
      },
      "ResetUsageResponse": {
        "properties": {
          "reset_rows": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Reset Rows"
          }
        },
        "type": "object",
        "required": [
          "reset_rows"
        ],
        "title": "ResetUsageResponse"
      },
      "ResolveMemberRequest": {
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 320,
            "minLength": 3,
            "title": "Email"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "email"
        ],
        "title": "ResolveMemberRequest"
      },
      "ResponsesRequest": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model"
          },
          "input": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              }
            ],
            "title": "Input"
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "tool_choice": {
            "title": "Tool Choice"
          },
          "stream": {
            "type": "boolean",
            "title": "Stream",
            "default": false
          },
          "max_output_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Output Tokens"
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "reasoning": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning"
          },
          "previous_response_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Response Id"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "model"
        ],
        "title": "ResponsesRequest",
        "description": "Conversation persistence is not implemented: every request must carry its\nown history. ``previous_response_id`` is declared so it is refused rather\nthan silently ignored by ``extra=\"allow\"``.\n\n``store`` stays tolerated-and-ignored on purpose \u2014 the retrieval endpoint it\nimplies does not exist, so a caller cannot be misled into trusting stored\nstate mid-turn, and OpenAI's own default is ``true``."
      },
      "ReviewRequest": {
        "properties": {
          "notes": {
            "type": "string",
            "maxLength": 2000,
            "title": "Notes",
            "default": ""
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ReviewRequest"
      },
      "ReviewResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "version_id": {
            "type": "string",
            "format": "uuid",
            "title": "Version Id"
          },
          "reviewer_user_id": {
            "type": "string",
            "format": "uuid",
            "title": "Reviewer User Id"
          },
          "notes": {
            "type": "string",
            "title": "Notes"
          },
          "approved_at": {
            "type": "string",
            "format": "date-time",
            "title": "Approved At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "version_id",
          "reviewer_user_id",
          "notes",
          "approved_at",
          "revoked_at"
        ],
        "title": "ReviewResponse"
      },
      "RunConnectorRequest": {
        "properties": {
          "connector_id": {
            "type": "integer",
            "title": "Connector Id"
          },
          "credential_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credential Ids"
          },
          "from_beginning": {
            "type": "boolean",
            "title": "From Beginning",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "connector_id"
        ],
        "title": "RunConnectorRequest"
      },
      "RunListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/RunSummary"
            },
            "type": "array",
            "title": "Items"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "type": "object",
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "RunListResponse"
      },
      "RunNowResponse": {
        "properties": {
          "run_id": {
            "type": "string",
            "title": "Run Id"
          },
          "status": {
            "$ref": "#/components/schemas/ScheduledTaskRunStatus"
          }
        },
        "type": "object",
        "required": [
          "run_id",
          "status"
        ],
        "title": "RunNowResponse"
      },
      "RunSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "status": {
            "$ref": "#/components/schemas/ScheduledTaskRunStatus"
          },
          "trigger_source": {
            "$ref": "#/components/schemas/ScheduledTaskTriggerSource"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "title": "Started At"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "skip_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Skip Reason"
          },
          "error_class": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Class"
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "trigger_source",
          "started_at",
          "finished_at",
          "session_id",
          "summary",
          "skip_reason",
          "error_class"
        ],
        "title": "RunSummary",
        "description": "Shape used both as ``last_run`` on the list payload and as a row in\nthe paginated runs listing."
      },
      "SAMLAuthorizeResponse": {
        "properties": {
          "authorization_url": {
            "type": "string",
            "title": "Authorization Url"
          }
        },
        "type": "object",
        "required": [
          "authorization_url"
        ],
        "title": "SAMLAuthorizeResponse"
      },
      "SSODiscoveryRequest": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "SSODiscoveryRequest"
      },
      "SSODiscoveryResponse": {
        "properties": {
          "providers": {
            "items": {
              "$ref": "#/components/schemas/SSOProviderOption"
            },
            "type": "array",
            "title": "Providers"
          }
        },
        "type": "object",
        "required": [
          "providers"
        ],
        "title": "SSODiscoveryResponse"
      },
      "SSODomainRecordsRequest": {
        "properties": {
          "domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Domains"
          }
        },
        "type": "object",
        "required": [
          "domains"
        ],
        "title": "SSODomainRecordsRequest"
      },
      "SSODomainVerifyRequest": {
        "properties": {
          "domain": {
            "type": "string",
            "title": "Domain"
          }
        },
        "type": "object",
        "required": [
          "domain"
        ],
        "title": "SSODomainVerifyRequest"
      },
      "SSOLoginDomainStatus": {
        "properties": {
          "domain": {
            "type": "string",
            "title": "Domain"
          },
          "verified": {
            "type": "boolean",
            "title": "Verified"
          },
          "claimed": {
            "type": "boolean",
            "title": "Claimed",
            "default": false
          },
          "record_host": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Record Host"
          },
          "record_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Record Value"
          }
        },
        "type": "object",
        "required": [
          "domain",
          "verified"
        ],
        "title": "SSOLoginDomainStatus"
      },
      "SSOLoginDomainsResponse": {
        "properties": {
          "domains": {
            "items": {
              "$ref": "#/components/schemas/SSOLoginDomainStatus"
            },
            "type": "array",
            "title": "Domains"
          }
        },
        "type": "object",
        "required": [
          "domains"
        ],
        "title": "SSOLoginDomainsResponse"
      },
      "SSOProviderCreateRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "provider_type": {
            "$ref": "#/components/schemas/SSOProviderType"
          },
          "config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Config"
          },
          "allowed_email_domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Allowed Email Domains"
          }
        },
        "type": "object",
        "required": [
          "name",
          "display_name",
          "provider_type",
          "config",
          "allowed_email_domains"
        ],
        "title": "SSOProviderCreateRequest"
      },
      "SSOProviderEnabledRequest": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          }
        },
        "type": "object",
        "required": [
          "enabled"
        ],
        "title": "SSOProviderEnabledRequest"
      },
      "SSOProviderOption": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "provider_type": {
            "$ref": "#/components/schemas/SSOProviderType"
          },
          "authorize_url": {
            "type": "string",
            "title": "Authorize Url"
          }
        },
        "type": "object",
        "required": [
          "name",
          "display_name",
          "provider_type",
          "authorize_url"
        ],
        "title": "SSOProviderOption"
      },
      "SSOProviderResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "provider_type": {
            "$ref": "#/components/schemas/SSOProviderType"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "allowed_email_domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Allowed Email Domains"
          },
          "config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Config"
          },
          "redirect_uri": {
            "type": "string",
            "title": "Redirect Uri"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "display_name",
          "provider_type",
          "enabled",
          "allowed_email_domains",
          "config",
          "redirect_uri"
        ],
        "title": "SSOProviderResponse"
      },
      "SSOProviderType": {
        "type": "string",
        "enum": [
          "GOOGLE_OAUTH",
          "OIDC",
          "SAML"
        ],
        "title": "SSOProviderType"
      },
      "SSOProviderUpdateRequest": {
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "allowed_email_domains": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Email Domains"
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          }
        },
        "type": "object",
        "title": "SSOProviderUpdateRequest"
      },
      "SSRFProtectionLevel": {
        "type": "string",
        "enum": [
          "validate_all",
          "validate_llm",
          "allow_private_network",
          "disabled"
        ],
        "title": "SSRFProtectionLevel",
        "description": "How aggressively outbound HTTP requests are validated against private /\ninternal IP ranges (SSRF protection). A single admin-facing control that\nsupersedes the older per-path env vars (OPEN_URL_VALIDATE_SSRF,\nMCP_SERVER_ALLOW_PRIVATE_NETWORK, MCP_SERVER_ALLOW_LOOPBACK) and the\nweb connector's former WEB_CONNECTOR_VALIDATE_URLS toggle."
      },
      "SandboxResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "status": {
            "$ref": "#/components/schemas/SandboxStatus"
          },
          "container_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Container Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_heartbeat": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Heartbeat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "container_id",
          "created_at",
          "last_heartbeat"
        ],
        "title": "SandboxResponse",
        "description": "Sandbox metadata in session response."
      },
      "SandboxStatus": {
        "type": "string",
        "enum": [
          "provisioning",
          "running",
          "sleeping",
          "terminated",
          "failed"
        ],
        "title": "SandboxStatus"
      },
      "SandboxStatusResponse": {
        "properties": {
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SandboxStatus"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "SandboxStatusResponse",
        "description": "Lightweight sandbox status for the frontend sleep poll."
      },
      "SavedSearchDoc": {
        "properties": {
          "document_id": {
            "type": "string",
            "title": "Document Id"
          },
          "chunk_ind": {
            "type": "integer",
            "title": "Chunk Ind"
          },
          "semantic_identifier": {
            "type": "string",
            "title": "Semantic Identifier"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          },
          "blurb": {
            "type": "string",
            "title": "Blurb"
          },
          "source_type": {
            "$ref": "#/components/schemas/DocumentSource"
          },
          "boost": {
            "type": "integer",
            "title": "Boost"
          },
          "hidden": {
            "type": "boolean",
            "title": "Hidden"
          },
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              ]
            },
            "type": "object",
            "title": "Metadata"
          },
          "score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score",
            "default": 0.0
          },
          "is_relevant": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Relevant"
          },
          "relevance_explanation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Relevance Explanation"
          },
          "match_highlights": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Match Highlights"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "primary_owners": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Owners"
          },
          "secondary_owners": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secondary Owners"
          },
          "is_internet": {
            "type": "boolean",
            "title": "Is Internet",
            "default": false
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Id"
          },
          "db_doc_id": {
            "type": "integer",
            "title": "Db Doc Id"
          }
        },
        "type": "object",
        "required": [
          "document_id",
          "chunk_ind",
          "semantic_identifier",
          "blurb",
          "source_type",
          "boost",
          "hidden",
          "metadata",
          "match_highlights",
          "db_doc_id"
        ],
        "title": "SavedSearchDoc"
      },
      "SavedSearchSettings": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "model_name": {
            "type": "string",
            "title": "Model Name"
          },
          "normalize": {
            "type": "boolean",
            "title": "Normalize"
          },
          "query_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Query Prefix",
            "default": ""
          },
          "passage_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Passage Prefix",
            "default": ""
          },
          "api_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Url"
          },
          "provider_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmbeddingProvider"
              },
              {
                "type": "null"
              }
            ]
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "model_dim": {
            "type": "integer",
            "title": "Model Dim"
          },
          "index_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Index Name"
          },
          "multipass_indexing": {
            "type": "boolean",
            "title": "Multipass Indexing"
          },
          "embedding_precision": {
            "$ref": "#/components/schemas/EmbeddingPrecision",
            "default": "float"
          },
          "reduced_dimension": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reduced Dimension"
          },
          "switchover_type": {
            "$ref": "#/components/schemas/SwitchoverType",
            "default": "reindex"
          },
          "enable_contextual_rag": {
            "type": "boolean",
            "title": "Enable Contextual Rag"
          },
          "contextual_rag_model_configuration_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contextual Rag Model Configuration Id"
          },
          "contextual_rag_llm_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contextual Rag Llm Name"
          },
          "contextual_rag_llm_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contextual Rag Llm Provider"
          },
          "use_port_flow": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Use Port Flow"
          }
        },
        "type": "object",
        "required": [
          "model_name",
          "normalize",
          "model_dim",
          "index_name",
          "multipass_indexing",
          "enable_contextual_rag"
        ],
        "title": "SavedSearchSettings"
      },
      "ScheduledRunContextResponse": {
        "properties": {
          "run_id": {
            "type": "string",
            "title": "Run Id"
          },
          "task_id": {
            "type": "string",
            "title": "Task Id"
          },
          "task_name": {
            "type": "string",
            "title": "Task Name"
          },
          "status": {
            "$ref": "#/components/schemas/ScheduledTaskRunStatus"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "title": "Started At"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          }
        },
        "type": "object",
        "required": [
          "run_id",
          "task_id",
          "task_name",
          "status",
          "started_at",
          "finished_at"
        ],
        "title": "ScheduledRunContextResponse",
        "description": "Context surfaced by the session-view banner when a session came from a\nscheduled run. Returned by ``GET /sessions/{id}/scheduled-run-context``."
      },
      "ScheduledTaskCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Name"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "title": "Prompt"
          },
          "editor_mode": {
            "type": "string",
            "enum": [
              "interval",
              "daily_weekly",
              "advanced"
            ],
            "title": "Editor Mode"
          },
          "editor_payload": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IntervalPayload"
              },
              {
                "$ref": "#/components/schemas/DailyWeeklyPayload"
              },
              {
                "$ref": "#/components/schemas/AdvancedPayload"
              }
            ],
            "title": "Editor Payload"
          },
          "status": {
            "$ref": "#/components/schemas/ScheduledTaskStatus",
            "default": "ACTIVE"
          },
          "run_immediately": {
            "type": "boolean",
            "title": "Run Immediately",
            "default": false
          },
          "pre_approved_app_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Pre Approved App Ids"
          },
          "pre_approved_mcp_server_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Pre Approved Mcp Server Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "prompt",
          "editor_mode",
          "editor_payload"
        ],
        "title": "ScheduledTaskCreate",
        "description": "Request body for ``POST /scheduled-tasks``."
      },
      "ScheduledTaskDetail": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "prompt": {
            "type": "string",
            "title": "Prompt"
          },
          "human_readable_schedule": {
            "type": "string",
            "title": "Human Readable Schedule"
          },
          "cron_expression": {
            "type": "string",
            "title": "Cron Expression"
          },
          "editor_mode": {
            "type": "string",
            "title": "Editor Mode"
          },
          "status": {
            "$ref": "#/components/schemas/ScheduledTaskStatus"
          },
          "next_run_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Run At"
          },
          "next_runs": {
            "items": {
              "type": "string",
              "format": "date-time"
            },
            "type": "array",
            "title": "Next Runs"
          },
          "last_run": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "pre_approved_app_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Pre Approved App Ids"
          },
          "pre_approved_mcp_server_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Pre Approved Mcp Server Ids"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "prompt",
          "human_readable_schedule",
          "cron_expression",
          "editor_mode",
          "status",
          "next_run_at",
          "next_runs",
          "last_run",
          "pre_approved_app_ids",
          "pre_approved_mcp_server_ids",
          "created_at",
          "updated_at"
        ],
        "title": "ScheduledTaskDetail",
        "description": "Response for ``GET /scheduled-tasks/{id}`` and the mutating endpoints\nthat return the full task."
      },
      "ScheduledTaskListItem": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "human_readable_schedule": {
            "type": "string",
            "title": "Human Readable Schedule"
          },
          "cron_expression": {
            "type": "string",
            "title": "Cron Expression"
          },
          "editor_mode": {
            "type": "string",
            "title": "Editor Mode"
          },
          "status": {
            "$ref": "#/components/schemas/ScheduledTaskStatus"
          },
          "next_run_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Run At"
          },
          "last_run": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "human_readable_schedule",
          "cron_expression",
          "editor_mode",
          "status",
          "next_run_at",
          "last_run",
          "created_at",
          "updated_at"
        ],
        "title": "ScheduledTaskListItem",
        "description": "Row in ``GET /scheduled-tasks``."
      },
      "ScheduledTaskListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ScheduledTaskListItem"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "ScheduledTaskListResponse"
      },
      "ScheduledTaskPatch": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt"
          },
          "editor_mode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "interval",
                  "daily_weekly",
                  "advanced"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Editor Mode"
          },
          "editor_payload": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IntervalPayload"
              },
              {
                "$ref": "#/components/schemas/DailyWeeklyPayload"
              },
              {
                "$ref": "#/components/schemas/AdvancedPayload"
              },
              {
                "type": "null"
              }
            ],
            "title": "Editor Payload"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScheduledTaskStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "pre_approved_app_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pre Approved App Ids"
          },
          "pre_approved_mcp_server_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pre Approved Mcp Server Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ScheduledTaskPatch",
        "description": "Request body for ``PATCH /scheduled-tasks/{id}``.\n\nAll fields are optional; ``editor_mode`` and ``editor_payload`` must be\nsupplied together (enforced below)."
      },
      "ScheduledTaskRunStatus": {
        "type": "string",
        "enum": [
          "QUEUED",
          "RUNNING",
          "SUCCEEDED",
          "FAILED",
          "SKIPPED",
          "AWAITING_APPROVAL"
        ],
        "title": "ScheduledTaskRunStatus"
      },
      "ScheduledTaskStatus": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "PAUSED"
        ],
        "title": "ScheduledTaskStatus"
      },
      "ScheduledTaskTriggerSource": {
        "type": "string",
        "enum": [
          "SCHEDULED",
          "MANUAL_RUN_NOW"
        ],
        "title": "ScheduledTaskTriggerSource"
      },
      "SchoolAllowancePolicyRequest": {
        "properties": {
          "school_daily_limit_microusd": {
            "type": "integer",
            "maximum": 9e+18,
            "exclusiveMinimum": 0.0,
            "title": "School Daily Limit Microusd"
          },
          "user_daily_limit_microusd": {
            "type": "integer",
            "maximum": 9e+18,
            "exclusiveMinimum": 0.0,
            "title": "User Daily Limit Microusd"
          },
          "base_revision": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Base Revision"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "school_daily_limit_microusd",
          "user_daily_limit_microusd",
          "base_revision"
        ],
        "title": "SchoolAllowancePolicyRequest"
      },
      "SchoolAllowanceStatusResponse": {
        "properties": {
          "day": {
            "type": "string",
            "format": "date",
            "title": "Day"
          },
          "school_daily_limit_microusd": {
            "type": "integer",
            "title": "School Daily Limit Microusd"
          },
          "user_daily_limit_microusd": {
            "type": "integer",
            "title": "User Daily Limit Microusd"
          },
          "school_spent_microusd": {
            "type": "integer",
            "title": "School Spent Microusd"
          },
          "school_reserved_microusd": {
            "type": "integer",
            "title": "School Reserved Microusd"
          },
          "school_unknown_microusd": {
            "type": "integer",
            "title": "School Unknown Microusd"
          },
          "revision": {
            "type": "integer",
            "title": "Revision"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "day",
          "school_daily_limit_microusd",
          "user_daily_limit_microusd",
          "school_spent_microusd",
          "school_reserved_microusd",
          "school_unknown_microusd",
          "revision",
          "updated_at"
        ],
        "title": "SchoolAllowanceStatusResponse"
      },
      "SchoolClassResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "name",
          "active"
        ],
        "title": "SchoolClassResponse"
      },
      "SchoolConversationDetailResponse": {
        "properties": {
          "chat_session_id": {
            "type": "string",
            "format": "uuid",
            "title": "Chat Session Id"
          },
          "class_id": {
            "type": "string",
            "format": "uuid",
            "title": "Class Id"
          },
          "student": {
            "$ref": "#/components/schemas/SchoolConversationStudentResponse"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "turns": {
            "items": {
              "$ref": "#/components/schemas/SchoolConversationTurnResponse"
            },
            "type": "array",
            "title": "Turns"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "chat_session_id",
          "class_id",
          "student",
          "title",
          "turns",
          "created_at",
          "updated_at"
        ],
        "title": "SchoolConversationDetailResponse"
      },
      "SchoolConversationListResponse": {
        "properties": {
          "conversations": {
            "items": {
              "$ref": "#/components/schemas/SchoolConversationSummaryResponse"
            },
            "type": "array",
            "title": "Conversations"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "conversations",
          "next_cursor"
        ],
        "title": "SchoolConversationListResponse"
      },
      "SchoolConversationStudentResponse": {
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "email": {
            "type": "string",
            "title": "Email"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "user_id",
          "display_name",
          "email"
        ],
        "title": "SchoolConversationStudentResponse"
      },
      "SchoolConversationSummaryResponse": {
        "properties": {
          "chat_session_id": {
            "type": "string",
            "format": "uuid",
            "title": "Chat Session Id"
          },
          "student_user_id": {
            "type": "string",
            "format": "uuid",
            "title": "Student User Id"
          },
          "student_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Student Display Name"
          },
          "student_email": {
            "type": "string",
            "title": "Student Email"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "chat_session_id",
          "student_user_id",
          "student_display_name",
          "student_email",
          "title",
          "created_at",
          "updated_at"
        ],
        "title": "SchoolConversationSummaryResponse"
      },
      "SchoolConversationTurnResponse": {
        "properties": {
          "message_id": {
            "type": "integer",
            "title": "Message Id"
          },
          "parent_message_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Message Id"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "text": {
            "type": "string",
            "title": "Text"
          },
          "model_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Display Name"
          },
          "selected": {
            "type": "boolean",
            "title": "Selected"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "message_id",
          "parent_message_id",
          "role",
          "text",
          "model_display_name",
          "selected"
        ],
        "title": "SchoolConversationTurnResponse"
      },
      "SchoolInvitationClassResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "SchoolInvitationClassResponse"
      },
      "SchoolInvitationResponse": {
        "properties": {
          "invitation_id": {
            "type": "string",
            "format": "uuid",
            "title": "Invitation Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "role": {
            "$ref": "#/components/schemas/SchoolMembershipRole"
          },
          "class_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Class Ids"
          },
          "classes": {
            "items": {
              "$ref": "#/components/schemas/SchoolInvitationClassResponse"
            },
            "type": "array",
            "title": "Classes"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
          },
          "status": {
            "$ref": "#/components/schemas/SchoolInvitationStatus"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "invitation_id",
          "email",
          "role",
          "class_ids",
          "classes",
          "expires_at",
          "status"
        ],
        "title": "SchoolInvitationResponse"
      },
      "SchoolInvitationStatus": {
        "type": "string",
        "enum": [
          "pending",
          "accepted",
          "declined",
          "revoked",
          "expired",
          "unavailable"
        ],
        "title": "SchoolInvitationStatus"
      },
      "SchoolLearningMode": {
        "type": "string",
        "enum": [
          "hints",
          "guided",
          "full_with_critique"
        ],
        "title": "SchoolLearningMode"
      },
      "SchoolMeResponse": {
        "properties": {
          "school_id": {
            "type": "string",
            "format": "uuid",
            "title": "School Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SchoolMembershipRole"
              },
              {
                "type": "null"
              }
            ]
          },
          "can_manage_members": {
            "type": "boolean",
            "title": "Can Manage Members"
          },
          "can_use_craft": {
            "type": "boolean",
            "title": "Can Use Craft"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "school_id",
          "can_manage_members",
          "can_use_craft"
        ],
        "title": "SchoolMeResponse"
      },
      "SchoolMemberResponse": {
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "role": {
            "$ref": "#/components/schemas/SchoolMembershipRole"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "user_id",
          "email",
          "role",
          "active"
        ],
        "title": "SchoolMemberResponse"
      },
      "SchoolMembershipRole": {
        "type": "string",
        "enum": [
          "student",
          "teacher"
        ],
        "title": "SchoolMembershipRole"
      },
      "SchoolModelCatalogResponse": {
        "properties": {
          "models": {
            "items": {
              "$ref": "#/components/schemas/SchoolModelResponse"
            },
            "type": "array",
            "title": "Models"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "models"
        ],
        "title": "SchoolModelCatalogResponse"
      },
      "SchoolModelResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "model_name": {
            "type": "string",
            "title": "Model Name"
          },
          "input_usd_per_million": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Usd Per Million"
          },
          "output_usd_per_million": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Usd Per Million"
          },
          "available": {
            "type": "boolean",
            "title": "Available"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "display_name",
          "provider",
          "model_name",
          "input_usd_per_million",
          "output_usd_per_million",
          "available"
        ],
        "title": "SchoolModelResponse"
      },
      "SchoolSkillInstallationResponse": {
        "properties": {
          "installation_id": {
            "type": "string",
            "format": "uuid",
            "title": "Installation Id"
          },
          "version_id": {
            "type": "string",
            "format": "uuid",
            "title": "Version Id"
          },
          "generated_skill_id": {
            "type": "string",
            "format": "uuid",
            "title": "Generated Skill Id"
          },
          "generated_skill_name": {
            "type": "string",
            "title": "Generated Skill Name"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "version_number": {
            "type": "integer",
            "title": "Version Number"
          },
          "content_hash": {
            "type": "string",
            "title": "Content Hash"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "installation_id",
          "version_id",
          "generated_skill_id",
          "generated_skill_name",
          "title",
          "version_number",
          "content_hash",
          "created_at"
        ],
        "title": "SchoolSkillInstallationResponse"
      },
      "SchoolSkillRuntimeContentResponse": {
        "properties": {
          "installation_id": {
            "type": "string",
            "format": "uuid",
            "title": "Installation Id"
          },
          "version_id": {
            "type": "string",
            "format": "uuid",
            "title": "Version Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "version_number": {
            "type": "integer",
            "title": "Version Number"
          },
          "content_hash": {
            "type": "string",
            "title": "Content Hash"
          },
          "instructions_markdown": {
            "type": "string",
            "title": "Instructions Markdown"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "installation_id",
          "version_id",
          "title",
          "version_number",
          "content_hash",
          "instructions_markdown"
        ],
        "title": "SchoolSkillRuntimeContentResponse"
      },
      "SchoolSkillShareScope": {
        "type": "string",
        "enum": [
          "school",
          "class"
        ],
        "title": "SchoolSkillShareScope"
      },
      "SchoolUsageLineResponse": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "input_tokens": {
            "type": "integer",
            "title": "Input Tokens"
          },
          "output_tokens": {
            "type": "integer",
            "title": "Output Tokens"
          },
          "cache_read_tokens": {
            "type": "integer",
            "title": "Cache Read Tokens"
          },
          "cache_creation_tokens": {
            "type": "integer",
            "title": "Cache Creation Tokens"
          },
          "estimated_cost_cents": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Estimated Cost Cents"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "model",
          "provider",
          "input_tokens",
          "output_tokens",
          "cache_read_tokens",
          "cache_creation_tokens",
          "estimated_cost_cents"
        ],
        "title": "SchoolUsageLineResponse"
      },
      "SchoolUsageSummaryResponse": {
        "properties": {
          "school_id": {
            "type": "string",
            "format": "uuid",
            "title": "School Id"
          },
          "window_start": {
            "type": "string",
            "format": "date-time",
            "title": "Window Start"
          },
          "window_end": {
            "type": "string",
            "format": "date-time",
            "title": "Window End"
          },
          "rollup_updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rollup Updated At"
          },
          "estimated": {
            "type": "boolean",
            "title": "Estimated"
          },
          "member_count": {
            "type": "integer",
            "title": "Member Count"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/SchoolUsageLineResponse"
            },
            "type": "array",
            "title": "Lines"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "school_id",
          "window_start",
          "window_end",
          "rollup_updated_at",
          "estimated",
          "member_count",
          "lines"
        ],
        "title": "SchoolUsageSummaryResponse"
      },
      "ScimEmail": {
        "properties": {
          "value": {
            "type": "string",
            "title": "Value"
          },
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Type"
          },
          "primary": {
            "type": "boolean",
            "title": "Primary",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "value"
        ],
        "title": "ScimEmail",
        "description": "Email sub-attribute (RFC 7643 \u00a74.1.2)."
      },
      "ScimEnterpriseExtension": {
        "properties": {
          "department": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Department"
          },
          "manager": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScimManagerRef"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "ScimEnterpriseExtension",
        "description": "Enterprise User extension attributes (RFC 7643 \u00a74.3)."
      },
      "ScimFilterConfig": {
        "properties": {
          "supported": {
            "type": "boolean",
            "title": "Supported"
          },
          "maxResults": {
            "type": "integer",
            "title": "Maxresults",
            "default": 100
          }
        },
        "type": "object",
        "required": [
          "supported"
        ],
        "title": "ScimFilterConfig",
        "description": "Filter configuration within ServiceProviderConfig (RFC 7643 \u00a75)."
      },
      "ScimGroupMember": {
        "properties": {
          "value": {
            "type": "string",
            "title": "Value"
          },
          "display": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display"
          }
        },
        "type": "object",
        "required": [
          "value"
        ],
        "title": "ScimGroupMember",
        "description": "Group member reference (RFC 7643 \u00a74.2).\n\nRepresents a user within a SCIM group. The IdP sends these when adding\nor removing users from groups. ``value`` is the Onyx user ID."
      },
      "ScimGroupResource": {
        "properties": {
          "schemas": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Schemas"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "externalId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Externalid"
          },
          "displayName": {
            "type": "string",
            "title": "Displayname"
          },
          "members": {
            "items": {
              "$ref": "#/components/schemas/ScimGroupMember"
            },
            "type": "array",
            "title": "Members"
          },
          "meta": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScimMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "displayName"
        ],
        "title": "ScimGroupResource",
        "description": "SCIM Group resource representation (RFC 7643 \u00a74.2)."
      },
      "ScimManagerRef": {
        "properties": {
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "type": "object",
        "title": "ScimManagerRef",
        "description": "Manager sub-attribute for the enterprise extension (RFC 7643 \u00a74.3)."
      },
      "ScimMeta": {
        "properties": {
          "resourceType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resourcetype"
          },
          "created": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created"
          },
          "lastModified": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lastmodified"
          },
          "location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location"
          }
        },
        "type": "object",
        "title": "ScimMeta",
        "description": "Resource metadata (RFC 7643 \u00a73.1)."
      },
      "ScimName": {
        "properties": {
          "givenName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Givenname"
          },
          "familyName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Familyname"
          },
          "formatted": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Formatted"
          }
        },
        "type": "object",
        "title": "ScimName",
        "description": "User name components (RFC 7643 \u00a74.1.1)."
      },
      "ScimPatchEmailValue": {
        "properties": {
          "value": {
            "type": "string",
            "title": "Value"
          },
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Type"
          },
          "primary": {
            "type": "boolean",
            "title": "Primary",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "value"
        ],
        "title": "ScimPatchEmailValue",
        "description": "Email entry in an explicit-path PATCH value.\n\nextra=\"forbid\" keeps the union deterministic: member entries carry keys\nthis model rejects (display), so they fall through to ScimGroupMember,\nwhile standard email entries parse losslessly here."
      },
      "ScimPatchOperation": {
        "properties": {
          "op": {
            "$ref": "#/components/schemas/ScimPatchOperationType"
          },
          "path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Path"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "boolean"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/ScimPatchEmailValue"
                },
                "type": "array"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/ScimGroupMember"
                },
                "type": "array"
              },
              {
                "$ref": "#/components/schemas/ScimPatchResourceValue"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "type": "object",
        "required": [
          "op"
        ],
        "title": "ScimPatchOperation",
        "description": "Single PATCH operation (RFC 7644 \u00a73.5.2)."
      },
      "ScimPatchOperationType": {
        "type": "string",
        "enum": [
          "add",
          "replace",
          "remove"
        ],
        "title": "ScimPatchOperationType",
        "description": "Supported PATCH operations (RFC 7644 \u00a73.5.2)."
      },
      "ScimPatchRequest": {
        "properties": {
          "schemas": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Schemas"
          },
          "Operations": {
            "items": {
              "$ref": "#/components/schemas/ScimPatchOperation"
            },
            "type": "array",
            "title": "Operations"
          }
        },
        "type": "object",
        "required": [
          "Operations"
        ],
        "title": "ScimPatchRequest",
        "description": "PATCH request body (RFC 7644 \u00a73.5.2).\n\nIdPs use PATCH to make incremental changes \u2014 e.g. deactivating a user\n(replace active=false) or adding/removing group members \u2014 instead of\nreplacing the entire resource with PUT."
      },
      "ScimPatchResourceValue": {
        "properties": {
          "active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active"
          },
          "userName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Username"
          },
          "displayName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Displayname"
          },
          "externalId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Externalid"
          },
          "name": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScimName"
              },
              {
                "type": "null"
              }
            ]
          },
          "members": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ScimGroupMember"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Members"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "schemas": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Schemas"
          },
          "meta": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScimMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": true,
        "type": "object",
        "title": "ScimPatchResourceValue",
        "description": "Partial resource dict for path-less PATCH replace operations.\n\nWhen an IdP sends a PATCH without a ``path``, the ``value`` is a dict\nof resource attributes to set.  IdPs may include read-only fields\n(``id``, ``schemas``, ``meta``) alongside actual changes \u2014 these are\nstripped by the provider's ``ignored_patch_paths`` before processing.\n\n``extra=\"allow\"`` lets unknown attributes pass through so the patch\nhandler can decide what to do with them (ignore or reject)."
      },
      "ScimServiceProviderConfig": {
        "properties": {
          "schemas": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Schemas"
          },
          "patch": {
            "$ref": "#/components/schemas/ScimSupported",
            "default": {
              "supported": true
            }
          },
          "bulk": {
            "$ref": "#/components/schemas/ScimSupported",
            "default": {
              "supported": false
            }
          },
          "filter": {
            "$ref": "#/components/schemas/ScimFilterConfig",
            "default": {
              "supported": true,
              "maxResults": 100
            }
          },
          "changePassword": {
            "$ref": "#/components/schemas/ScimSupported",
            "default": {
              "supported": false
            }
          },
          "sort": {
            "$ref": "#/components/schemas/ScimSupported",
            "default": {
              "supported": false
            }
          },
          "etag": {
            "$ref": "#/components/schemas/ScimSupported",
            "default": {
              "supported": false
            }
          },
          "authenticationSchemes": {
            "items": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "type": "array",
            "title": "Authenticationschemes"
          }
        },
        "type": "object",
        "title": "ScimServiceProviderConfig",
        "description": "SCIM ServiceProviderConfig resource (RFC 7643 \u00a75).\n\nServed at GET /scim/v2/ServiceProviderConfig. IdPs fetch this during\ninitial setup to discover which SCIM features our server supports\n(e.g. PATCH yes, bulk no, filtering yes)."
      },
      "ScimSupported": {
        "properties": {
          "supported": {
            "type": "boolean",
            "title": "Supported"
          }
        },
        "type": "object",
        "required": [
          "supported"
        ],
        "title": "ScimSupported",
        "description": "Generic supported/not-supported flag used in ServiceProviderConfig."
      },
      "ScimTokenCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ScimTokenCreate",
        "description": "Request to create a new SCIM bearer token."
      },
      "ScimTokenCreatedResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "token_display": {
            "type": "string",
            "title": "Token Display"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "idp_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idp Domain"
          },
          "raw_token": {
            "type": "string",
            "title": "Raw Token"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "token_display",
          "is_active",
          "created_at",
          "raw_token"
        ],
        "title": "ScimTokenCreatedResponse",
        "description": "Response returned when a new SCIM token is created.\n\nIncludes the raw token value which is only available at creation time."
      },
      "ScimTokenResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "token_display": {
            "type": "string",
            "title": "Token Display"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "idp_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idp Domain"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "token_display",
          "is_active",
          "created_at"
        ],
        "title": "ScimTokenResponse",
        "description": "SCIM token metadata returned in list/get responses."
      },
      "ScimUserGroupRef": {
        "properties": {
          "value": {
            "type": "string",
            "title": "Value"
          },
          "display": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display"
          }
        },
        "type": "object",
        "required": [
          "value"
        ],
        "title": "ScimUserGroupRef",
        "description": "Group reference within a User resource (RFC 7643 \u00a74.1.2, read-only)."
      },
      "ScimUserResource": {
        "properties": {
          "schemas": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Schemas"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "externalId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Externalid"
          },
          "userName": {
            "type": "string",
            "title": "Username"
          },
          "name": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScimName"
              },
              {
                "type": "null"
              }
            ]
          },
          "displayName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Displayname"
          },
          "emails": {
            "items": {
              "$ref": "#/components/schemas/ScimEmail"
            },
            "type": "array",
            "title": "Emails"
          },
          "active": {
            "type": "boolean",
            "title": "Active",
            "default": true
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/ScimUserGroupRef"
            },
            "type": "array",
            "title": "Groups"
          },
          "meta": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScimMeta"
              },
              {
                "type": "null"
              }
            ]
          },
          "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScimEnterpriseExtension"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "userName"
        ],
        "title": "ScimUserResource",
        "description": "SCIM User resource representation (RFC 7643 \u00a74.1).\n\nThis is the JSON shape that IdPs send when creating/updating a user via\nSCIM, and the shape we return in GET responses. Field names use camelCase\nto match the SCIM wire format (not Python convention)."
      },
      "SearchDoc": {
        "properties": {
          "document_id": {
            "type": "string",
            "title": "Document Id"
          },
          "chunk_ind": {
            "type": "integer",
            "title": "Chunk Ind"
          },
          "semantic_identifier": {
            "type": "string",
            "title": "Semantic Identifier"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          },
          "blurb": {
            "type": "string",
            "title": "Blurb"
          },
          "source_type": {
            "$ref": "#/components/schemas/DocumentSource"
          },
          "boost": {
            "type": "integer",
            "title": "Boost"
          },
          "hidden": {
            "type": "boolean",
            "title": "Hidden"
          },
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              ]
            },
            "type": "object",
            "title": "Metadata"
          },
          "score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score"
          },
          "is_relevant": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Relevant"
          },
          "relevance_explanation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Relevance Explanation"
          },
          "match_highlights": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Match Highlights"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "primary_owners": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Owners"
          },
          "secondary_owners": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secondary Owners"
          },
          "is_internet": {
            "type": "boolean",
            "title": "Is Internet",
            "default": false
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Id"
          }
        },
        "type": "object",
        "required": [
          "document_id",
          "chunk_ind",
          "semantic_identifier",
          "blurb",
          "source_type",
          "boost",
          "hidden",
          "metadata",
          "match_highlights"
        ],
        "title": "SearchDoc"
      },
      "SearchDocWithContent": {
        "properties": {
          "document_id": {
            "type": "string",
            "title": "Document Id"
          },
          "chunk_ind": {
            "type": "integer",
            "title": "Chunk Ind"
          },
          "semantic_identifier": {
            "type": "string",
            "title": "Semantic Identifier"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          },
          "blurb": {
            "type": "string",
            "title": "Blurb"
          },
          "source_type": {
            "$ref": "#/components/schemas/DocumentSource"
          },
          "boost": {
            "type": "integer",
            "title": "Boost"
          },
          "hidden": {
            "type": "boolean",
            "title": "Hidden"
          },
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              ]
            },
            "type": "object",
            "title": "Metadata"
          },
          "score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score"
          },
          "is_relevant": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Relevant"
          },
          "relevance_explanation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Relevance Explanation"
          },
          "match_highlights": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Match Highlights"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "primary_owners": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Owners"
          },
          "secondary_owners": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secondary Owners"
          },
          "is_internet": {
            "type": "boolean",
            "title": "Is Internet",
            "default": false
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Id"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          }
        },
        "type": "object",
        "required": [
          "document_id",
          "chunk_ind",
          "semantic_identifier",
          "blurb",
          "source_type",
          "boost",
          "hidden",
          "metadata",
          "match_highlights",
          "content"
        ],
        "title": "SearchDocWithContent"
      },
      "SearchFlowClassificationRequest": {
        "properties": {
          "user_query": {
            "type": "string",
            "title": "User Query"
          }
        },
        "type": "object",
        "required": [
          "user_query"
        ],
        "title": "SearchFlowClassificationRequest"
      },
      "SearchFlowClassificationResponse": {
        "properties": {
          "is_search_flow": {
            "type": "boolean",
            "title": "Is Search Flow"
          }
        },
        "type": "object",
        "required": [
          "is_search_flow"
        ],
        "title": "SearchFlowClassificationResponse"
      },
      "SearchFullResponse": {
        "properties": {
          "all_executed_queries": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "All Executed Queries"
          },
          "search_docs": {
            "items": {
              "$ref": "#/components/schemas/SearchDocWithContent"
            },
            "type": "array",
            "title": "Search Docs"
          },
          "doc_selection_reasoning": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Doc Selection Reasoning"
          },
          "llm_selected_doc_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Selected Doc Ids"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "all_executed_queries",
          "search_docs"
        ],
        "title": "SearchFullResponse"
      },
      "SearchHistoryResponse": {
        "properties": {
          "search_queries": {
            "items": {
              "$ref": "#/components/schemas/SearchQueryResponse"
            },
            "type": "array",
            "title": "Search Queries"
          }
        },
        "type": "object",
        "required": [
          "search_queries"
        ],
        "title": "SearchHistoryResponse"
      },
      "SearchQueryResponse": {
        "properties": {
          "query": {
            "type": "string",
            "title": "Query"
          },
          "query_expansions": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Query Expansions"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "query",
          "query_expansions",
          "created_at"
        ],
        "title": "SearchQueryResponse"
      },
      "SearchRequest": {
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 2048,
            "minLength": 1,
            "title": "Query"
          },
          "sources": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/DocumentSource"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sources"
          },
          "document_sets": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Sets"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Tag"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "time_cutoff": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Cutoff"
          },
          "persona_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Persona Id"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "skip_query_expansion": {
            "type": "boolean",
            "title": "Skip Query Expansion",
            "default": false
          },
          "message_history": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ChatMinimalTextMessage"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message History"
          }
        },
        "type": "object",
        "required": [
          "query"
        ],
        "title": "SearchRequest"
      },
      "SearchResponse": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/SearchResult"
            },
            "type": "array",
            "title": "Results"
          }
        },
        "type": "object",
        "required": [
          "results"
        ],
        "title": "SearchResponse"
      },
      "SearchResult": {
        "properties": {
          "citation_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Citation Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "content": {
            "type": "string",
            "title": "Content"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          },
          "source_type": {
            "type": "string",
            "title": "Source Type"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "citation_id",
          "title",
          "content",
          "link",
          "source_type",
          "updated_at"
        ],
        "title": "SearchResult"
      },
      "SearchSettingsCreationRequest": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "model_name": {
            "type": "string",
            "title": "Model Name"
          },
          "normalize": {
            "type": "boolean",
            "title": "Normalize"
          },
          "query_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Query Prefix",
            "default": ""
          },
          "passage_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Passage Prefix",
            "default": ""
          },
          "api_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Url"
          },
          "provider_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmbeddingProvider"
              },
              {
                "type": "null"
              }
            ]
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "model_dim": {
            "type": "integer",
            "title": "Model Dim"
          },
          "index_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Index Name"
          },
          "multipass_indexing": {
            "type": "boolean",
            "title": "Multipass Indexing"
          },
          "embedding_precision": {
            "$ref": "#/components/schemas/EmbeddingPrecision",
            "default": "float"
          },
          "reduced_dimension": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reduced Dimension"
          },
          "switchover_type": {
            "$ref": "#/components/schemas/SwitchoverType",
            "default": "reindex"
          },
          "enable_contextual_rag": {
            "type": "boolean",
            "title": "Enable Contextual Rag"
          },
          "contextual_rag_model_configuration_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contextual Rag Model Configuration Id"
          },
          "contextual_rag_llm_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contextual Rag Llm Name"
          },
          "contextual_rag_llm_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contextual Rag Llm Provider"
          },
          "acknowledged_wont_port_cc_pair_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Acknowledged Wont Port Cc Pair Ids"
          }
        },
        "type": "object",
        "required": [
          "model_name",
          "normalize",
          "model_dim",
          "index_name",
          "multipass_indexing",
          "enable_contextual_rag"
        ],
        "title": "SearchSettingsCreationRequest"
      },
      "SearchSettingsDeleteRequest": {
        "properties": {
          "search_settings_id": {
            "type": "integer",
            "title": "Search Settings Id"
          }
        },
        "type": "object",
        "required": [
          "search_settings_id"
        ],
        "title": "SearchSettingsDeleteRequest"
      },
      "SearchToolDocumentsDelta": {
        "properties": {
          "type": {
            "type": "string",
            "const": "search_tool_documents_delta",
            "title": "Type",
            "default": "search_tool_documents_delta"
          },
          "documents": {
            "items": {
              "$ref": "#/components/schemas/SearchDoc"
            },
            "type": "array",
            "title": "Documents"
          }
        },
        "type": "object",
        "required": [
          "documents"
        ],
        "title": "SearchToolDocumentsDelta"
      },
      "SearchToolFilterDelta": {
        "properties": {
          "type": {
            "type": "string",
            "const": "search_tool_filter_delta",
            "title": "Type",
            "default": "search_tool_filter_delta"
          },
          "sources": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Sources",
            "default": []
          },
          "time_filter_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Filter Start"
          },
          "time_filter_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Filter End"
          }
        },
        "type": "object",
        "title": "SearchToolFilterDelta"
      },
      "SearchToolQueriesDelta": {
        "properties": {
          "type": {
            "type": "string",
            "const": "search_tool_queries_delta",
            "title": "Type",
            "default": "search_tool_queries_delta"
          },
          "queries": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Queries"
          }
        },
        "type": "object",
        "required": [
          "queries"
        ],
        "title": "SearchToolQueriesDelta"
      },
      "SearchToolStart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "search_tool_start",
            "title": "Type",
            "default": "search_tool_start"
          },
          "is_internet_search": {
            "type": "boolean",
            "title": "Is Internet Search",
            "default": false
          }
        },
        "type": "object",
        "title": "SearchToolStart"
      },
      "SeatUpdateRequest": {
        "properties": {
          "new_seat_count": {
            "type": "integer",
            "title": "New Seat Count"
          }
        },
        "type": "object",
        "required": [
          "new_seat_count"
        ],
        "title": "SeatUpdateRequest",
        "description": "Request to update seat count."
      },
      "SeatUpdateResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "current_seats": {
            "type": "integer",
            "title": "Current Seats"
          },
          "used_seats": {
            "type": "integer",
            "title": "Used Seats"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "license": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "License"
          }
        },
        "type": "object",
        "required": [
          "success",
          "current_seats",
          "used_seats"
        ],
        "title": "SeatUpdateResponse",
        "description": "Response from seat update operation."
      },
      "SeatUsageResponse": {
        "properties": {
          "total_seats": {
            "type": "integer",
            "title": "Total Seats"
          },
          "used_seats": {
            "type": "integer",
            "title": "Used Seats"
          },
          "available_seats": {
            "type": "integer",
            "title": "Available Seats"
          }
        },
        "type": "object",
        "required": [
          "total_seats",
          "used_seats",
          "available_seats"
        ],
        "title": "SeatUsageResponse",
        "description": "Response for seat usage API."
      },
      "SectionEnd": {
        "properties": {
          "type": {
            "type": "string",
            "const": "section_end",
            "title": "Type",
            "default": "section_end"
          }
        },
        "type": "object",
        "title": "SectionEnd"
      },
      "SecuritySettings": {
        "properties": {
          "user_directory_admin_only": {
            "type": "boolean",
            "title": "User Directory Admin Only"
          },
          "track_external_idp_expiry": {
            "type": "boolean",
            "title": "Track External Idp Expiry"
          },
          "allow_same_provider_subject_relink": {
            "type": "boolean",
            "title": "Allow Same Provider Subject Relink"
          },
          "incognito_availability": {
            "$ref": "#/components/schemas/IncognitoAvailability"
          },
          "incognito_record_mode": {
            "$ref": "#/components/schemas/IncognitoRecordMode"
          },
          "ssrf_protection_level": {
            "$ref": "#/components/schemas/SSRFProtectionLevel"
          },
          "mask_credential_prefix": {
            "type": "boolean",
            "title": "Mask Credential Prefix"
          },
          "llm_custom_config_env_injection": {
            "type": "boolean",
            "title": "Llm Custom Config Env Injection"
          },
          "valid_email_domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Valid Email Domains"
          },
          "password_min_length": {
            "type": "integer",
            "title": "Password Min Length"
          },
          "password_max_length": {
            "type": "integer",
            "title": "Password Max Length"
          },
          "password_require_uppercase": {
            "type": "boolean",
            "title": "Password Require Uppercase"
          },
          "password_require_lowercase": {
            "type": "boolean",
            "title": "Password Require Lowercase"
          },
          "password_require_digit": {
            "type": "boolean",
            "title": "Password Require Digit"
          },
          "password_require_special_char": {
            "type": "boolean",
            "title": "Password Require Special Char"
          },
          "password_auth_enabled": {
            "type": "boolean",
            "title": "Password Auth Enabled"
          },
          "jwt_public_key_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jwt Public Key Url"
          },
          "jwt_expected_audience": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jwt Expected Audience"
          },
          "jwt_expected_issuer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jwt Expected Issuer"
          }
        },
        "type": "object",
        "required": [
          "user_directory_admin_only",
          "track_external_idp_expiry",
          "allow_same_provider_subject_relink",
          "incognito_availability",
          "incognito_record_mode",
          "ssrf_protection_level",
          "mask_credential_prefix",
          "llm_custom_config_env_injection",
          "valid_email_domains",
          "password_min_length",
          "password_max_length",
          "password_require_uppercase",
          "password_require_lowercase",
          "password_require_digit",
          "password_require_special_char",
          "password_auth_enabled",
          "jwt_public_key_url",
          "jwt_expected_audience",
          "jwt_expected_issuer"
        ],
        "title": "SecuritySettings",
        "description": "Effective, env-merged, immutable security settings."
      },
      "SeedChatFromSlackRequest": {
        "properties": {
          "chat_session_id": {
            "type": "string",
            "format": "uuid",
            "title": "Chat Session Id"
          }
        },
        "type": "object",
        "required": [
          "chat_session_id"
        ],
        "title": "SeedChatFromSlackRequest"
      },
      "SeedChatFromSlackResponse": {
        "properties": {
          "redirect_url": {
            "type": "string",
            "title": "Redirect Url"
          }
        },
        "type": "object",
        "required": [
          "redirect_url"
        ],
        "title": "SeedChatFromSlackResponse"
      },
      "SendMessageRequest": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          },
          "llm_override": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LLMOverride"
              },
              {
                "type": "null"
              }
            ]
          },
          "llm_overrides": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/LLMOverride"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Overrides"
          },
          "mock_llm_response": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mock Llm Response"
          },
          "allowed_tool_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Tool Ids"
          },
          "forced_tool_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Forced Tool Id"
          },
          "file_descriptors": {
            "items": {
              "$ref": "#/components/schemas/FileDescriptor"
            },
            "type": "array",
            "title": "File Descriptors",
            "default": []
          },
          "internal_search_filters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BaseFilters"
              },
              {
                "type": "null"
              }
            ]
          },
          "deep_research": {
            "type": "boolean",
            "title": "Deep Research",
            "default": false
          },
          "mcp_headers": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mcp Headers"
          },
          "origin": {
            "$ref": "#/components/schemas/MessageOrigin",
            "default": "unset"
          },
          "parent_message_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Message Id",
            "default": -1
          },
          "chat_session_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chat Session Id"
          },
          "chat_session_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ChatSessionCreationRequest"
              },
              {
                "type": "null"
              }
            ]
          },
          "stream": {
            "type": "boolean",
            "title": "Stream",
            "default": true
          },
          "include_citations": {
            "type": "boolean",
            "title": "Include Citations",
            "default": true
          },
          "additional_context": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Additional Context"
          }
        },
        "type": "object",
        "required": [
          "message"
        ],
        "title": "SendMessageRequest"
      },
      "SendSearchQueryRequest": {
        "properties": {
          "search_query": {
            "type": "string",
            "title": "Search Query"
          },
          "filters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BaseFilters"
              },
              {
                "type": "null"
              }
            ]
          },
          "num_docs_fed_to_llm_selection": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Num Docs Fed To Llm Selection"
          },
          "run_query_expansion": {
            "type": "boolean",
            "title": "Run Query Expansion",
            "default": false
          },
          "num_hits": {
            "type": "integer",
            "title": "Num Hits",
            "default": 30
          },
          "hybrid_alpha": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hybrid Alpha"
          },
          "include_content": {
            "type": "boolean",
            "title": "Include Content",
            "default": false
          },
          "stream": {
            "type": "boolean",
            "title": "Stream",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "search_query"
        ],
        "title": "SendSearchQueryRequest"
      },
      "ServerToolsResponse": {
        "properties": {
          "server_id": {
            "type": "integer",
            "title": "Server Id"
          },
          "server_name": {
            "type": "string",
            "title": "Server Name"
          },
          "server_url": {
            "type": "string",
            "title": "Server Url"
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/MCPToolDescription"
            },
            "type": "array",
            "title": "Tools"
          }
        },
        "type": "object",
        "required": [
          "server_id",
          "server_name",
          "server_url",
          "tools"
        ],
        "title": "ServerToolsResponse"
      },
      "SessionCreateRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "headless": {
            "type": "boolean",
            "title": "Headless",
            "default": false
          }
        },
        "type": "object",
        "title": "SessionCreateRequest",
        "description": "Request to create a new build session."
      },
      "SessionListResponse": {
        "properties": {
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/SessionResponse"
            },
            "type": "array",
            "title": "Sessions"
          }
        },
        "type": "object",
        "required": [
          "sessions"
        ],
        "title": "SessionListResponse",
        "description": "Response containing list of sessions."
      },
      "SessionNameGenerateResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "SessionNameGenerateResponse",
        "description": "Response containing a generated session name."
      },
      "SessionOrigin": {
        "type": "string",
        "enum": [
          "INTERACTIVE",
          "SCHEDULED",
          "SLACK"
        ],
        "title": "SessionOrigin",
        "description": "How a BuildSession was created.\n\nINTERACTIVE: session started by a user in the Craft UI.\nSCHEDULED:   session started by the scheduled-tasks executor. Sessions\n             with this origin are excluded from the Craft sidebar list.\nSLACK:       session started by a Slack thread mention. Surfaces in\n             Slack (and a future admin list), not the user sidebar.\n             Excluded from the Craft sidebar list."
      },
      "SessionResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "status": {
            "$ref": "#/components/schemas/BuildSessionStatus"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_activity_at": {
            "type": "string",
            "format": "date-time",
            "title": "Last Activity At"
          },
          "nextjs_port": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nextjs Port"
          },
          "sandbox": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SandboxResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "artifacts": {
            "items": {
              "$ref": "#/components/schemas/ArtifactResponse"
            },
            "type": "array",
            "title": "Artifacts"
          },
          "sharing_scope": {
            "$ref": "#/components/schemas/SharingScope"
          },
          "origin": {
            "$ref": "#/components/schemas/SessionOrigin"
          },
          "agent_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Provider"
          },
          "agent_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Model"
          },
          "skills_stale": {
            "type": "boolean",
            "title": "Skills Stale"
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_id",
          "name",
          "status",
          "created_at",
          "last_activity_at",
          "nextjs_port",
          "sandbox",
          "artifacts",
          "sharing_scope",
          "origin",
          "agent_provider",
          "agent_model",
          "skills_stale"
        ],
        "title": "SessionResponse",
        "description": "Response containing session details."
      },
      "SessionSkillsStateResponse": {
        "properties": {
          "skills_stale": {
            "type": "boolean",
            "title": "Skills Stale"
          }
        },
        "type": "object",
        "required": [
          "skills_stale"
        ],
        "title": "SessionSkillsStateResponse"
      },
      "SessionType": {
        "type": "string",
        "enum": [
          "Chat",
          "Search",
          "Slack"
        ],
        "title": "SessionType"
      },
      "SessionUpdateRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "type": "object",
        "title": "SessionUpdateRequest",
        "description": "Request to update a build session.\n\nIf name is None, the session name will be auto-generated using LLM."
      },
      "SetGroupManagerRequest": {
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id"
          },
          "is_manager": {
            "type": "boolean",
            "title": "Is Manager"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "is_manager"
        ],
        "title": "SetGroupManagerRequest"
      },
      "SetPreferredResponseRequest": {
        "properties": {
          "user_message_id": {
            "type": "integer",
            "title": "User Message Id"
          },
          "preferred_response_id": {
            "type": "integer",
            "title": "Preferred Response Id"
          }
        },
        "type": "object",
        "required": [
          "user_message_id",
          "preferred_response_id"
        ],
        "title": "SetPreferredResponseRequest"
      },
      "SetSessionSharingRequest": {
        "properties": {
          "sharing_scope": {
            "$ref": "#/components/schemas/SharingScope"
          }
        },
        "type": "object",
        "required": [
          "sharing_scope"
        ],
        "title": "SetSessionSharingRequest",
        "description": "Request to set the sharing scope of a session."
      },
      "SetSessionSharingResponse": {
        "properties": {
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "sharing_scope": {
            "$ref": "#/components/schemas/SharingScope"
          }
        },
        "type": "object",
        "required": [
          "session_id",
          "sharing_scope"
        ],
        "title": "SetSessionSharingResponse",
        "description": "Response after setting session sharing scope."
      },
      "Settings": {
        "properties": {
          "maximum_chat_retention_days": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Maximum Chat Retention Days"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "company_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Description"
          },
          "gpu_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gpu Enabled"
          },
          "application_status": {
            "$ref": "#/components/schemas/ApplicationStatus",
            "default": "active"
          },
          "anonymous_user_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anonymous User Enabled"
          },
          "invite_only_enabled": {
            "type": "boolean",
            "title": "Invite Only Enabled",
            "default": false
          },
          "deep_research_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deep Research Enabled"
          },
          "multi_model_chat_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Multi Model Chat Enabled",
            "default": true
          },
          "search_ui_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Search Ui Enabled",
            "default": true
          },
          "auto_detect_search_filters": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Detect Search Filters",
            "default": true
          },
          "ee_features_enabled": {
            "type": "boolean",
            "title": "Ee Features Enabled",
            "default": false
          },
          "tier": {
            "$ref": "#/components/schemas/Tier",
            "default": "community"
          },
          "temperature_override_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature Override Enabled",
            "default": true
          },
          "reasoning_override_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning Override Enabled",
            "default": true
          },
          "hide_provider_grouping": {
            "type": "boolean",
            "title": "Hide Provider Grouping",
            "default": false
          },
          "auto_scroll": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Scroll",
            "default": false
          },
          "query_history_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/QueryHistoryType"
              },
              {
                "type": "null"
              }
            ]
          },
          "hide_query_history_from_admin_panel": {
            "type": "boolean",
            "title": "Hide Query History From Admin Panel",
            "default": false
          },
          "image_extraction_and_analysis_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Extraction And Analysis Enabled",
            "default": true
          },
          "image_analysis_max_size_mb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Analysis Max Size Mb",
            "default": 20
          },
          "user_knowledge_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Knowledge Enabled",
            "default": true
          },
          "user_file_max_upload_size_mb": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "User File Max Upload Size Mb",
            "default": 100
          },
          "file_token_count_threshold_k": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "File Token Count Threshold K"
          },
          "show_extra_connectors": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Show Extra Connectors",
            "default": true
          },
          "disable_default_assistant": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disable Default Assistant",
            "default": false
          },
          "craft_default_enabled": {
            "type": "boolean",
            "title": "Craft Default Enabled",
            "default": true
          },
          "craft_instructions": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4000
              },
              {
                "type": "null"
              }
            ],
            "title": "Craft Instructions"
          },
          "seat_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seat Count"
          },
          "used_seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Used Seats"
          },
          "opensearch_indexing_enabled": {
            "type": "boolean",
            "title": "Opensearch Indexing Enabled",
            "default": false
          }
        },
        "type": "object",
        "title": "Settings",
        "description": "General settings"
      },
      "ShareRequest": {
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/SchoolSkillShareScope"
          },
          "class_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Class Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "scope"
        ],
        "title": "ShareRequest"
      },
      "ShareResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "version_id": {
            "type": "string",
            "format": "uuid",
            "title": "Version Id"
          },
          "scope": {
            "$ref": "#/components/schemas/SchoolSkillShareScope"
          },
          "class_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Class Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "version_id",
          "scope",
          "class_id"
        ],
        "title": "ShareResponse"
      },
      "SharingScope": {
        "type": "string",
        "enum": [
          "private",
          "public_org"
        ],
        "title": "SharingScope"
      },
      "SimpleKnownModel": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "SimpleKnownModel"
      },
      "SkillAccessLevel": {
        "type": "string",
        "enum": [
          "OWNER",
          "EDITOR",
          "VIEWER"
        ],
        "title": "SkillAccessLevel",
        "description": "Computed access the requesting user holds on a skill."
      },
      "SkillAccessResponse": {
        "properties": {
          "shares": {
            "items": {
              "$ref": "#/components/schemas/ShareResponse"
            },
            "type": "array",
            "title": "Shares"
          },
          "reviews": {
            "items": {
              "$ref": "#/components/schemas/ReviewResponse"
            },
            "type": "array",
            "title": "Reviews"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "shares",
          "reviews"
        ],
        "title": "SkillAccessResponse"
      },
      "SkillBundleFile": {
        "properties": {
          "path": {
            "type": "string",
            "title": "Path"
          },
          "size": {
            "type": "integer",
            "title": "Size"
          }
        },
        "type": "object",
        "required": [
          "path",
          "size"
        ],
        "title": "SkillBundleFile"
      },
      "SkillBundleInspectResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "instructions_markdown": {
            "type": "string",
            "title": "Instructions Markdown"
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/SkillBundleFile"
            },
            "type": "array",
            "title": "Files"
          }
        },
        "type": "object",
        "required": [
          "name",
          "description",
          "instructions_markdown",
          "files"
        ],
        "title": "SkillBundleInspectResponse"
      },
      "SkillEditableDetailResponse": {
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "builtin",
              "custom"
            ],
            "title": "Source"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "is_available": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Available"
          },
          "unavailable_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unavailable Reason"
          },
          "is_valid": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Valid"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "can_toggle": {
            "type": "boolean",
            "title": "Can Toggle"
          },
          "author_user_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author User Id"
          },
          "author_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Email"
          },
          "owner": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MinimalUserSnapshot"
              },
              {
                "type": "null"
              }
            ]
          },
          "ownership_vacant": {
            "type": "boolean",
            "title": "Ownership Vacant",
            "default": false
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_shares": {
            "items": {
              "$ref": "#/components/schemas/SkillUserShare"
            },
            "type": "array",
            "title": "User Shares"
          },
          "group_shares": {
            "items": {
              "$ref": "#/components/schemas/SkillGroupShare"
            },
            "type": "array",
            "title": "Group Shares"
          },
          "public_permission": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SkillSharePermission"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_personal": {
            "type": "boolean",
            "title": "Is Personal",
            "default": false
          },
          "user_permission": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SkillAccessLevel"
              },
              {
                "type": "null"
              }
            ]
          },
          "external_app": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SkillExternalAppDependencyResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "instructions_markdown": {
            "type": "string",
            "title": "Instructions Markdown"
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/SkillBundleFile"
            },
            "type": "array",
            "title": "Files"
          }
        },
        "type": "object",
        "required": [
          "source",
          "id",
          "name",
          "description",
          "enabled",
          "can_toggle",
          "instructions_markdown",
          "files"
        ],
        "title": "SkillEditableDetailResponse"
      },
      "SkillEnableRequest": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "replace_conflict": {
            "type": "boolean",
            "title": "Replace Conflict",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "enabled"
        ],
        "title": "SkillEnableRequest"
      },
      "SkillExternalAppDependencyResponse": {
        "properties": {
          "external_app_id": {
            "type": "integer",
            "title": "External App Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "ready": {
            "type": "boolean",
            "title": "Ready"
          }
        },
        "type": "object",
        "required": [
          "external_app_id",
          "name",
          "enabled",
          "ready"
        ],
        "title": "SkillExternalAppDependencyResponse"
      },
      "SkillGroupShare": {
        "properties": {
          "group_id": {
            "type": "integer",
            "title": "Group Id"
          },
          "group_name": {
            "type": "string",
            "title": "Group Name"
          },
          "permission": {
            "$ref": "#/components/schemas/SkillSharePermission"
          }
        },
        "type": "object",
        "required": [
          "group_id",
          "group_name",
          "permission"
        ],
        "title": "SkillGroupShare"
      },
      "SkillGroupShareRequest": {
        "properties": {
          "group_id": {
            "type": "integer",
            "title": "Group Id"
          },
          "permission": {
            "$ref": "#/components/schemas/SkillSharePermission"
          }
        },
        "type": "object",
        "required": [
          "group_id",
          "permission"
        ],
        "title": "SkillGroupShareRequest"
      },
      "SkillPatchRequest": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "instructions_markdown": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions Markdown"
          },
          "public_permission": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SkillSharePermission"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "SkillPatchRequest"
      },
      "SkillPreviewResponse": {
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "builtin",
              "custom"
            ],
            "title": "Source"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "author_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Email"
          },
          "instructions_markdown": {
            "type": "string",
            "title": "Instructions Markdown"
          },
          "external_app": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SkillExternalAppDependencyResponse"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "source",
          "id",
          "name",
          "description",
          "instructions_markdown"
        ],
        "title": "SkillPreviewResponse"
      },
      "SkillResponse": {
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "builtin",
              "custom"
            ],
            "title": "Source"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "is_available": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Available"
          },
          "unavailable_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unavailable Reason"
          },
          "is_valid": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Valid"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "can_toggle": {
            "type": "boolean",
            "title": "Can Toggle"
          },
          "author_user_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author User Id"
          },
          "author_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Email"
          },
          "owner": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MinimalUserSnapshot"
              },
              {
                "type": "null"
              }
            ]
          },
          "ownership_vacant": {
            "type": "boolean",
            "title": "Ownership Vacant",
            "default": false
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_shares": {
            "items": {
              "$ref": "#/components/schemas/SkillUserShare"
            },
            "type": "array",
            "title": "User Shares"
          },
          "group_shares": {
            "items": {
              "$ref": "#/components/schemas/SkillGroupShare"
            },
            "type": "array",
            "title": "Group Shares"
          },
          "public_permission": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SkillSharePermission"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_personal": {
            "type": "boolean",
            "title": "Is Personal",
            "default": false
          },
          "user_permission": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SkillAccessLevel"
              },
              {
                "type": "null"
              }
            ]
          },
          "external_app": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SkillExternalAppDependencyResponse"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "source",
          "id",
          "name",
          "description",
          "enabled",
          "can_toggle"
        ],
        "title": "SkillResponse"
      },
      "SkillSharePermission": {
        "type": "string",
        "enum": [
          "EDITOR",
          "VIEWER"
        ],
        "title": "SkillSharePermission",
        "description": "Level granted by a skill share row (user or group), or to the whole org\nvia `Skill.public_permission`."
      },
      "SkillShareRequest": {
        "properties": {
          "user_shares": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SkillUserShareRequest"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Shares"
          },
          "group_shares": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SkillGroupShareRequest"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Shares"
          },
          "public_permission": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SkillSharePermission"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "SkillShareRequest"
      },
      "SkillUserShare": {
        "properties": {
          "user": {
            "$ref": "#/components/schemas/MinimalUserSnapshot"
          },
          "permission": {
            "$ref": "#/components/schemas/SkillSharePermission"
          }
        },
        "type": "object",
        "required": [
          "user",
          "permission"
        ],
        "title": "SkillUserShare"
      },
      "SkillUserShareRequest": {
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id"
          },
          "permission": {
            "$ref": "#/components/schemas/SkillSharePermission"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "permission"
        ],
        "title": "SkillUserShareRequest"
      },
      "SkillVersionResponse": {
        "properties": {
          "version_id": {
            "type": "string",
            "format": "uuid",
            "title": "Version Id"
          },
          "skill_id": {
            "type": "string",
            "format": "uuid",
            "title": "Skill Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "version_number": {
            "type": "integer",
            "title": "Version Number"
          },
          "content_hash": {
            "type": "string",
            "title": "Content Hash"
          },
          "instructions_markdown": {
            "type": "string",
            "title": "Instructions Markdown"
          },
          "owner_user_id": {
            "type": "string",
            "format": "uuid",
            "title": "Owner User Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "reviewed": {
            "type": "boolean",
            "title": "Reviewed"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "version_id",
          "skill_id",
          "title",
          "version_number",
          "content_hash",
          "instructions_markdown",
          "owner_user_id",
          "created_at",
          "reviewed"
        ],
        "title": "SkillVersionResponse"
      },
      "SkillsList": {
        "properties": {
          "builtins": {
            "items": {
              "$ref": "#/components/schemas/SkillResponse"
            },
            "type": "array",
            "title": "Builtins"
          },
          "customs": {
            "items": {
              "$ref": "#/components/schemas/SkillResponse"
            },
            "type": "array",
            "title": "Customs"
          }
        },
        "type": "object",
        "required": [
          "builtins",
          "customs"
        ],
        "title": "SkillsList"
      },
      "SlackBot": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "configs_count": {
            "type": "integer",
            "title": "Configs Count"
          },
          "bot_token": {
            "type": "string",
            "title": "Bot Token"
          },
          "app_token": {
            "type": "string",
            "title": "App Token"
          },
          "user_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Token"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "enabled",
          "configs_count",
          "bot_token",
          "app_token"
        ],
        "title": "SlackBot",
        "description": "This model is identical to the SlackAppModel, but it contains\na `configs_count` field to make it easier to fetch the number\nof SlackChannelConfigs associated with a SlackBot."
      },
      "SlackBotCreationRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "bot_token": {
            "type": "string",
            "title": "Bot Token"
          },
          "app_token": {
            "type": "string",
            "title": "App Token"
          },
          "user_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Token"
          }
        },
        "type": "object",
        "required": [
          "name",
          "enabled",
          "bot_token",
          "app_token"
        ],
        "title": "SlackBotCreationRequest"
      },
      "SlackBotResponseType": {
        "type": "string",
        "enum": [
          "quotes",
          "citations"
        ],
        "title": "SlackBotResponseType"
      },
      "SlackChannelConfig": {
        "properties": {
          "slack_bot_id": {
            "type": "integer",
            "title": "Slack Bot Id"
          },
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "persona": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonaSnapshot"
              },
              {
                "type": "null"
              }
            ]
          },
          "channel_config": {
            "$ref": "#/components/schemas/ChannelConfig"
          },
          "standard_answer_categories": {
            "items": {
              "$ref": "#/components/schemas/StandardAnswerCategory"
            },
            "type": "array",
            "title": "Standard Answer Categories"
          },
          "enable_auto_filters": {
            "type": "boolean",
            "title": "Enable Auto Filters"
          },
          "is_default": {
            "type": "boolean",
            "title": "Is Default"
          }
        },
        "type": "object",
        "required": [
          "slack_bot_id",
          "id",
          "persona",
          "channel_config",
          "standard_answer_categories",
          "enable_auto_filters",
          "is_default"
        ],
        "title": "SlackChannelConfig"
      },
      "SlackChannelConfigCreationRequest": {
        "properties": {
          "slack_bot_id": {
            "type": "integer",
            "title": "Slack Bot Id"
          },
          "document_sets": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Sets"
          },
          "persona_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Persona Id"
          },
          "channel_name": {
            "type": "string",
            "title": "Channel Name"
          },
          "respond_tag_only": {
            "type": "boolean",
            "title": "Respond Tag Only",
            "default": false
          },
          "respond_to_bots": {
            "type": "boolean",
            "title": "Respond To Bots",
            "default": false
          },
          "is_ephemeral": {
            "type": "boolean",
            "title": "Is Ephemeral",
            "default": false
          },
          "show_continue_in_web_ui": {
            "type": "boolean",
            "title": "Show Continue In Web Ui",
            "default": false
          },
          "enable_auto_filters": {
            "type": "boolean",
            "title": "Enable Auto Filters",
            "default": false
          },
          "respond_member_group_list": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Respond Member Group List"
          },
          "answer_filters": {
            "items": {
              "anyOf": [
                {
                  "type": "string",
                  "const": "well_answered_postfilter"
                },
                {
                  "type": "string",
                  "const": "questionmark_prefilter"
                }
              ]
            },
            "type": "array",
            "title": "Answer Filters"
          },
          "follow_up_tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Follow Up Tags"
          },
          "response_type": {
            "$ref": "#/components/schemas/SlackBotResponseType"
          },
          "standard_answer_categories": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Standard Answer Categories"
          },
          "disabled": {
            "type": "boolean",
            "title": "Disabled",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "slack_bot_id",
          "channel_name",
          "response_type"
        ],
        "title": "SlackChannelConfigCreationRequest"
      },
      "SourceAndEntityTypeView": {
        "properties": {
          "source_statistics": {
            "additionalProperties": {
              "$ref": "#/components/schemas/SourceStatistics"
            },
            "type": "object",
            "title": "Source Statistics"
          },
          "entity_types": {
            "additionalProperties": {
              "items": {
                "$ref": "#/components/schemas/EntityType"
              },
              "type": "array"
            },
            "type": "object",
            "title": "Entity Types"
          }
        },
        "type": "object",
        "required": [
          "source_statistics",
          "entity_types"
        ],
        "title": "SourceAndEntityTypeView"
      },
      "SourceStatistics": {
        "properties": {
          "source_name": {
            "type": "string",
            "title": "Source Name"
          },
          "last_updated": {
            "type": "string",
            "format": "date-time",
            "title": "Last Updated"
          },
          "entities_count": {
            "type": "integer",
            "title": "Entities Count"
          }
        },
        "type": "object",
        "required": [
          "source_name",
          "last_updated",
          "entities_count"
        ],
        "title": "SourceStatistics"
      },
      "SourceSummary": {
        "properties": {
          "total_connectors": {
            "type": "integer",
            "title": "Total Connectors"
          },
          "active_connectors": {
            "type": "integer",
            "title": "Active Connectors"
          },
          "public_connectors": {
            "type": "integer",
            "title": "Public Connectors"
          },
          "total_docs_indexed": {
            "type": "integer",
            "title": "Total Docs Indexed"
          }
        },
        "type": "object",
        "required": [
          "total_connectors",
          "active_connectors",
          "public_connectors",
          "total_docs_indexed"
        ],
        "title": "SourceSummary"
      },
      "SourceTag": {
        "properties": {
          "tag_key": {
            "type": "string",
            "title": "Tag Key"
          },
          "tag_value": {
            "type": "string",
            "title": "Tag Value"
          },
          "source": {
            "$ref": "#/components/schemas/DocumentSource"
          }
        },
        "type": "object",
        "required": [
          "tag_key",
          "tag_value",
          "source"
        ],
        "title": "SourceTag"
      },
      "StageScope": {
        "type": "string",
        "enum": [
          "ATTEMPT_LEVEL",
          "BATCH_LEVEL"
        ],
        "title": "StageScope",
        "description": "How often a stage fires per attempt.\n\nUsed by the admin UI to decide where to render each stage:\n\n- `ATTEMPT_LEVEL` stages have at most one event per attempt and are\n  shown as a small \"Attempt overhead\" disclosure.\n- `BATCH_LEVEL` stages have many events per attempt and contribute to\n  the per-batch stacked bar / detail table."
      },
      "StandardAnswer": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "keyword": {
            "type": "string",
            "title": "Keyword"
          },
          "answer": {
            "type": "string",
            "title": "Answer"
          },
          "categories": {
            "items": {
              "$ref": "#/components/schemas/StandardAnswerCategory"
            },
            "type": "array",
            "title": "Categories"
          },
          "match_regex": {
            "type": "boolean",
            "title": "Match Regex"
          },
          "match_any_keywords": {
            "type": "boolean",
            "title": "Match Any Keywords"
          }
        },
        "type": "object",
        "required": [
          "id",
          "keyword",
          "answer",
          "categories",
          "match_regex",
          "match_any_keywords"
        ],
        "title": "StandardAnswer"
      },
      "StandardAnswerCategory": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "StandardAnswerCategory"
      },
      "StandardAnswerCategoryCreationRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "StandardAnswerCategoryCreationRequest"
      },
      "StandardAnswerCreationRequest": {
        "properties": {
          "keyword": {
            "type": "string",
            "title": "Keyword"
          },
          "answer": {
            "type": "string",
            "title": "Answer"
          },
          "categories": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Categories"
          },
          "match_regex": {
            "type": "boolean",
            "title": "Match Regex"
          },
          "match_any_keywords": {
            "type": "boolean",
            "title": "Match Any Keywords"
          }
        },
        "type": "object",
        "required": [
          "keyword",
          "answer",
          "categories",
          "match_regex",
          "match_any_keywords"
        ],
        "title": "StandardAnswerCreationRequest"
      },
      "StandardAnswerRequest": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          },
          "slack_bot_categories": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Slack Bot Categories"
          }
        },
        "type": "object",
        "required": [
          "message",
          "slack_bot_categories"
        ],
        "title": "StandardAnswerRequest"
      },
      "StandardAnswerResponse": {
        "properties": {
          "standard_answers": {
            "items": {
              "$ref": "#/components/schemas/StandardAnswer"
            },
            "type": "array",
            "title": "Standard Answers"
          }
        },
        "type": "object",
        "title": "StandardAnswerResponse"
      },
      "StarterMessage": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "name",
          "message"
        ],
        "title": "StarterMessage",
        "description": "Starter message for a persona."
      },
      "StatusResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "data": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "success"
        ],
        "title": "StatusResponse"
      },
      "StatusResponse_NoneType_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "data": {
            "type": "null",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "success"
        ],
        "title": "StatusResponse[NoneType]"
      },
      "StatusResponse_int_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "data": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "success"
        ],
        "title": "StatusResponse[int]"
      },
      "StatusResponse_list_int__": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "data": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "success"
        ],
        "title": "StatusResponse[list[int]]"
      },
      "StripePortalFlowType": {
        "type": "string",
        "enum": [
          "payment_method_update"
        ],
        "title": "StripePortalFlowType",
        "description": "Stripe billing portal `flow_data.type` values supported by the API.\n\nMirrors `shared.enums.StripePortalFlowType` on the control plane."
      },
      "StripePublishableKeyResponse": {
        "properties": {
          "publishable_key": {
            "type": "string",
            "title": "Publishable Key"
          }
        },
        "type": "object",
        "required": [
          "publishable_key"
        ],
        "title": "StripePublishableKeyResponse",
        "description": "Response containing the Stripe publishable key."
      },
      "SubagentMessageRequest": {
        "properties": {
          "content": {
            "type": "string",
            "title": "Content"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "content"
        ],
        "title": "SubagentMessageRequest",
        "description": "A subagent follow-up does not support native file prompt parts."
      },
      "SubscriptionStatusResponse": {
        "properties": {
          "subscribed": {
            "type": "boolean",
            "title": "Subscribed",
            "default": false
          }
        },
        "type": "object",
        "title": "SubscriptionStatusResponse",
        "description": "Response when no subscription exists."
      },
      "SupportedLanguage": {
        "type": "string",
        "enum": [
          "en",
          "es",
          "pt",
          "fr",
          "de",
          "ja",
          "zh",
          "ko",
          "ar"
        ],
        "title": "SupportedLanguage"
      },
      "SwitchoverType": {
        "type": "string",
        "enum": [
          "reindex",
          "active_only",
          "instant"
        ],
        "title": "SwitchoverType"
      },
      "SynthesizeRequest": {
        "properties": {
          "text": {
            "type": "string",
            "minLength": 1,
            "title": "Text"
          },
          "voice": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice"
          },
          "speed": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2.0,
                "minimum": 0.5
              },
              {
                "type": "null"
              }
            ],
            "title": "Speed"
          }
        },
        "type": "object",
        "required": [
          "text"
        ],
        "title": "SynthesizeRequest"
      },
      "TabularSection": {
        "properties": {
          "type": {
            "type": "string",
            "const": "tabular",
            "title": "Type",
            "default": "tabular"
          },
          "link": {
            "type": "string",
            "title": "Link"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          },
          "image_file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image File Id"
          },
          "heading": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Heading"
          },
          "csv_file_id": {
            "type": "string",
            "title": "Csv File Id"
          }
        },
        "type": "object",
        "required": [
          "link",
          "csv_file_id"
        ],
        "title": "TabularSection",
        "description": "Tabular data \u2014 a csv/tsv file or one xlsx sheet rendered as CSV. The CSV is\nalways staged in the file store (`csv_file_id`) and streamed a row at a time\nat chunk time, so a large sheet never sits on the worker heap."
      },
      "Tag": {
        "properties": {
          "tag_key": {
            "type": "string",
            "title": "Tag Key"
          },
          "tag_value": {
            "type": "string",
            "title": "Tag Value"
          }
        },
        "type": "object",
        "required": [
          "tag_key",
          "tag_value"
        ],
        "title": "Tag"
      },
      "TagResponse": {
        "properties": {
          "tags": {
            "items": {
              "$ref": "#/components/schemas/SourceTag"
            },
            "type": "array",
            "title": "Tags"
          }
        },
        "type": "object",
        "required": [
          "tags"
        ],
        "title": "TagResponse"
      },
      "TargetedReindexJobStatusResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "status": {
            "$ref": "#/components/schemas/IndexingStatus"
          },
          "requested_at": {
            "type": "string",
            "format": "date-time",
            "title": "Requested At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "target_count": {
            "type": "integer",
            "title": "Target Count"
          },
          "resolved_count": {
            "type": "integer",
            "title": "Resolved Count"
          },
          "still_failing_count": {
            "type": "integer",
            "title": "Still Failing Count"
          },
          "skipped_count": {
            "type": "integer",
            "title": "Skipped Count"
          },
          "resolved_summary": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Resolved Summary"
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "requested_at",
          "completed_at",
          "target_count",
          "resolved_count",
          "still_failing_count",
          "skipped_count",
          "resolved_summary"
        ],
        "title": "TargetedReindexJobStatusResponse"
      },
      "TargetedReindexRequest": {
        "properties": {
          "error_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Ids"
          },
          "targets": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/DocumentTargetRequest"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Targets"
          }
        },
        "type": "object",
        "title": "TargetedReindexRequest",
        "description": "Either `error_ids` (failure-driven retry) or `targets` (arbitrary\ndoc reindex). At least one must be non-empty."
      },
      "TargetedReindexResponse": {
        "properties": {
          "targeted_reindex_job_id": {
            "type": "integer",
            "title": "Targeted Reindex Job Id"
          },
          "queued_count": {
            "type": "integer",
            "title": "Queued Count"
          },
          "skipped_count": {
            "type": "integer",
            "title": "Skipped Count"
          }
        },
        "type": "object",
        "required": [
          "targeted_reindex_job_id",
          "queued_count",
          "skipped_count"
        ],
        "title": "TargetedReindexResponse"
      },
      "TaskStatus": {
        "type": "string",
        "enum": [
          "PENDING",
          "STARTED",
          "SUCCESS",
          "FAILURE"
        ],
        "title": "TaskStatus"
      },
      "TemperatureDefaultRequest": {
        "properties": {
          "temperature_default": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature Default"
          }
        },
        "type": "object",
        "title": "TemperatureDefaultRequest",
        "description": "The user's own default temperature. Null clears it."
      },
      "TenantInfo": {
        "properties": {
          "invitation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TenantSnapshot"
              },
              {
                "type": "null"
              }
            ]
          },
          "new_tenant": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TenantSnapshot"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "TenantInfo"
      },
      "TenantSnapshot": {
        "properties": {
          "tenant_id": {
            "type": "string",
            "title": "Tenant Id"
          },
          "number_of_users": {
            "type": "integer",
            "title": "Number Of Users"
          }
        },
        "type": "object",
        "required": [
          "tenant_id",
          "number_of_users"
        ],
        "title": "TenantSnapshot"
      },
      "TestEmbeddingRequest": {
        "properties": {
          "provider_type": {
            "$ref": "#/components/schemas/EmbeddingProvider"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "api_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Url"
          },
          "model_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Name"
          },
          "api_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Version"
          },
          "deployment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deployment Name"
          }
        },
        "type": "object",
        "required": [
          "provider_type"
        ],
        "title": "TestEmbeddingRequest"
      },
      "TestImageGenerationRequest": {
        "properties": {
          "model_name": {
            "type": "string",
            "title": "Model Name"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "source_llm_provider_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Llm Provider Id"
          },
          "custom_config": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Config"
          },
          "api_base": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Base"
          },
          "api_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Version"
          },
          "deployment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deployment Name"
          }
        },
        "type": "object",
        "required": [
          "model_name"
        ],
        "title": "TestImageGenerationRequest",
        "description": "Request model for testing image generation API key.\n\nTwo modes:\n1. Direct API key: Provide api_key + provider\n2. From existing provider: Provide source_llm_provider_id (backend fetches API key)"
      },
      "TestLLMRequest": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "api_base": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Base"
          },
          "api_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Version"
          },
          "custom_config": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Config"
          },
          "deployment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deployment Name"
          },
          "api_key_changed": {
            "type": "boolean",
            "title": "Api Key Changed"
          },
          "custom_config_changed": {
            "type": "boolean",
            "title": "Custom Config Changed"
          }
        },
        "type": "object",
        "required": [
          "provider",
          "model",
          "api_key_changed",
          "custom_config_changed"
        ],
        "title": "TestLLMRequest"
      },
      "TestUpsertRequest": {
        "properties": {
          "email": {
            "type": "string",
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "TestUpsertRequest"
      },
      "TextSection": {
        "properties": {
          "type": {
            "type": "string",
            "const": "text",
            "title": "Type",
            "default": "text"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          },
          "text": {
            "type": "string",
            "title": "Text"
          },
          "image_file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image File Id"
          },
          "heading": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Heading"
          }
        },
        "type": "object",
        "required": [
          "text"
        ],
        "title": "TextSection",
        "description": "Section containing text content"
      },
      "ThemePreference": {
        "type": "string",
        "enum": [
          "light",
          "dark",
          "system"
        ],
        "title": "ThemePreference"
      },
      "ThemePreferenceRequest": {
        "properties": {
          "theme_preference": {
            "$ref": "#/components/schemas/ThemePreference"
          }
        },
        "type": "object",
        "required": [
          "theme_preference"
        ],
        "title": "ThemePreferenceRequest"
      },
      "Tier": {
        "type": "string",
        "enum": [
          "community",
          "business",
          "enterprise"
        ],
        "title": "Tier"
      },
      "TimeRange": {
        "properties": {
          "start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start"
          },
          "end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "End"
          }
        },
        "type": "object",
        "title": "TimeRange",
        "description": "An inclusive [start, end] window; either bound may be None (open).\nNaive (timezone-less) bounds are treated as UTC."
      },
      "TokenCountResponse": {
        "properties": {
          "total_tokens": {
            "type": "integer",
            "title": "Total Tokens"
          }
        },
        "type": "object",
        "required": [
          "total_tokens"
        ],
        "title": "TokenCountResponse"
      },
      "TokenRateLimitArgs": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "token_budget": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1000000000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Token Budget"
          },
          "period_hours": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "Period Hours"
          },
          "cost_budget_cents": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Budget Cents"
          }
        },
        "type": "object",
        "required": [
          "enabled",
          "period_hours"
        ],
        "title": "TokenRateLimitArgs"
      },
      "TokenRateLimitDisplay": {
        "properties": {
          "token_id": {
            "type": "integer",
            "title": "Token Id"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "token_budget": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Token Budget"
          },
          "period_hours": {
            "type": "integer",
            "title": "Period Hours"
          },
          "cost_budget_cents": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Budget Cents"
          }
        },
        "type": "object",
        "required": [
          "token_id",
          "enabled",
          "token_budget",
          "period_hours",
          "cost_budget_cents"
        ],
        "title": "TokenRateLimitDisplay"
      },
      "TokenRateLimitUpdateArgs": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "token_budget": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Token Budget"
          },
          "period_hours": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "Period Hours"
          },
          "cost_budget_cents": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Budget Cents"
          }
        },
        "type": "object",
        "required": [
          "enabled",
          "period_hours"
        ],
        "title": "TokenRateLimitUpdateArgs"
      },
      "TokenResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "token_display": {
            "type": "string",
            "title": "Token Display"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "scopes": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Permission"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scopes"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "token_display",
          "created_at",
          "expires_at",
          "last_used_at",
          "scopes"
        ],
        "title": "TokenResponse"
      },
      "Tool": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "inputSchema": {
            "additionalProperties": true,
            "type": "object",
            "title": "Inputschema"
          },
          "outputSchema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Outputschema"
          },
          "icons": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Icon"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icons"
          },
          "annotations": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ToolAnnotations"
              },
              {
                "type": "null"
              }
            ]
          },
          "_meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          },
          "execution": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ToolExecution"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "name",
          "inputSchema"
        ],
        "title": "Tool",
        "description": "Definition for a tool the client can call."
      },
      "ToolAnnotations": {
        "properties": {
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "readOnlyHint": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Readonlyhint"
          },
          "destructiveHint": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Destructivehint"
          },
          "idempotentHint": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idempotenthint"
          },
          "openWorldHint": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Openworldhint"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "title": "ToolAnnotations",
        "description": "Additional properties describing a Tool to clients.\n\nNOTE: all properties in ToolAnnotations are **hints**.\nThey are not guaranteed to provide a faithful description of\ntool behavior (including descriptive properties like `title`).\n\nClients should never make tool use decisions based on ToolAnnotations\nreceived from untrusted servers."
      },
      "ToolCallArgumentDelta": {
        "properties": {
          "type": {
            "type": "string",
            "const": "tool_call_argument_delta",
            "title": "Type",
            "default": "tool_call_argument_delta"
          },
          "tool_type": {
            "type": "string",
            "title": "Tool Type"
          },
          "argument_deltas": {
            "additionalProperties": true,
            "type": "object",
            "title": "Argument Deltas"
          }
        },
        "type": "object",
        "required": [
          "tool_type",
          "argument_deltas"
        ],
        "title": "ToolCallArgumentDelta"
      },
      "ToolCallDebug": {
        "properties": {
          "type": {
            "type": "string",
            "const": "tool_call_debug",
            "title": "Type",
            "default": "tool_call_debug"
          },
          "tool_call_id": {
            "type": "string",
            "title": "Tool Call Id"
          },
          "tool_name": {
            "type": "string",
            "title": "Tool Name"
          },
          "tool_args": {
            "additionalProperties": true,
            "type": "object",
            "title": "Tool Args"
          }
        },
        "type": "object",
        "required": [
          "tool_call_id",
          "tool_name",
          "tool_args"
        ],
        "title": "ToolCallDebug"
      },
      "ToolCallResponse": {
        "properties": {
          "tool_name": {
            "type": "string",
            "title": "Tool Name"
          },
          "tool_arguments": {
            "additionalProperties": true,
            "type": "object",
            "title": "Tool Arguments"
          },
          "tool_result": {
            "type": "string",
            "title": "Tool Result"
          },
          "search_docs": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SearchDoc"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Search Docs"
          },
          "generated_images": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/GeneratedImage"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generated Images"
          },
          "pre_reasoning": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pre Reasoning"
          }
        },
        "type": "object",
        "required": [
          "tool_name",
          "tool_arguments",
          "tool_result"
        ],
        "title": "ToolCallResponse",
        "description": "Tool call with full details for non-streaming response."
      },
      "ToolExecution": {
        "properties": {
          "taskSupport": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "forbidden",
                  "optional",
                  "required"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Tasksupport"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "title": "ToolExecution",
        "description": "Execution-related properties for a tool."
      },
      "ToolSnapshot": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "definition": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Definition"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "in_code_tool_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "In Code Tool Id"
          },
          "custom_headers": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Headers"
          },
          "passthrough_auth": {
            "type": "boolean",
            "title": "Passthrough Auth"
          },
          "mcp_server_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mcp Server Id"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          },
          "oauth_config_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Config Id"
          },
          "oauth_config_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Config Name"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          },
          "permissions": {
            "additionalProperties": {
              "type": "boolean"
            },
            "type": "object",
            "title": "Permissions"
          },
          "chat_selectable": {
            "type": "boolean",
            "title": "Chat Selectable",
            "default": true
          },
          "agent_creation_selectable": {
            "type": "boolean",
            "title": "Agent Creation Selectable",
            "default": true
          },
          "default_enabled": {
            "type": "boolean",
            "title": "Default Enabled",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "definition",
          "display_name",
          "in_code_tool_id",
          "custom_headers",
          "passthrough_auth"
        ],
        "title": "ToolSnapshot"
      },
      "ToolSnapshotSource": {
        "type": "string",
        "enum": [
          "db",
          "mcp"
        ],
        "title": "ToolSnapshotSource"
      },
      "ToolStatusUpdateRequest": {
        "properties": {
          "tool_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Tool Ids"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          }
        },
        "type": "object",
        "required": [
          "tool_ids",
          "enabled"
        ],
        "title": "ToolStatusUpdateRequest"
      },
      "ToolStatusUpdateResponse": {
        "properties": {
          "updated_count": {
            "type": "integer",
            "title": "Updated Count"
          },
          "tool_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Tool Ids"
          }
        },
        "type": "object",
        "required": [
          "updated_count",
          "tool_ids"
        ],
        "title": "ToolStatusUpdateResponse"
      },
      "TopLevelBranching": {
        "properties": {
          "type": {
            "type": "string",
            "const": "top_level_branching",
            "title": "Type",
            "default": "top_level_branching"
          },
          "num_parallel_branches": {
            "type": "integer",
            "title": "Num Parallel Branches"
          }
        },
        "type": "object",
        "required": [
          "num_parallel_branches"
        ],
        "title": "TopLevelBranching"
      },
      "TracingProviderTestRequest": {
        "properties": {
          "provider_type": {
            "$ref": "#/components/schemas/TracingProviderType"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "use_stored_key": {
            "type": "boolean",
            "title": "Use Stored Key",
            "description": "If true, validate the stored key instead of `api_key`.",
            "default": false
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          }
        },
        "type": "object",
        "required": [
          "provider_type"
        ],
        "title": "TracingProviderTestRequest"
      },
      "TracingProviderType": {
        "type": "string",
        "enum": [
          "braintrust",
          "langfuse"
        ],
        "title": "TracingProviderType"
      },
      "TracingProviderUpsertRequest": {
        "properties": {
          "provider_type": {
            "$ref": "#/components/schemas/TracingProviderType"
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "api_key_changed": {
            "type": "boolean",
            "title": "Api Key Changed",
            "description": "Set to true when providing a new key for an existing provider.",
            "default": false
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "provider_type"
        ],
        "title": "TracingProviderUpsertRequest"
      },
      "TracingProviderView": {
        "properties": {
          "provider_type": {
            "$ref": "#/components/schemas/TracingProviderType"
          },
          "connected": {
            "type": "boolean",
            "title": "Connected"
          },
          "source": {
            "type": "string",
            "enum": [
              "db",
              "env",
              "none"
            ],
            "title": "Source"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "config": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Config"
          },
          "masked_api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Masked Api Key"
          }
        },
        "type": "object",
        "required": [
          "provider_type",
          "connected",
          "source",
          "enabled"
        ],
        "title": "TracingProviderView"
      },
      "TransferPersonaOwnershipRequest": {
        "properties": {
          "new_owner_user_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "New Owner User Id"
          },
          "new_owner_group_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "New Owner Group Id"
          }
        },
        "type": "object",
        "title": "TransferPersonaOwnershipRequest"
      },
      "TransferSkillOwnershipRequest": {
        "properties": {
          "new_owner_user_id": {
            "type": "string",
            "format": "uuid",
            "title": "New Owner User Id"
          }
        },
        "type": "object",
        "required": [
          "new_owner_user_id"
        ],
        "title": "TransferSkillOwnershipRequest"
      },
      "UpdateChatSessionReasoningRequest": {
        "properties": {
          "chat_session_id": {
            "type": "string",
            "format": "uuid",
            "title": "Chat Session Id"
          },
          "reasoning_effort_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning Effort Override"
          }
        },
        "type": "object",
        "required": [
          "chat_session_id"
        ],
        "title": "UpdateChatSessionReasoningRequest"
      },
      "UpdateChatSessionTemperatureRequest": {
        "properties": {
          "chat_session_id": {
            "type": "string",
            "format": "uuid",
            "title": "Chat Session Id"
          },
          "temperature_override": {
            "type": "number",
            "title": "Temperature Override"
          }
        },
        "type": "object",
        "required": [
          "chat_session_id",
          "temperature_override"
        ],
        "title": "UpdateChatSessionTemperatureRequest"
      },
      "UpdateChatSessionThreadRequest": {
        "properties": {
          "chat_session_id": {
            "type": "string",
            "format": "uuid",
            "title": "Chat Session Id"
          },
          "new_alternate_model": {
            "type": "string",
            "title": "New Alternate Model"
          }
        },
        "type": "object",
        "required": [
          "chat_session_id",
          "new_alternate_model"
        ],
        "title": "UpdateChatSessionThreadRequest"
      },
      "UpdateExternalAppRequest": {
        "properties": {
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "upstream_url_patterns": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Upstream Url Patterns"
          },
          "auth_template": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auth Template"
          },
          "organization_credentials": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Credentials"
          },
          "associated_skill_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Associated Skill Ids"
          },
          "action_policies": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/EndpointPolicy"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Action Policies"
          }
        },
        "type": "object",
        "title": "UpdateExternalAppRequest",
        "description": "Partial update of an existing app, keyed solely by the path ``id``\n(``PATCH /admin/apps/{id}``). Every field is optional; ``None`` means \"leave\nuntouched\", so a narrow request won't blank the rest.\n\nThis is the single update path for all apps. For Onyx-managed built-ins\n(cloud) the gateway-config fields (``upstream_url_patterns``,\n``auth_template``, ``organization_credentials``) are Onyx-owned and ignored \u2014\nonly ``enabled`` and ``action_policies`` take effect."
      },
      "UpdateGroupAgentsRequest": {
        "properties": {
          "added_agent_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Added Agent Ids"
          },
          "removed_agent_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Removed Agent Ids"
          }
        },
        "type": "object",
        "required": [
          "added_agent_ids",
          "removed_agent_ids"
        ],
        "title": "UpdateGroupAgentsRequest"
      },
      "UpdateGroupDocumentSetsRequest": {
        "properties": {
          "added_document_set_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Added Document Set Ids"
          },
          "removed_document_set_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Removed Document Set Ids"
          }
        },
        "type": "object",
        "required": [
          "added_document_set_ids",
          "removed_document_set_ids"
        ],
        "title": "UpdateGroupDocumentSetsRequest"
      },
      "UpdateInputPromptRequest": {
        "properties": {
          "prompt": {
            "type": "string",
            "title": "Prompt"
          },
          "content": {
            "type": "string",
            "title": "Content"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          }
        },
        "type": "object",
        "required": [
          "prompt",
          "content",
          "active"
        ],
        "title": "UpdateInputPromptRequest"
      },
      "UpdateProjectRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          }
        },
        "type": "object",
        "title": "UpdateProjectRequest"
      },
      "UpsertProjectInstructionsRequest": {
        "properties": {
          "instructions": {
            "type": "string",
            "title": "Instructions"
          }
        },
        "type": "object",
        "required": [
          "instructions"
        ],
        "title": "UpsertProjectInstructionsRequest"
      },
      "UpsertUserCredentialsRequest": {
        "properties": {
          "user_credentials": {
            "additionalProperties": true,
            "type": "object",
            "title": "User Credentials"
          }
        },
        "type": "object",
        "required": [
          "user_credentials"
        ],
        "title": "UpsertUserCredentialsRequest",
        "description": "User-supplied credentials for a specific external app."
      },
      "UsageExportRecord": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model"
          },
          "flow": {
            "type": "string",
            "title": "Flow"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "incognito": {
            "type": "boolean",
            "title": "Incognito"
          },
          "day": {
            "type": "string",
            "title": "Day"
          },
          "input_tokens": {
            "type": "integer",
            "title": "Input Tokens"
          },
          "output_tokens": {
            "type": "integer",
            "title": "Output Tokens"
          },
          "cache_read_tokens": {
            "type": "integer",
            "title": "Cache Read Tokens"
          },
          "cache_creation_tokens": {
            "type": "integer",
            "title": "Cache Creation Tokens"
          },
          "cost_cents": {
            "type": "number",
            "title": "Cost Cents"
          }
        },
        "type": "object",
        "required": [
          "model",
          "flow",
          "provider",
          "incognito",
          "day",
          "input_tokens",
          "output_tokens",
          "cache_read_tokens",
          "cache_creation_tokens",
          "cost_cents"
        ],
        "title": "UsageExportRecord"
      },
      "UsageExportResponse": {
        "properties": {
          "start": {
            "type": "string",
            "title": "Start"
          },
          "end": {
            "type": "string",
            "title": "End"
          },
          "users": {
            "items": {
              "$ref": "#/components/schemas/UsageExportUser"
            },
            "type": "array",
            "title": "Users"
          }
        },
        "type": "object",
        "required": [
          "start",
          "end",
          "users"
        ],
        "title": "UsageExportResponse",
        "description": "Nested per-user daily usage export."
      },
      "UsageExportTotals": {
        "properties": {
          "input_tokens": {
            "type": "integer",
            "title": "Input Tokens"
          },
          "output_tokens": {
            "type": "integer",
            "title": "Output Tokens"
          },
          "cache_read_tokens": {
            "type": "integer",
            "title": "Cache Read Tokens"
          },
          "cache_creation_tokens": {
            "type": "integer",
            "title": "Cache Creation Tokens"
          },
          "cost_cents": {
            "type": "number",
            "title": "Cost Cents"
          }
        },
        "type": "object",
        "required": [
          "input_tokens",
          "output_tokens",
          "cache_read_tokens",
          "cache_creation_tokens",
          "cost_cents"
        ],
        "title": "UsageExportTotals"
      },
      "UsageExportUser": {
        "properties": {
          "email": {
            "type": "string",
            "title": "Email"
          },
          "totals": {
            "$ref": "#/components/schemas/UsageExportTotals"
          },
          "records": {
            "items": {
              "$ref": "#/components/schemas/UsageExportRecord"
            },
            "type": "array",
            "title": "Records"
          }
        },
        "type": "object",
        "required": [
          "email",
          "totals",
          "records"
        ],
        "title": "UsageExportUser"
      },
      "UsageReportMetadata": {
        "properties": {
          "report_name": {
            "type": "string",
            "title": "Report Name"
          },
          "requestor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requestor"
          },
          "time_created": {
            "type": "string",
            "format": "date-time",
            "title": "Time Created"
          },
          "period_from": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period From"
          },
          "period_to": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period To"
          }
        },
        "type": "object",
        "required": [
          "report_name",
          "requestor",
          "time_created",
          "period_from",
          "period_to"
        ],
        "title": "UsageReportMetadata"
      },
      "UserAdminAccessUpdateRequest": {
        "properties": {
          "user_email": {
            "type": "string",
            "title": "User Email"
          },
          "is_admin": {
            "type": "boolean",
            "title": "Is Admin"
          }
        },
        "type": "object",
        "required": [
          "user_email",
          "is_admin"
        ],
        "title": "UserAdminAccessUpdateRequest"
      },
      "UserAnalyticsResponse": {
        "properties": {
          "total_active_users": {
            "type": "integer",
            "title": "Total Active Users"
          },
          "date": {
            "type": "string",
            "format": "date",
            "title": "Date"
          }
        },
        "type": "object",
        "required": [
          "total_active_users",
          "date"
        ],
        "title": "UserAnalyticsResponse"
      },
      "UserByEmail": {
        "properties": {
          "user_email": {
            "type": "string",
            "title": "User Email"
          }
        },
        "type": "object",
        "required": [
          "user_email"
        ],
        "title": "UserByEmail"
      },
      "UserCraftAccessUpdateRequest": {
        "properties": {
          "user_emails": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "User Emails"
          },
          "craft_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Craft Enabled"
          }
        },
        "type": "object",
        "required": [
          "user_emails",
          "craft_enabled"
        ],
        "title": "UserCraftAccessUpdateRequest"
      },
      "UserCreate": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "password": {
            "type": "string",
            "title": "Password"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active",
            "default": true
          },
          "is_superuser": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Superuser",
            "default": false
          },
          "is_verified": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Verified",
            "default": false
          },
          "account_type": {
            "$ref": "#/components/schemas/AccountType",
            "default": "STANDARD"
          },
          "tenant_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tenant Id"
          },
          "captcha_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Captcha Token"
          }
        },
        "type": "object",
        "required": [
          "email",
          "password"
        ],
        "title": "UserCreate"
      },
      "UserFileDeleteResult": {
        "properties": {
          "has_associations": {
            "type": "boolean",
            "title": "Has Associations"
          },
          "project_names": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Project Names",
            "default": []
          },
          "assistant_names": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Assistant Names",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "has_associations"
        ],
        "title": "UserFileDeleteResult"
      },
      "UserFileIdsRequest": {
        "properties": {
          "file_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "File Ids"
          }
        },
        "type": "object",
        "required": [
          "file_ids"
        ],
        "title": "UserFileIdsRequest"
      },
      "UserFileSnapshot": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "temp_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temp Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          },
          "file_id": {
            "type": "string",
            "title": "File Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "status": {
            "$ref": "#/components/schemas/UserFileStatus"
          },
          "last_accessed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Accessed At"
          },
          "file_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Type"
          },
          "chat_file_type": {
            "$ref": "#/components/schemas/ChatFileType"
          },
          "token_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Token Count"
          },
          "chunk_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chunk Count"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "user_id",
          "file_id",
          "created_at",
          "status",
          "last_accessed_at",
          "file_type",
          "chat_file_type",
          "token_count",
          "chunk_count"
        ],
        "title": "UserFileSnapshot"
      },
      "UserFileStatus": {
        "type": "string",
        "enum": [
          "PROCESSING",
          "INDEXING",
          "COMPLETED",
          "SKIPPED",
          "FAILED",
          "CANCELED",
          "DELETING"
        ],
        "title": "UserFileStatus"
      },
      "UserGroup": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "users": {
            "items": {
              "$ref": "#/components/schemas/UserInfo"
            },
            "type": "array",
            "title": "Users"
          },
          "manager_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Manager Ids"
          },
          "cc_pairs": {
            "items": {
              "$ref": "#/components/schemas/ConnectorCredentialPairDescriptor"
            },
            "type": "array",
            "title": "Cc Pairs"
          },
          "document_sets": {
            "items": {
              "$ref": "#/components/schemas/DocumentSet"
            },
            "type": "array",
            "title": "Document Sets"
          },
          "personas": {
            "items": {
              "$ref": "#/components/schemas/PersonaSnapshot"
            },
            "type": "array",
            "title": "Personas"
          },
          "is_up_to_date": {
            "type": "boolean",
            "title": "Is Up To Date"
          },
          "is_up_for_deletion": {
            "type": "boolean",
            "title": "Is Up For Deletion"
          },
          "is_default": {
            "type": "boolean",
            "title": "Is Default"
          },
          "incognito_enabled": {
            "type": "boolean",
            "title": "Incognito Enabled"
          },
          "permissions": {
            "additionalProperties": {
              "type": "boolean"
            },
            "type": "object",
            "title": "Permissions"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "users",
          "manager_ids",
          "cc_pairs",
          "document_sets",
          "personas",
          "is_up_to_date",
          "is_up_for_deletion",
          "is_default",
          "incognito_enabled"
        ],
        "title": "UserGroup"
      },
      "UserGroupCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "user_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "User Ids"
          },
          "cc_pair_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Cc Pair Ids"
          }
        },
        "type": "object",
        "required": [
          "name",
          "user_ids",
          "cc_pair_ids"
        ],
        "title": "UserGroupCreate"
      },
      "UserGroupIncognitoUpdate": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          }
        },
        "type": "object",
        "required": [
          "enabled"
        ],
        "title": "UserGroupIncognitoUpdate"
      },
      "UserGroupInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "UserGroupInfo"
      },
      "UserGroupRename": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "UserGroupRename"
      },
      "UserGroupUpdate": {
        "properties": {
          "user_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "User Ids"
          },
          "cc_pair_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cc Pair Ids"
          }
        },
        "type": "object",
        "required": [
          "user_ids"
        ],
        "title": "UserGroupUpdate"
      },
      "UserIdRequest": {
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "user_id"
        ],
        "title": "UserIdRequest"
      },
      "UserInfo": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active"
          },
          "is_superuser": {
            "type": "boolean",
            "title": "Is Superuser"
          },
          "is_verified": {
            "type": "boolean",
            "title": "Is Verified"
          },
          "account_type": {
            "$ref": "#/components/schemas/AccountType",
            "default": "STANDARD"
          },
          "preferences": {
            "$ref": "#/components/schemas/UserPreferences"
          },
          "personalization": {
            "$ref": "#/components/schemas/UserPersonalization"
          },
          "token_expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Token Expires At"
          },
          "is_cloud_superuser": {
            "type": "boolean",
            "title": "Is Cloud Superuser",
            "default": false
          },
          "team_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Name"
          },
          "is_anonymous_user": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Anonymous User"
          },
          "password_configured": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Password Configured"
          },
          "tenant_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TenantInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "effective_permissions": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Effective Permissions"
          },
          "is_group_manager": {
            "type": "boolean",
            "title": "Is Group Manager",
            "default": false
          },
          "admin_capabilities": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Admin Capabilities"
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "is_active",
          "is_superuser",
          "is_verified",
          "preferences"
        ],
        "title": "UserInfo"
      },
      "UserOAuthStatus": {
        "properties": {
          "federated_connector_id": {
            "type": "integer",
            "title": "Federated Connector Id"
          },
          "source": {
            "$ref": "#/components/schemas/FederatedConnectorSource"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "has_oauth_token": {
            "type": "boolean",
            "title": "Has Oauth Token"
          },
          "oauth_token_expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oauth Token Expires At"
          },
          "authorize_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Authorize Url"
          }
        },
        "type": "object",
        "required": [
          "federated_connector_id",
          "source",
          "name",
          "has_oauth_token"
        ],
        "title": "UserOAuthStatus",
        "description": "OAuth status for a specific user and federated connector"
      },
      "UserPermissionsResponse": {
        "properties": {
          "permissions": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Permissions"
          },
          "is_manager": {
            "type": "boolean",
            "title": "Is Manager"
          },
          "managed_group_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Managed Group Ids"
          }
        },
        "type": "object",
        "required": [
          "permissions",
          "is_manager",
          "managed_group_ids"
        ],
        "title": "UserPermissionsResponse"
      },
      "UserPersonalization": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "default": ""
          },
          "role": {
            "type": "string",
            "title": "Role",
            "default": ""
          },
          "use_memories": {
            "type": "boolean",
            "title": "Use Memories",
            "default": true
          },
          "enable_memory_tool": {
            "type": "boolean",
            "title": "Enable Memory Tool",
            "default": true
          },
          "memories": {
            "items": {
              "$ref": "#/components/schemas/MemoryItem"
            },
            "type": "array",
            "title": "Memories"
          },
          "user_preferences": {
            "type": "string",
            "title": "User Preferences",
            "default": ""
          }
        },
        "type": "object",
        "title": "UserPersonalization"
      },
      "UserPreferences": {
        "properties": {
          "chosen_assistants": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chosen Assistants"
          },
          "hidden_assistants": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Hidden Assistants",
            "default": []
          },
          "visible_assistants": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Visible Assistants",
            "default": []
          },
          "default_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Model"
          },
          "pinned_assistants": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Pinned Assistants",
            "default": []
          },
          "shortcut_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shortcut Enabled"
          },
          "auto_scroll": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Scroll"
          },
          "temperature_override_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature Override Enabled"
          },
          "temperature_default": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature Default"
          },
          "reasoning_effort_default": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReasoningEffort"
              },
              {
                "type": "null"
              }
            ]
          },
          "theme_preference": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ThemePreference"
              },
              {
                "type": "null"
              }
            ]
          },
          "language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language"
          },
          "chat_background": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chat Background"
          },
          "default_app_mode": {
            "$ref": "#/components/schemas/DefaultAppMode",
            "default": "CHAT"
          },
          "paste_as_tile": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paste As Tile"
          },
          "voice_auto_send": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Auto Send"
          },
          "voice_auto_playback": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Auto Playback"
          },
          "voice_playback_speed": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Playback Speed"
          },
          "assistant_specific_configs": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/UserSpecificAssistantPreference"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assistant Specific Configs"
          }
        },
        "type": "object",
        "title": "UserPreferences"
      },
      "UserProjectSnapshot": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "chat_sessions": {
            "items": {
              "$ref": "#/components/schemas/ChatSessionDetails"
            },
            "type": "array",
            "title": "Chat Sessions"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "created_at",
          "user_id",
          "chat_sessions"
        ],
        "title": "UserProjectSnapshot"
      },
      "UserRead": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "is_superuser": {
            "type": "boolean",
            "title": "Is Superuser",
            "default": false
          },
          "is_verified": {
            "type": "boolean",
            "title": "Is Verified",
            "default": false
          },
          "account_type": {
            "$ref": "#/components/schemas/AccountType"
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "account_type"
        ],
        "title": "UserRead"
      },
      "UserResetRequest": {
        "properties": {
          "user_email": {
            "type": "string",
            "title": "User Email"
          }
        },
        "type": "object",
        "required": [
          "user_email"
        ],
        "title": "UserResetRequest"
      },
      "UserResetResponse": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "new_password": {
            "type": "string",
            "title": "New Password"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "new_password"
        ],
        "title": "UserResetResponse"
      },
      "UserSettings": {
        "properties": {
          "maximum_chat_retention_days": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Maximum Chat Retention Days"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "company_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Description"
          },
          "gpu_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gpu Enabled"
          },
          "application_status": {
            "$ref": "#/components/schemas/ApplicationStatus",
            "default": "active"
          },
          "anonymous_user_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anonymous User Enabled"
          },
          "invite_only_enabled": {
            "type": "boolean",
            "title": "Invite Only Enabled",
            "default": false
          },
          "deep_research_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deep Research Enabled"
          },
          "multi_model_chat_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Multi Model Chat Enabled",
            "default": true
          },
          "search_ui_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Search Ui Enabled",
            "default": true
          },
          "auto_detect_search_filters": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Detect Search Filters",
            "default": true
          },
          "ee_features_enabled": {
            "type": "boolean",
            "title": "Ee Features Enabled",
            "default": false
          },
          "tier": {
            "$ref": "#/components/schemas/Tier",
            "default": "community"
          },
          "temperature_override_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature Override Enabled",
            "default": true
          },
          "reasoning_override_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning Override Enabled",
            "default": true
          },
          "hide_provider_grouping": {
            "type": "boolean",
            "title": "Hide Provider Grouping",
            "default": false
          },
          "auto_scroll": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Scroll",
            "default": false
          },
          "query_history_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/QueryHistoryType"
              },
              {
                "type": "null"
              }
            ]
          },
          "hide_query_history_from_admin_panel": {
            "type": "boolean",
            "title": "Hide Query History From Admin Panel",
            "default": false
          },
          "image_extraction_and_analysis_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Extraction And Analysis Enabled",
            "default": true
          },
          "image_analysis_max_size_mb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Analysis Max Size Mb",
            "default": 20
          },
          "user_knowledge_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Knowledge Enabled",
            "default": true
          },
          "user_file_max_upload_size_mb": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "User File Max Upload Size Mb",
            "default": 100
          },
          "file_token_count_threshold_k": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "File Token Count Threshold K"
          },
          "show_extra_connectors": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Show Extra Connectors",
            "default": true
          },
          "disable_default_assistant": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disable Default Assistant",
            "default": false
          },
          "craft_default_enabled": {
            "type": "boolean",
            "title": "Craft Default Enabled",
            "default": true
          },
          "craft_instructions": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4000
              },
              {
                "type": "null"
              }
            ],
            "title": "Craft Instructions"
          },
          "seat_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seat Count"
          },
          "used_seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Used Seats"
          },
          "opensearch_indexing_enabled": {
            "type": "boolean",
            "title": "Opensearch Indexing Enabled",
            "default": false
          },
          "nexus_personal_mode": {
            "type": "boolean",
            "title": "Nexus Personal Mode",
            "default": false
          },
          "nexus_school_mode": {
            "type": "boolean",
            "title": "Nexus School Mode",
            "default": false
          },
          "nexus_dove_persona_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nexus Dove Persona Id"
          },
          "notifications": {
            "items": {
              "$ref": "#/components/schemas/NotificationResponse"
            },
            "type": "array",
            "title": "Notifications"
          },
          "needs_reindexing": {
            "type": "boolean",
            "title": "Needs Reindexing"
          },
          "tenant_id": {
            "type": "string",
            "title": "Tenant Id",
            "default": "public"
          },
          "onyx_craft_enabled": {
            "type": "boolean",
            "title": "Onyx Craft Enabled",
            "default": false
          },
          "onyx_craft_available": {
            "type": "boolean",
            "title": "Onyx Craft Available",
            "default": false
          },
          "opencode_debugging_enabled": {
            "type": "boolean",
            "title": "Opencode Debugging Enabled",
            "default": false
          },
          "vector_db_enabled": {
            "type": "boolean",
            "title": "Vector Db Enabled",
            "default": true
          },
          "hooks_enabled": {
            "type": "boolean",
            "title": "Hooks Enabled",
            "default": false
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "max_allowed_upload_size_mb": {
            "type": "integer",
            "title": "Max Allowed Upload Size Mb",
            "default": 250
          },
          "default_pruning_freq": {
            "type": "integer",
            "title": "Default Pruning Freq",
            "default": 604800
          },
          "default_user_file_max_upload_size_mb": {
            "type": "integer",
            "title": "Default User File Max Upload Size Mb",
            "default": 100
          },
          "default_file_token_count_threshold_k": {
            "type": "integer",
            "title": "Default File Token Count Threshold K"
          },
          "is_containerized": {
            "type": "boolean",
            "title": "Is Containerized",
            "default": false
          },
          "posthog_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Posthog Key"
          },
          "posthog_host": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Posthog Host"
          }
        },
        "type": "object",
        "required": [
          "notifications",
          "needs_reindexing"
        ],
        "title": "UserSettings"
      },
      "UserSpecificAssistantPreference": {
        "properties": {
          "disabled_tool_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Disabled Tool Ids"
          }
        },
        "type": "object",
        "required": [
          "disabled_tool_ids"
        ],
        "title": "UserSpecificAssistantPreference"
      },
      "UserUpdate": {
        "properties": {
          "password": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Password"
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "is_superuser": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Superuser"
          },
          "is_verified": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Verified"
          }
        },
        "type": "object",
        "title": "UserUpdate",
        "description": "Intentionally empty: keeps account_type and permissions out of the\nfastapi-users PATCH endpoints."
      },
      "UserUsageByDay": {
        "properties": {
          "day": {
            "type": "string",
            "title": "Day"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "input_tokens": {
            "type": "integer",
            "title": "Input Tokens"
          },
          "output_tokens": {
            "type": "integer",
            "title": "Output Tokens"
          },
          "cache_read_tokens": {
            "type": "integer",
            "title": "Cache Read Tokens"
          },
          "cache_creation_tokens": {
            "type": "integer",
            "title": "Cache Creation Tokens"
          },
          "cost_cents": {
            "type": "number",
            "title": "Cost Cents"
          }
        },
        "type": "object",
        "required": [
          "day",
          "model",
          "input_tokens",
          "output_tokens",
          "cache_read_tokens",
          "cache_creation_tokens",
          "cost_cents"
        ],
        "title": "UserUsageByDay",
        "description": "Per-user usage aggregated by UTC calendar day and model."
      },
      "UserUsageResponse": {
        "properties": {
          "per_day_by_model": {
            "items": {
              "$ref": "#/components/schemas/UserUsageByDay"
            },
            "type": "array",
            "title": "Per Day By Model"
          },
          "window_cost_cents": {
            "type": "number",
            "title": "Window Cost Cents"
          },
          "budget_cents": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Budget Cents"
          },
          "budget_remaining_cents": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Budget Remaining Cents"
          },
          "budget_period_hours": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Budget Period Hours"
          },
          "budget_reset_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Budget Reset At"
          },
          "selected_model_price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelPrice"
              },
              {
                "type": "null"
              }
            ]
          },
          "available_model_prices": {
            "items": {
              "$ref": "#/components/schemas/ModelPrice"
            },
            "type": "array",
            "title": "Available Model Prices"
          }
        },
        "type": "object",
        "required": [
          "per_day_by_model",
          "window_cost_cents",
          "budget_cents",
          "budget_remaining_cents",
          "selected_model_price"
        ],
        "title": "UserUsageResponse"
      },
      "ValidateToolRequest": {
        "properties": {
          "definition": {
            "additionalProperties": true,
            "type": "object",
            "title": "Definition"
          }
        },
        "type": "object",
        "required": [
          "definition"
        ],
        "title": "ValidateToolRequest"
      },
      "ValidateToolResponse": {
        "properties": {
          "methods": {
            "items": {
              "$ref": "#/components/schemas/MethodSpec"
            },
            "type": "array",
            "title": "Methods"
          }
        },
        "type": "object",
        "required": [
          "methods"
        ],
        "title": "ValidateToolResponse"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "VersionResponse": {
        "properties": {
          "backend_version": {
            "type": "string",
            "title": "Backend Version"
          }
        },
        "type": "object",
        "required": [
          "backend_version"
        ],
        "title": "VersionResponse"
      },
      "VisionProviderResponse": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "api_base": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Base"
          },
          "api_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Version"
          },
          "custom_config": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Config"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public",
            "default": true
          },
          "is_auto_mode": {
            "type": "boolean",
            "title": "Is Auto Mode",
            "default": false
          },
          "groups": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Groups"
          },
          "personas": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Personas"
          },
          "deployment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deployment Name"
          },
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "model_configurations": {
            "items": {
              "$ref": "#/components/schemas/ModelConfigurationView"
            },
            "type": "array",
            "title": "Model Configurations"
          },
          "vision_models": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Vision Models"
          }
        },
        "type": "object",
        "required": [
          "provider",
          "id",
          "model_configurations",
          "vision_models"
        ],
        "title": "VisionProviderResponse",
        "description": "Response model for vision providers endpoint, including vision-specific fields."
      },
      "VoiceOption": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "VoiceOption",
        "description": "Voice option returned by voice providers."
      },
      "VoiceProviderTestRequest": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id",
            "description": "Existing provider ID to use when testing stored credentials."
          },
          "provider_type": {
            "type": "string",
            "title": "Provider Type"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key",
            "description": "API key for testing. If not provided, use_stored_key must be true."
          },
          "use_stored_key": {
            "type": "boolean",
            "title": "Use Stored Key",
            "description": "If true, use the stored API key for this provider type.",
            "default": false
          },
          "api_secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Secret",
            "description": "API secret for testing providers that require one."
          },
          "use_stored_secret": {
            "type": "boolean",
            "title": "Use Stored Secret",
            "description": "If true, use the stored API secret for this provider type.",
            "default": false
          },
          "api_base": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Base"
          },
          "target_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Uri",
            "description": "Target URI for Azure Speech Services (maps to api_base)."
          },
          "custom_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Config"
          }
        },
        "type": "object",
        "required": [
          "provider_type"
        ],
        "title": "VoiceProviderTestRequest",
        "description": "Request model for testing a voice provider connection."
      },
      "VoiceProviderUpdateSuccess": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "default": "ok"
          }
        },
        "type": "object",
        "title": "VoiceProviderUpdateSuccess",
        "description": "Simple status response for voice provider actions."
      },
      "VoiceProviderUpsertRequest": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id",
            "description": "Existing provider ID to update."
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "provider_type": {
            "type": "string",
            "title": "Provider Type"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key",
            "description": "API key for the provider."
          },
          "api_key_changed": {
            "type": "boolean",
            "title": "Api Key Changed",
            "description": "Set to true when providing a new API key for an existing provider.",
            "default": false
          },
          "api_secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Secret",
            "description": "API secret for providers that require one."
          },
          "api_secret_changed": {
            "type": "boolean",
            "title": "Api Secret Changed",
            "description": "Set to true when providing a new API secret for an existing provider.",
            "default": false
          },
          "llm_provider_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Provider Id",
            "description": "If set, copies the API key from the specified LLM provider."
          },
          "api_base": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Base"
          },
          "target_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Uri",
            "description": "Target URI for Azure Speech Services (maps to api_base)."
          },
          "custom_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Config",
            "description": "Provider-specific config (e.g. Azure speech_region / stt_languages). None leaves the stored config unchanged; pass {} to clear."
          },
          "stt_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stt Model"
          },
          "tts_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tts Model"
          },
          "default_voice": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Voice"
          },
          "activate_stt": {
            "type": "boolean",
            "title": "Activate Stt",
            "description": "If true, sets this provider as the default STT provider after upsert.",
            "default": false
          },
          "activate_tts": {
            "type": "boolean",
            "title": "Activate Tts",
            "description": "If true, sets this provider as the default TTS provider after upsert.",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "name",
          "provider_type"
        ],
        "title": "VoiceProviderUpsertRequest",
        "description": "Request model for creating or updating a voice provider."
      },
      "VoiceProviderView": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "provider_type": {
            "type": "string",
            "title": "Provider Type"
          },
          "is_default_stt": {
            "type": "boolean",
            "title": "Is Default Stt"
          },
          "is_default_tts": {
            "type": "boolean",
            "title": "Is Default Tts"
          },
          "stt_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stt Model"
          },
          "tts_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tts Model"
          },
          "default_voice": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Voice"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key",
            "description": "Masked API key for display (e.g. 'sk-a...b1c2'). Non-null means a key is stored."
          },
          "api_secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Secret",
            "description": "Fixed placeholder for display. Non-null means a secret is stored."
          },
          "target_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Uri",
            "description": "Target URI for Azure Speech Services."
          },
          "custom_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Config",
            "description": "Provider-specific config (e.g. Azure speech_region / stt_languages)."
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "provider_type",
          "is_default_stt",
          "is_default_tts",
          "stt_model",
          "tts_model",
          "default_voice"
        ],
        "title": "VoiceProviderView",
        "description": "Response model for voice provider listing."
      },
      "VoiceSettingsUpdateRequest": {
        "properties": {
          "auto_send": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Send"
          },
          "auto_playback": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Playback"
          },
          "playback_speed": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2.0,
                "minimum": 0.5
              },
              {
                "type": "null"
              }
            ],
            "title": "Playback Speed"
          }
        },
        "type": "object",
        "title": "VoiceSettingsUpdateRequest"
      },
      "VoiceStatusResponse": {
        "properties": {
          "stt_enabled": {
            "type": "boolean",
            "title": "Stt Enabled"
          },
          "tts_enabled": {
            "type": "boolean",
            "title": "Tts Enabled"
          }
        },
        "type": "object",
        "required": [
          "stt_enabled",
          "tts_enabled"
        ],
        "title": "VoiceStatusResponse"
      },
      "WSTokenResponse": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          }
        },
        "type": "object",
        "required": [
          "token"
        ],
        "title": "WSTokenResponse"
      },
      "WebContentProviderConfig": {
        "properties": {
          "timeout_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timeout Seconds"
          },
          "base_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Url"
          }
        },
        "type": "object",
        "title": "WebContentProviderConfig"
      },
      "WebContentProviderTestRequest": {
        "properties": {
          "provider_type": {
            "$ref": "#/components/schemas/WebContentProviderType"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key",
            "description": "API key for testing. If not provided, use_stored_key must be true."
          },
          "use_stored_key": {
            "type": "boolean",
            "title": "Use Stored Key",
            "description": "If true, use the stored API key for this provider type instead of api_key.",
            "default": false
          },
          "config": {
            "$ref": "#/components/schemas/WebContentProviderConfig"
          }
        },
        "type": "object",
        "required": [
          "provider_type",
          "config"
        ],
        "title": "WebContentProviderTestRequest"
      },
      "WebContentProviderType": {
        "type": "string",
        "enum": [
          "onyx_web_crawler",
          "firecrawl",
          "exa",
          "tavily"
        ],
        "title": "WebContentProviderType"
      },
      "WebContentProviderUpsertRequest": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "provider_type": {
            "$ref": "#/components/schemas/WebContentProviderType"
          },
          "config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebContentProviderConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "api_key_changed": {
            "type": "boolean",
            "title": "Api Key Changed",
            "default": false
          },
          "activate": {
            "type": "boolean",
            "title": "Activate",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "name",
          "provider_type"
        ],
        "title": "WebContentProviderUpsertRequest"
      },
      "WebContentProviderView": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "provider_type": {
            "$ref": "#/components/schemas/WebContentProviderType"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active"
          },
          "config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebContentProviderConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "masked_api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Masked Api Key"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "provider_type",
          "is_active",
          "config"
        ],
        "title": "WebContentProviderView"
      },
      "WebSearchProviderTestRequest": {
        "properties": {
          "provider_type": {
            "$ref": "#/components/schemas/WebSearchProviderType"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key",
            "description": "API key for testing. If not provided, use_stored_key must be true."
          },
          "use_stored_key": {
            "type": "boolean",
            "title": "Use Stored Key",
            "description": "If true, use the stored API key for this provider type instead of api_key.",
            "default": false
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          }
        },
        "type": "object",
        "required": [
          "provider_type"
        ],
        "title": "WebSearchProviderTestRequest"
      },
      "WebSearchProviderType": {
        "type": "string",
        "enum": [
          "google_pse",
          "serper",
          "exa",
          "searxng",
          "brave",
          "tavily"
        ],
        "title": "WebSearchProviderType"
      },
      "WebSearchProviderUpsertRequest": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id",
            "description": "Existing provider ID to update."
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "provider_type": {
            "$ref": "#/components/schemas/WebSearchProviderType"
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key",
            "description": "API key for the provider. Only required when creating or updating credentials."
          },
          "api_key_changed": {
            "type": "boolean",
            "title": "Api Key Changed",
            "description": "Set to true when providing a new API key for an existing provider.",
            "default": false
          },
          "activate": {
            "type": "boolean",
            "title": "Activate",
            "description": "If true, sets this provider as the active one after upsert.",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "name",
          "provider_type"
        ],
        "title": "WebSearchProviderUpsertRequest"
      },
      "WebSearchProviderView": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "provider_type": {
            "$ref": "#/components/schemas/WebSearchProviderType"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active"
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "masked_api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Masked Api Key",
            "description": "Masked API key for display (e.g. 'sk-a...z456'). None means no key stored."
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "provider_type",
          "is_active",
          "config"
        ],
        "title": "WebSearchProviderView"
      },
      "WebSearchToolRequest": {
        "properties": {
          "queries": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Queries",
            "description": "List of search queries to send to the configured provider."
          },
          "max_results": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Results",
            "description": "Optional cap on number of results to return per query. Defaults to 10.",
            "default": 10
          }
        },
        "type": "object",
        "required": [
          "queries"
        ],
        "title": "WebSearchToolRequest"
      },
      "WebSearchToolResponse": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/LlmWebSearchResult"
            },
            "type": "array",
            "title": "Results"
          },
          "provider_type": {
            "$ref": "#/components/schemas/WebSearchProviderType"
          }
        },
        "type": "object",
        "required": [
          "results",
          "provider_type"
        ],
        "title": "WebSearchToolResponse"
      },
      "WebSearchWithContentResponse": {
        "properties": {
          "search_provider_type": {
            "$ref": "#/components/schemas/WebSearchProviderType"
          },
          "content_provider_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebContentProviderType"
              },
              {
                "type": "null"
              }
            ]
          },
          "search_results": {
            "items": {
              "$ref": "#/components/schemas/LlmWebSearchResult"
            },
            "type": "array",
            "title": "Search Results"
          },
          "full_content_results": {
            "items": {
              "$ref": "#/components/schemas/LlmOpenUrlResult"
            },
            "type": "array",
            "title": "Full Content Results"
          }
        },
        "type": "object",
        "required": [
          "search_provider_type",
          "search_results",
          "full_content_results"
        ],
        "title": "WebSearchWithContentResponse"
      },
      "WebappInfo": {
        "properties": {
          "has_webapp": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Has Webapp"
          },
          "webapp_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webapp Url"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "ready": {
            "type": "boolean",
            "title": "Ready"
          },
          "sharing_scope": {
            "$ref": "#/components/schemas/SharingScope"
          }
        },
        "type": "object",
        "required": [
          "has_webapp",
          "webapp_url",
          "status",
          "ready",
          "sharing_scope"
        ],
        "title": "WebappInfo"
      },
      "WellKnownLLMProviderDescriptor": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "known_models": {
            "items": {
              "$ref": "#/components/schemas/ModelConfigurationView"
            },
            "type": "array",
            "title": "Known Models"
          },
          "recommended_default_model": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleKnownModel"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "WellKnownLLMProviderDescriptor"
      },
      "onyx__server__features__build__external_apps__models__OAuthCallbackResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "external_app_id": {
            "type": "integer",
            "title": "External App Id"
          }
        },
        "type": "object",
        "required": [
          "success",
          "external_app_id"
        ],
        "title": "OAuthCallbackResponse"
      },
      "onyx__server__features__build__models__UploadResponse": {
        "properties": {
          "filename": {
            "type": "string",
            "title": "Filename"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "size_bytes": {
            "type": "integer",
            "title": "Size Bytes"
          }
        },
        "type": "object",
        "required": [
          "filename",
          "path",
          "size_bytes"
        ],
        "title": "UploadResponse",
        "description": "Response after successful file upload."
      },
      "onyx__server__features__build__user_library__api__UploadResponse": {
        "properties": {
          "entries": {
            "items": {
              "$ref": "#/components/schemas/LibraryEntryResponse"
            },
            "type": "array",
            "title": "Entries"
          },
          "total_uploaded": {
            "type": "integer",
            "title": "Total Uploaded"
          },
          "total_size_bytes": {
            "type": "integer",
            "title": "Total Size Bytes"
          }
        },
        "type": "object",
        "required": [
          "entries",
          "total_uploaded",
          "total_size_bytes"
        ],
        "title": "UploadResponse"
      },
      "onyx__server__features__oauth_config__models__OAuthCallbackResponse": {
        "properties": {
          "redirect_url": {
            "type": "string",
            "title": "Redirect Url"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "redirect_url"
        ],
        "title": "OAuthCallbackResponse"
      }
    },
    "securitySchemes": {
      "APIKeyCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "fastapiusersauth"
      },
      "OAuth2PasswordBearer": {
        "type": "oauth2",
        "flows": {
          "password": {
            "scopes": {},
            "tokenUrl": "auth/mobile/login"
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://school.narb.cc/api",
      "description": "School workspace"
    },
    {
      "url": "https://l.narb.cc/api",
      "description": "Personal workspace; school routes are unavailable"
    }
  ]
}