You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: implement multi-turn conversation session reuse across providers
Previously, every chat request created a new upstream session because
providerSessionId (populated by each adapter) was never consumed by the
session manager or routes. This broke multi-turn conversation for all
providers.
Changes:
- sessionManager: add computeHistoryHash, 3-tier session lookup (hash
match → active session → new), and updateProviderSession method
- DeepSeek/Kimi/QwenAI adapters: accept and reuse existing session IDs
instead of always creating new upstream sessions
- forwarder: pass providerSessionId/parentMessageId to adapter calls
- routes/chat: integrate sessionManager into request flow — create
sessions before forwarding, update after response
- Tests: 27 unit tests covering hash computation, session lifecycle,
and multi-turn flow simulation
Closes#86
Co-Authored-By: deepseek-v4-pro <noreply@deepseek.com>
0 commit comments