Conversation
…ompletion Every handler writes conversation content through the content layer in content.py since the span work, and the token aliases moved to set_usage_span_attributes. Nothing in the SDK calls these two functions. They stayed exported for one release so anyone importing them had time to move; that release has shipped. The parity test cut their bodies out before scanning for attribute keys, so the dead writes could not satisfy the lock. With the functions gone, that step has nothing left to do and goes too.
Section 11 still described both functions as live and called from every handler, which stopped being true with the span work. It now says they were removed from both SDKs and names the helpers that replaced them.
apucacao
force-pushed
the
ag/remove-openllmetry-helpers-clean
branch
from
September 25, 2026 15:16
5f5775d to
0be21dd
Compare
Contributor
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 0be21dd. Configure here.
apucacao
marked this pull request as ready for review
September 25, 2026 15:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
set_openllmetry_promptandset_openllmetry_completionhave had no callers since the span work moved every handler onto the content layer incontent.py.TELEMETRY-CONTRACT.mdsaid to keep them exported for one release and then remove them, and that release has shipped. This deletes them, along with the parity-test code that only existed to skip them, and updates the contract doc to match.Testing
uv run pytest tests/test_cross_handler_parity.py: 87 passed, 11 skipped.ruff checkpasses on the changed files.Matching TypeScript cleanup: launchdarkly/js-ai-sdk#88
Original branch:
ag/remove-openllmetry-helpersNote
Overview
Removes legacy
set_openllmetry_promptandset_openllmetry_completionfrom the client package after handlers already write prompts, completions, and usage throughcontent.pyandset_usage_span_attributes.The helpers are dropped from
utils.py, unexported fromlaunchdarkly_ai_server, andTELEMETRY-CONTRACT.mdsection 11 now states they must not return. The cross-handler parity test no longer strips “superseded” function bodies before the vocabulary lock scan—that workaround existed only while dead code still lived inutils.py.Reviewed by Cursor Bugbot for commit 0be21dd. Bugbot is set up for automated code reviews on this repo. Configure here.