mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-07 07:56:55 +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
|
||
|---|---|---|
| .. | ||
| templates | ||
| AGENTS.default.md | ||
| api-usage-costs.md | ||
| application-modernization-plan.md | ||
| code-mode.md | ||
| credits.md | ||
| device-models.md | ||
| full-release-validation.md | ||
| memory-config.md | ||
| openclaw-sdk-api-design.md | ||
| prompt-caching.md | ||
| RELEASING.md | ||
| rich-output-protocol.md | ||
| rpc.md | ||
| secret-placeholder-conventions.md | ||
| secretref-credential-surface.md | ||
| secretref-user-supplied-credentials-matrix.json | ||
| session-management-compaction.md | ||
| test.md | ||
| token-use.md | ||
| transcript-hygiene.md | ||
| wizard.md | ||