← Back to PRs

#7819: Fix: clamp OpenAI Responses function_call item IDs

by LeLe1110 open 2026-02-03 07:14 View on GitHub →
stale
## 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