fix(openai): avoid invalid reasoning replay

This commit is contained in:
Peter Steinberger
2026-01-10 00:45:10 +00:00
parent 626b085c85
commit cb10682d3e
8 changed files with 495 additions and 6 deletions

View File

@@ -4,6 +4,7 @@ import {
loadSessionStore,
resolveStorePath,
saveSessionStore,
type SessionEntry,
} from "../../config/sessions.js";
import {
parseAgentSessionKey,
@@ -35,7 +36,7 @@ export function setAbortMemory(key: string, value: boolean): void {
}
function resolveSessionEntryForKey(
store: Record<string, { sessionId: string; updatedAt: number }> | undefined,
store: Record<string, SessionEntry> | undefined,
sessionKey: string | undefined,
) {
if (!store || !sessionKey) return {};