Skip to content

Temporary Chats, Model Updates, and UI Overhaul#187

Open
tanishq-sa wants to merge 20 commits intokarpathy:masterfrom
tanishq-sa:master
Open

Temporary Chats, Model Updates, and UI Overhaul#187
tanishq-sa wants to merge 20 commits intokarpathy:masterfrom
tanishq-sa:master

Conversation

@tanishq-sa
Copy link
Copy Markdown

Summary

Introduces temporary (incognito) conversations, updates the LLM orchestration stack, and delivers a frontend UI refresh.
Also improves reliability through better error handling and stricter response control across OpenRouter integrations.


Key Changes

Backend

  • Switch CHAIRMAN_MODELstepfun/step-3.5-flash
  • Add arcee-ai/trinity-large-preview for conversation title generation
  • Update OpenRouter endpoint → openrouter.ai
  • Convert imports to package-relative paths
  • Enforce English responses via system instruction
  • Add error placeholders when council models fail
  • Catch and log httpx.HTTPStatusError
  • Add 2s delay before title generation to avoid rate-limit issues

Temporary Conversations

  • Add support for temporary (in-memory) chats
  • Temporary conversations are not persisted to storage
  • Propagate isTemporary through create / list / save flows
  • Add new endpoint:
DELETE /api/conversations/{id}

Frontend

UI / Theme Overhaul

  • New fonts
  • CSS variable-based theming
  • Gradients and shadows

Features

  • Translate UI copy to English
  • Add Temporary Chat button
  • Add Delete Conversation action

API Integration

  • createConversation(isTemporary)
  • deleteConversation()

UX Improvements

  • Smoother scrolling
  • Improved animations
  • Refined input styling
  • Improved stage component behavior

Result

  • Adds incognito-style temporary chats
  • Improves model orchestration reliability
  • Modernizes UI and UX
  • Cleans up backend architecture

amoxuanque and others added 20 commits January 27, 2026 19:27
…tter Stage 3 synthesis

- openrouter.py: Replace per-request httpx client with shared client pool
  (max 20 connections, 10 keepalive) to reduce TCP overhead; add close_client()
  for clean shutdown via FastAPI lifespan

- council.py: Fix calculate_aggregate_rankings to reuse already-parsed
  parsed_ranking instead of re-parsing ranking text redundantly

- council.py: Pass aggregate_rankings to stage3_synthesize_final so the
  chairman's prompt includes peer consensus rankings (avg position per model),
  enabling more informed synthesis of the final answer

- main.py: In non-streaming endpoint, run generate_conversation_title in
  parallel with run_full_council via asyncio.create_task (first message only),
  eliminating sequential blocking on title generation

- main.py: Thread aggregate_rankings through streaming endpoint Stage 3 call;
  register lifespan handler to close shared httpx client on shutdown

https://claude.ai/code/session_01PKj84yz4jrbL42qkwEkWLP
Replace all hardcoded English strings in frontend components with Chinese:
- ChatInterface: welcome/empty state, message labels (你/LLM 议会),
  stage loading indicators, placeholder, send button
- Stage1: section title
- Stage2: section title, raw evaluations header, description,
  extracted ranking label, aggregate rankings (综合排名/均分/票)
- Stage3: section title, chairman label
- Sidebar: app title, new conversation button, empty state, message count

https://claude.ai/code/session_01PKj84yz4jrbL42qkwEkWLP
- zbpack.json (root): backend build/start commands for Python/uv service
- frontend/zbpack.json: frontend build config with Vite output dir
- backend/main.py: read PORT from environment variable (Zeabur injects PORT
  automatically), fallback to 8001 for local development

https://claude.ai/code/session_01PKj84yz4jrbL42qkwEkWLP
…il-analysis-cjdyl

Claude/optimize council analysis cjdyl
Both evaluation prompts are now in Chinese so models respond
in Chinese. FINAL RANKING format kept in English for reliable parsing.

https://claude.ai/code/session_01PKj84yz4jrbL42qkwEkWLP
…il-analysis-cjdyl

Localize Stage 2 and Stage 3 prompts to Chinese
Backend: switch to new council models and chairman model; update OpenRouter endpoint to openrouter.ai; convert imports to package-relative; use arcee-ai/trinity-large-preview for title generation. Add support for temporary (in-memory/incognito) conversations in storage, save/load behavior, and a DELETE /api/conversations/{id} endpoint. Update prompts to English and adjust orchestration to use updated models. Frontend: UI/theme overhaul (fonts, CSS variables, gradients, shadows), translate UI copy to English, add Temporary Chat button and delete action, wire up createConversation(isTemporary) and deleteConversation APIs, and improve stage components styling and behaviors. Misc: various UX tweaks (smooth scrolling, animations, input styling) and plumbing to propagate temporary flag through create/list/save flows.
Switch the chairman model and harden request/response handling: change CHAIRMAN_MODEL to stepfun/step-3.5-flash; ensure models reply in English by prepending a system instruction in openrouter.query_model and appending an English request in council.stage1_collect_responses; inject a clear error placeholder into stage1 results for models that fail to respond; catch and log httpx.HTTPStatusError in openrouter.query_model; and add a short (2s) delay before generating conversation titles to avoid free-tier concurrent rate-limit issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants