API-GET-v1-chat-sessions

abstract

Returns all ChatSession rows ordered by created_at descending (newest first). Called by AppSidebar on mount to populate the session list and reconcile the Zustand store cache.


🔒 Authentication

None.


🛠️ Technical Specification

Request

PropertyValue
MethodGET
Path/api/v1/chat/sessions
Tags["Chat"]

Logic Flow

📤 Responses

StatusBodyCondition
200 OKChatSession[] (array, may be empty)Always succeeds

Each ChatSession: { id, title, provider, model_name, created_at, updated_at }.

RoleFile
Routerbackend/app/api/v1/chat.py
DB modelbackend/app/models/chat.py :: ChatSession
UI consumerfrontend/src/components/app-sidebar.tsxuseChatStore.setSessions()

RoleLink
Create sessionAPI-POST-v1-chat-sessions
DB tableDB - chatsession
Zustand storeStore - ChatStore