fix(openai): support Langfuse arguments in stream helpers - #1755
Open
gigio1023 wants to merge 1 commit into
Open
fix(openai): support Langfuse arguments in stream helpers#1755gigio1023 wants to merge 1 commit into
gigio1023 wants to merge 1 commit into
Conversation
gigio1023
force-pushed
the
feat/openai-stream-helper-args
branch
from
July 13, 2026 09:32
16ce8ad to
4fc83de
Compare
gigio1023
force-pushed
the
feat/openai-stream-helper-args
branch
2 times, most recently
from
July 20, 2026 09:11
1e576f7 to
33f2dcd
Compare
gigio1023
force-pushed
the
feat/openai-stream-helper-args
branch
from
August 31, 2026 09:50
33f2dcd to
6c87aea
Compare
gigio1023
marked this pull request as ready for review
August 31, 2026 09:57
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.
What does this PR do?
Allows the native Chat Completions and Responses
stream()helpers to accept Langfuse-specific arguments. The innercreate(stream=True)call remains the single owner of the generation observation.extra_body, and sync manager reuse.Fixes langfuse/langfuse#15018
Type of change
Verification
Checklist
code_review.md..env.templateif needed.Greptile Summary
This PR extends Langfuse instrumentation to OpenAI’s native Chat Completions and Responses stream helpers while preserving their native managers and keeping the inner
create(stream=True)call responsible for the observation.Confidence Score: 5/5
The PR appears safe to merge with no concrete blocking or independently actionable non-blocking issues identified.
The stream wrappers preserve provider request arguments and native stream behavior while tests cover supported version boundaries, synchronous and asynchronous lifecycle paths, argument forwarding, and exactly-once observation finalization.
Reviews (1): Last reviewed commit: "fix(openai): support Langfuse arguments ..." | Re-trigger Greptile
Context used: