Skip to content

Claude/optimize council analysis cjdyl#183

Open
amoxuanque wants to merge 16 commits intokarpathy:masterfrom
amoxuanque:claude/optimize-council-analysis-cjdyl
Open

Claude/optimize council analysis cjdyl#183
amoxuanque wants to merge 16 commits intokarpathy:masterfrom
amoxuanque:claude/optimize-council-analysis-cjdyl

Conversation

@amoxuanque
Copy link
Copy Markdown

No description provided.

amoxuanque and others added 16 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
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
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.

2 participants