Files
openclaw/docs
Yuval Dinodia ef77428c95 fix(openai): normalize responses replay tool ids
Fixes #74665.

Normalize replayed OpenAI Responses tool call identifiers before same-model pi-ai replay sends them back to the provider. This keeps canonical `call_*|fc_*` pairs intact when valid, rewrites overlong or malformed `function_call.call_id`, `function_call.id`, and matching `function_call_output.call_id` values into OpenAI's accepted 64-character shape, and preserves the reasoning replay path.

Verification:
- Live OpenAI E2E with maintainer key: raw replay payload failed with HTTP 400 for overlong `input[1].id`; normalized replay succeeded with HTTP 200 and `LIVE_OK`.
- `pnpm exec oxfmt --check --threads=1 src/agents/pi-embedded-helpers/openai.ts`
- `CI=1 OPENCLAW_VITEST_FS_MODULE_CACHE_PATH="$(mktemp -d /tmp/openclaw-vitest-cache.XXXXXX)" fnm exec --using 24.15.0 -- pnpm test src/agents/pi-embedded-runner/run/attempt.tool-call-normalization.test.ts -- --run --reporter=verbose --maxWorkers=1`
- `CI=1 OPENCLAW_VITEST_FS_MODULE_CACHE_PATH="$(mktemp -d /tmp/openclaw-vitest-cache.XXXXXX)" fnm exec --using 24.15.0 -- pnpm test src/agents/pi-embedded-runner.openai-tool-id-preservation.test.ts src/agents/openai-responses.reasoning-replay.test.ts -- --run --reporter=verbose --maxWorkers=2`
- `autoreview --mode branch --base origin/main`: clean, no accepted/actionable findings.
- GitHub CI green on c675b35ade.

Co-authored-by: Yuval Dinodia <yetvald@gmail.com>
2026-05-27 13:51:57 +01:00
..
2026-05-23 11:58:29 +01:00
2026-05-22 22:58:27 +01:00
2026-05-08 06:01:23 +01:00
2026-05-18 06:22:36 +01:00