OpenAI's API requires tool_call IDs to be <= 40 characters, but Clawdbot
was not enforcing this limit for OpenAI providers after commit 870bfa94e.
Changes:
- Re-enable tool call ID sanitization for OpenAI in transcript-policy.ts
- The sanitization preserves tool_use/tool_result pairing via stable mapping
- Add test case for 439-char ID (similar to reported 438-char issue)
- Update test expectations to reflect OpenAI now gets sanitized IDs
Root cause: Commit 870bfa94e disabled sanitization to "preserve Pi pairing",
but the sanitization logic already preserves pairing correctly via the
resolve() function in tool-call-id.ts.
Fixesopenclaw/openclaw#4718
* Agent: exclude google-antigravity from history downgrade hack
* Lint: fix formatting in test
* Lint: formatting and unused vars in test
* fix: preserve google-antigravity tool calls (#894) (thanks @mukhtharcm)
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>