fix(llm): mask api_key in BaseLLM.__repr__#6270
Conversation
There was a problem hiding this comment.
Summary: This PR adds a custom BaseLLM.__repr__ that masks the api_key field before rendering LLM objects.
Risk: Low risk. The change reduces accidental credential exposure in debug output and does not introduce new authentication, authorization, data-handling, or externally reachable attack surfaces; no exploitable security vulnerabilities were identified.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds a ChangesBaseLLM string representation
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
3ede8ae to
00a4869
Compare
Prevent API key exposure in logs and debug output when LLM objects are printed or logged.
00a4869 to
56dda1f
Compare
Prevent API key exposure in logs and debug output when LLM objects are printed or logged.
Summary by CodeRabbit
repr()output to prevent accidental exposure.repr()results.