From 0aa3a8d6b4e24dccca0bacdcd17af38db47a0221 Mon Sep 17 00:00:00 2001 From: Jamie Pine Date: Sat, 25 Apr 2026 01:21:21 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20PR=20review=20nits=20=E2=80=94=20respons?= =?UTF-8?q?e=20shape,=20landing=20copy,=20form=20reset?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /llm/generate's "model is downloading" branch was raising HTTPException(202, detail={...}), which wraps the payload in {"detail": ...} and forces clients to parse a success status as if it were an error. Switched to JSONResponse so the payload sits at the top level. - The landing page's "Language Models" card advertised "Qwen 3.5" with sizes 4B/2B/0.8B; we ship Qwen3 at 0.6B/1.7B/4B. Aligned to what's actually in the binary. - ProfileForm's discard-draft button reset the form without touching `personality` or `avatarFile`, so stale persona text and an attached avatar would survive the discard. The other three resets in the file already include both fields — this brings the discard path in line. --- app/src/components/VoiceProfiles/ProfileForm.tsx | 2 ++ backend/routes/llm.py | 5 +++-- landing/src/components/SupportedModels.tsx | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/src/components/VoiceProfiles/ProfileForm.tsx b/app/src/components/VoiceProfiles/ProfileForm.tsx index 6eb03e7f..7ef4651c 100644 --- a/app/src/components/VoiceProfiles/ProfileForm.tsx +++ b/app/src/components/VoiceProfiles/ProfileForm.tsx @@ -828,8 +828,10 @@ export function ProfileForm() { name: '', description: '', language: 'en', + personality: '', sampleFile: undefined, referenceText: '', + avatarFile: undefined, }); setSampleMode('record'); }} diff --git a/backend/routes/llm.py b/backend/routes/llm.py index 53d84d0a..36f4c174 100644 --- a/backend/routes/llm.py +++ b/backend/routes/llm.py @@ -1,6 +1,7 @@ """LLM inference endpoints.""" from fastapi import APIRouter, HTTPException +from fastapi.responses import JSONResponse from .. import models from ..backends import get_llm_model_configs @@ -39,9 +40,9 @@ async def llm_generate(request: models.LLMGenerateRequest): task_manager.start_download(progress_model_name) create_background_task(download_llm_background()) - raise HTTPException( + return JSONResponse( status_code=202, - detail={ + content={ "message": f"Qwen3 {model_size} is being downloaded. Please wait and try again.", "model_name": progress_model_name, "downloading": True, diff --git a/landing/src/components/SupportedModels.tsx b/landing/src/components/SupportedModels.tsx index 6774956b..aff25cea 100644 --- a/landing/src/components/SupportedModels.tsx +++ b/landing/src/components/SupportedModels.tsx @@ -138,9 +138,9 @@ const MODEL_GROUPS: ModelGroup[] = [ subtitle: 'Transcript refinement, persona replies, and on-device reasoning.', models: [ { - name: 'Qwen 3.5', + name: 'Qwen3', author: 'Alibaba', - sizes: ['4B', '2B', '0.8B'], + sizes: ['4B', '1.7B', '0.6B'], description: 'Powers transcript cleanup, persona voice replies, and the voice I/O loop. Shares its runtime with the TTS/STT stack — one model cache, one GPU story.', tags: [