Skip to content

v0.4.0

Latest

Choose a tag to compare

@www222fff www222fff released this 01 Nov 04:15

v0.4.0 — Stateless by default, warm thread pool

Chat correctness

  • Stateless chat by default: anonymous requests open a new thread with the
    full history and keep nothing afterwards — threads can never be shared
    across clients.
  • Thread reuse is now scoped by API key: the conversation key is
    <key_id>:<user>, so two keys sending the same user never share a thread.
  • Only a non-empty user continues a thread.

Speed

  • Warm thread pool (MUSE2API_WARM_THREADS, 2 per account by default): a new
    thread answers its first message in ~5s instead of 20-40s; warming runs in
    parallel and failed rounds are retried after 60s.
  • New threads open through the page router (1-4s) instead of a full reload.
  • Session keepalive is on by default every 600s, so the VM stays awake.

Fixes

  • hatch_gw / hatch_vml are now optional session cookies; __Host-
    cookies are injected by URL instead of domain (PR #5).
  • Blank MUSE2API_BROWSER_PROFILE_DIR is treated as unset.
  • Tabs survive session renewal (rotated cookies are written into the open
    browser context).

Notes

  • Default is now 4 tabs per account. Load test: one account is one muse.ai
    VM — 3 parallel chats take ~20s, 10 parallel take 33-95s. Serve more
    people with more accounts, not more tabs.
  • 173 tests passing.