close
Skip to content

Remove wrappers, rewrite legacy comments - #108

Open
stoyanbinev wants to merge 2 commits into
mainfrom
sbinev/legacy
Open

Remove wrappers, rewrite legacy comments#108
stoyanbinev wants to merge 2 commits into
mainfrom
sbinev/legacy

Conversation

@stoyanbinev

Copy link
Copy Markdown
Contributor

No description provided.

@greptile-apps

greptile-apps Bot commented Feb 10, 2026

Copy link
Copy Markdown

Greptile Overview

Greptile Summary

Removed legacy manual wrapper classes for AI providers (OpenAI, Anthropic, Mistral, Bedrock, Gemini) in favor of auto-instrumentation approach.

Key Changes:

  • Deleted 1,386 lines of manual wrapper code across 5 AI providers
  • Updated documentation (CLAUDE.md, README.md) to reflect auto-instrumentation as the primary approach
  • Cleaned up comments: replaced outdated "HACK" and "TODO" markers with clear explanations of design decisions
  • Removed unused utility functions (get_context(), reset_context_key(), create_paid_callback(), get_audio_duration())
  • Updated naming consistency (PaidAgentsHookPaidOpenAIAgentsHook, PaidCallbackHandlerPaidLangChainCallback)
  • Modernized type hints and improved code clarity throughout

The PR maintains backward compatibility for callback/hook integrations (PaidLangChainCallback, PaidOpenAIAgentsHook) which still require manual integration, while removing the now-redundant wrapper classes that have been replaced by OpenTelemetry auto-instrumentation.

Confidence Score: 5/5

  • This PR is safe to merge with no risk - it's a clean refactoring that removes deprecated code
  • The changes are straightforward code cleanup: removing deprecated wrapper code that has been replaced by auto-instrumentation, updating documentation to match, and improving comment clarity. No tests reference the deleted wrappers, no runtime logic changes, and the remaining callback/hook exports are preserved correctly.
  • No files require special attention

Important Files Changed

Filename Overview
CLAUDE.md Updated documentation to reflect removal of manual wrappers, clarified terminology and removed outdated line counts
README.md Removed wrapper usage examples, updated to show auto-instrumentation approach instead
src/paid/tracing/autoinstrumentation.py Updated comments to reflect correct function names and clarified OpenAI instrumentation library
src/paid/tracing/tracing.py Improved comments to clarify design decisions, removed outdated HACK/TODO comments
src/paid/tracing/wrappers/init.py Removed exports for deleted wrapper classes (PaidOpenAI, PaidAnthropic, etc.), kept only callback/hook exports
src/paid/tracing/wrappers/openai/openAiWrapper.py File deleted - manual wrapper replaced by auto-instrumentation (619 lines removed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants