fix(adapters): retain late chat tool-call index aliases - #3673
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe OpenAI Chat adapter now retains index aliases for streamed tool calls. Tests cover late indexes, index-only fragments, conflicting or duplicate IDs, and argument-budget limits. Documentation describes the identity-preservation behavior. ChangesOpenAI Chat tool-call identity
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The OpenAI Chat adapter now correctly assembles streamed tool calls when IDs and indexes arrive in different fragments, with regression coverage for parallel calls and budget limits. No merge-blocking risk is identified. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Review readiness checklist
2/4 boxes ticked. This PR stays in draft until every box above is ticked. Hygiene✅ Deterministic PR hygiene checks passed. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
리뷰 · 우선순위 68 / 80이 PR은 Chat Completions 스트림에서 도구 호출이 먼저 ID만, 다음에 ID+index, 그다음 index만 있는 argument 조각으로 이어질 때, 마지막 조각이 이름 없는 두 번째 호출을 만들어 JSON이 쪼개지던 버그를 고칩니다. 지금 테스트가 “index만으로 서로 다른 unindexed 두 호출을 추측하지 않는다”, “충돌 ID에서 index가 이긴다”, “중복 ID first-match”, “늦은 index에서도 argument byte limit”까지 넓혀서, 별칭 추가가 예전의 보수적 실패 모드를 무너뜨리지 않는지 잘 막아 두었습니다. types/config 분할과 무관합니다.
메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Summary
Verification
bun test tests/adapters/openai/openai-chat-parallel-stream.test.ts tests/adapters/openai/openai-chat-hardening.test.ts tests/adapters/openai/openai-chat-eof.test.ts— 124 passed, 0 failed. Coverage includes interleaved calls, ambiguous missing associations, existing ID/index collision behavior, stable budget ownership, and byte-limit boundaries.bun run typecheck— passed on the final head.cd docs-site && bun run build— passed, 425 pages.bun run privacy:scan— passed.bun run test:changedon final headc8240c51d— 6,152 passed, 4 skipped, 0 failed across 334 files.Checklist
Review readiness
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.