File tree Expand file tree Collapse file tree
src/agents/pi-embedded-helpers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,10 +185,11 @@ function createOpenAIResponsesToolCallIdResolver(): {
185185}
186186
187187/**
188- * OpenAI Responses validates replayed `function_call.call_id`,
189- * `function_call.id`, and matching `function_call_output.call_id` values.
190- * Keep canonical ids unchanged, but deterministically rewrite overlong or
191- * malformed persisted ids before pi-ai splits `call_id|fc_id` pairs.
188+ * OpenAI Responses rejects replayed `function_call.call_id`,
189+ * `function_call.id`, and matching `function_call_output.call_id` values
190+ * that exceed its 64-char `call_*` / `fc_*` shape. pi-ai skips its own
191+ * normalizer for same-model replay, then splits persisted `call_id|fc_id`
192+ * pairs directly into the provider payload, so OpenClaw must normalize here.
192193 */
193194export function normalizeOpenAIResponsesToolCallIds ( messages : AgentMessage [ ] ) : AgentMessage [ ] {
194195 let changed = false ;
You can’t perform that action at this time.
0 commit comments