Temporary Chats, Model Updates, and UI Overhaul#187
Open
tanishq-sa wants to merge 20 commits intokarpathy:masterfrom
Open
Temporary Chats, Model Updates, and UI Overhaul#187tanishq-sa wants to merge 20 commits intokarpathy:masterfrom
tanishq-sa wants to merge 20 commits intokarpathy:masterfrom
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
CHAIRMAN_MODEL→stepfun/step-3.5-flasharcee-ai/trinity-large-previewfor conversation title generationopenrouter.aihttpx.HTTPStatusErrorTemporary Conversations
isTemporarythrough create / list / save flowsFrontend
UI / Theme Overhaul
Features
API Integration
UX Improvements
Result