Wrapper previously passed only the last user message to a fresh 'kimi -p' per request, so both the OpenWebUI thread history and kimi's own session state were dropped every turn. Now each conversation is keyed by a content-hash chain over the messages array (survives LiteLLM in between) and mapped to a persistent kimi session resumed via 'kimi -r <id>', with the session_id captured from stream-json meta. Each conversation also gets its own working dir under /workspace/conversations/<id> so file state is isolated and persists across turns. Map persisted to /workspace/.kimi-agent/sessions.json (LRU-capped); falls back to full-transcript reseed if a mapping is missing.
7.7 KiB
7.7 KiB