#7819: Fix: clamp OpenAI Responses function_call item IDs
stale
Cluster:
OpenAI Model Fixes and Updates
## Summary
- add pnpm patch for @mariozechner/pi-ai to normalize/cap OpenAI Responses function_call item IDs
- ensure item IDs are sanitized, prefixed with fc_, and capped at 64 chars
## Testing
- not run (pnpm install requires network access in this environment)
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a pnpm `patchedDependencies` entry to apply a local patch to `@mariozechner/pi-ai@0.51.0`. The patch modifies `dist/providers/openai-responses.js` to sanitize and cap OpenAI Responses tool-call `itemId` values by replacing invalid characters, ensuring an `fc_` prefix, and enforcing a 64-character limit (hashing and then slicing as needed). This fits into the repo by hardening the provider-layer message conversion so downstream OpenAI Responses validation doesn’t reject oversized/invalid function_call item IDs.
<h3>Confidence Score: 4/5</h3>
- This PR is likely safe to merge; it’s a targeted dependency patch with low blast radius.
- Changes are limited to adding a pnpm patch and applying ID normalization in one provider conversion path. Main risks are subtle ID-format edge cases (e.g., overly broad prefix detection and potential re-hashing behavior), but there are no invasive codebase changes or new external surfaces.
- patches/@mariozechner__pi-ai@0.51.0.patch
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#16100: fix: convert unsigned thinking blocks to text to prevent signature ...
by claw-sylphx · 2026-02-14
75.8%
#19094: Fix empty tool_call_id and function names in provider transcript pa...
by yxshee · 2026-02-17
73.4%
#11048: fix: address repository issues (env, author, CI comments, security ...
by cavula · 2026-02-07
73.2%
#8988: fix: resolve security vulnerabilities in dependencies
by fotorpics · 2026-02-04
73.2%
#12812: fix(transcript-policy): sanitize tool call IDs for all non-OpenAI p...
by justin-nevins · 2026-02-09
73.1%
#4445: fix: resolve Antigravity "unsupported version" and tool_use schema ...
by harry2690 · 2026-01-30
73.0%
#17237: fix(update): guard post-install imports after npm global update
by tdjackey · 2026-02-15
73.0%
#9212: fix: ensure model.input is always an array for custom providers
by sparck75 · 2026-02-05
73.0%
#4534: fix: packaging and OpenAI vision format conversion
by SalimBinYousuf1 · 2026-01-30
72.5%
#4057: fix: sanitize tool call IDs for Azure OpenAI
by wangchuan3533 · 2026-01-29
72.4%