fix(agents): harden tool transcript repair

This commit is contained in:
Peter Steinberger
2026-01-10 21:45:10 +00:00
parent 805a29252e
commit 98377c7c6b
4 changed files with 73 additions and 4 deletions

View File

@@ -338,6 +338,11 @@ describeLive("gateway live (dev agent, profile keys)", () => {
key: sessionKey,
model: modelKey,
});
// Reset between models: avoids cross-provider transcript incompatibilities
// (notably OpenAI Responses requiring reasoning replay for function_call items).
await client.request<Record<string, unknown>>("sessions.reset", {
key: sessionKey,
});
// “Meaningful” direct prompt (no tools).
const runId = randomUUID();