pub async fn generate_title(
__arg0: State<UnifiedAppState>,
__arg1: Json<GenerateTitleRequest>,
) -> Result<Json<GenerateTitleResponse>, (StatusCode, Json<ErrorResponse>)>Expand description
Generate a concise chat title (1-5 words) from a user prompt.
- Offline mode (no
api_key/model_id): uses the local LLM worker directly. - Online mode (
api_key+model_idpresent): proxies to OpenRouter on behalf of the frontend. The frontend must NOT call OpenRouter directly — Tauri’s CSP blocks externalconnect-srcorigins from the WebView.