RepoAudit
RepoAudit copied to clipboard
refactor: upgrade Gemini SDK, improve logging, and update Tree-sitter bindings
This pull request introduces several improvements and refactors to the codebase, focusing on updating integrations with third-party LLM APIs (especially Google's Gemini), improving logging and error handling, and modernizing the way Tree-sitter language libraries are loaded. The changes enhance compatibility, robustness, and observability across key modules.
LLM Integration and Logging Improvements:
- Refactored Gemini API integration in
LLM_utils.pyto use the latestgoogle-genaiSDK, updated safety settings, improved model selection logic, and enhanced error/log reporting for better observability. - Improved logging for DeepSeek and Claude model inference calls to provide clearer runtime feedback.
Tree-sitter Language Loading Modernization:
- Updated
TS_analyzer.pyto usectypesfor loading Tree-sitter language libraries, avoiding deprecation warnings and improving compatibility with Tree-sitter 0.21.x; includes a fallback to the deprecated method for stability. - Added
ctypesimport toTS_analyzer.pyto support the new loading mechanism.
Minor Dependency and Import Cleanups:
- Cleaned up unused imports in
build.pyand adjusted the import style fortree_sitter'sLanguage.
These changes collectively improve maintainability, API compatibility, and developer experience.