AI/Contracts and Core/Models/{ThreadModels,VoteModels,SystemSettingModels}.cs and serialize as camelCase. Admin DTOs live in Core/Models/{AdminModels,ProviderModels}.cs and carry explicit snake_case [JsonProperty] names that match the columns, so the admin API speaks the database’s names.
Public DTOs
- ChatRequest
- ChatResponse
- Threads
- Votes and stats
Used by
chat, chat/stream and dualchat: in C# all three bind the same class. The OpenAPI spec splits it into ChatRequest (single chat) and BattleRequest (battles) so each endpoint only shows the fields it reads.Admin DTOs
ApiResponse<T> wraps every admin response: success, data, error, message, total, page, pageSize and page_size.
AdminFieldRules holds the allowed values the controllers validate: roles admin and user; model statuses active, inactive and maintenance; visibilities private, unlisted and public.