Repository navigation
Conversation
Python 3.10 reaches end of life in October 2026. Raise requires-python to >=3.11, target py311 in ruff, drop 3.10 from the CI unit matrix, and remove the pre-3.11 fallbacks for asyncio.create_task(context=...) and typing.NotRequired. Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
The OpenAI integration now always uses the v1 client shapes. Remove the pre-1.0 method definitions and every _is_openai_v1() branch, and raise the dev dependency floor to openai>=1.0.0. Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
|
@claude review |
There was a problem hiding this comment.
Claude Code Review
No review was started: this request came from a bot account. Manual reviews can only be requested by someone with write access to this repository. Ask a maintainer to comment @claude review, or have your automation post the comment from a user account with write access.
Tip: disable this comment in your organization's Code Review settings.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Looks good — straightforward dead-code removal plus a matching version-floor bump.
What was reviewed: the _is_openai_v1() branch removals in _extract_streamed_openai_response, _get_langfuse_data_from_default_response, _is_streaming_response, _install_openai_stream_iteration_hooks, _wrap/_wrap_async, and register_tracing; confirmed each removed branch always took the v1 path. Checked that langfuse/openai.py already imports openai._types.NotGiven at module level (line 36), which doesn't exist pre-1.0, so the v0 branches were unreachable even before this change. Verified the pyproject.toml/uv.lock dev-dependency bump (openai>=0.27.8 → >=1.0.0) is a one-line, consistent change in both files.
Extended reasoning...
The change removes OPENAI_METHODS_V0 and all _is_openai_v1() conditional branches in langfuse/openai.py, always taking the openai>=1.0 code path, and bumps the dev dependency floor in pyproject.toml/uv.lock to match. No security-sensitive surface (auth, crypto, permissions) is touched. The decisive fact is that the module already hard-required openai>=1.0 via a module-level import of openai._types.NotGiven, making the removed branches provably dead code, so this is a mechanical simplification with no behavior change.
inspect.iscoroutinefunction ignores asyncio's _is_coroutine marker, which asgiref's markcoroutinefunction sets on Python < 3.12. Accept both so such functions keep the async wrapper and their observation ends after the coroutine runs. Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…0' into lfe-17080-python-sdk-v5-drop-openai-sdk-10-support Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…penai-sdk-10-support Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
What does this PR do?
The OpenAI integration now assumes openai
>=1.0:OPENAI_METHODS_V0and every_is_openai_v1()branch inlangfuse/openai.py(v1 client shapes only)openai>=0.27.8→openai>=1.0.0(one-lineuv.lockchange, verified withuv lock --check)The pre-1.0 branches were already unreachable:
langfuse/openai.pyimportsopenai._types.NotGivenat module level, which does not exist in openai 0.x.Stack: 2 of 10. Base: #1927. Merge after #1927. It is stacked only because both PRs edit
pyproject.toml/uv.lock; the hunks don't overlap.Type of change
Verification
tests/live_provider/test_openai.pyneeds a real OpenAI key and was not run locally; CI runs it.Checklist
code_review.md..env.templateif needed.The PR appears safe to merge as the stated breaking change.
Summary
The PR removes pre-1.0 OpenAI integration branches and raises the development dependency minimum to OpenAI 1.0.
Reviews (1) · Last reviewed commit: "feat(openai)!: drop support for OpenAI S..."