mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-06 23:45:57 +00:00
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
|
||
|---|---|---|
| .. | ||
| .generated | ||
| .i18n | ||
| announcements | ||
| assets | ||
| automation | ||
| channels | ||
| clawhub | ||
| cli | ||
| concepts | ||
| debug | ||
| diagnostics | ||
| gateway | ||
| help | ||
| images | ||
| install | ||
| nodes | ||
| plan | ||
| platforms | ||
| plugins | ||
| providers | ||
| refactor | ||
| reference | ||
| security | ||
| snippets/plugin-publish | ||
| start | ||
| superpowers/specs | ||
| tools | ||
| web | ||
| AGENTS.md | ||
| auth-credential-semantics.md | ||
| brave-search.md | ||
| ci.md | ||
| CLAUDE.md | ||
| date-time.md | ||
| docs.json | ||
| index.md | ||
| logging.md | ||
| nav-tabs-underline.js | ||
| network.md | ||
| perplexity.md | ||
| pi-dev.md | ||
| pi.md | ||
| prose.md | ||
| style.css | ||
| tts.md | ||
| vps.md | ||
| whatsapp-openclaw.jpg | ||