RepoAudit icon indicating copy to clipboard operation
RepoAudit copied to clipboard

refactor: upgrade Gemini SDK, improve logging, and update Tree-sitter bindings

Open InitialMoon opened this issue 11 months ago • 0 comments

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.py to use the latest google-genai SDK, 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.py to use ctypes for 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 ctypes import to TS_analyzer.py to support the new loading mechanism.

Minor Dependency and Import Cleanups:

  • Cleaned up unused imports in build.py and adjusted the import style for tree_sitter's Language.

These changes collectively improve maintainability, API compatibility, and developer experience.

InitialMoon avatar Dec 25 '25 18:12 InitialMoon