fix(ai): use valid synthetic Responses message ids closes #5148

This commit is contained in:
Mario Zechner
2026-05-28 23:13:15 +02:00
parent 3f1ce9b6e9
commit d1fb34bc8d
2 changed files with 2 additions and 2 deletions

View File

@@ -178,7 +178,7 @@ export function convertResponsesMessages<TApi extends Api>(
const textBlock = block as TextContent;
const parsedSignature = parseTextSignature(textBlock.textSignature);
const fallbackMessageId =
textBlockIndex === 0 ? `pi_msg_${msgIndex}` : `pi_msg_${msgIndex}_${textBlockIndex}`;
textBlockIndex === 0 ? `msg_pi_${msgIndex}` : `msg_pi_${msgIndex}_${textBlockIndex}`;
textBlockIndex++;
// OpenAI requires id to be max 64 characters
let msgId = parsedSignature?.id;