fix(anthropic): replace guard with truthiness check to prevent NOT_G…#4236
fix(anthropic): replace guard with truthiness check to prevent NOT_G…#4236nidhithippana wants to merge 1 commit into
Conversation
…VEN sentinel leak
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
📝 WalkthroughWalkthroughFixes a bug where omitting ChangesNOT_GIVEN Sentinel Leak Fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Fixes #4230
When
toolsis omitted from amessages.create()call, the Anthropic SDKdefaults it to
NOT_GIVEN. The previousis not Noneguard let this sentinelthrough into the log body, causing OTLP export to fail with:
Changed the guard to a truthiness check (consistent with the existing
systembranch above it), which correctly drops both
NOT_GIVENand empty lists.Added a regression test to verify no sentinel leaks into emitted log bodies.
feat(instrumentation): ...orfix(instrumentation): ....Summary by CodeRabbit
Release Notes
Bug Fixes
Tests