Skip to content

ci: update langfuse requirement from <4,>=2.0.0 to >=2.0.0,<5 - #367

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/langfuse-gte-2.0.0-and-lt-5
Open

ci: update langfuse requirement from <4,>=2.0.0 to >=2.0.0,<5#367
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/langfuse-gte-2.0.0-and-lt-5

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 13, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on langfuse to permit the latest version.

Commits

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Aug 13, 2026
@dependabot
dependabot Bot requested a review from a team as a code owner August 13, 2026 11:05
@dependabot
dependabot Bot requested a review from pgrayy August 13, 2026 11:05
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Aug 13, 2026
@github-actions github-actions Bot added chore Maintenance tasks, dependency updates, CI changes, refactoring with no user-facing impact area-community Repo health, governance, contributor process, release process, and CI dependency bumps labels Aug 13, 2026
@yonib05

yonib05 commented Aug 13, 2026

Copy link
Copy Markdown
Member

@strandly-the-agent is this PR safe to merge?

@strandly-the-agent

Copy link
Copy Markdown

TL;DR: 🔴 Not safe to merge. langfuse 4.x breaks LangfuseProvider at runtime — v4 moved observations.get_many from page-based to cursor-based pagination, and the provider still calls it with page=. Every get_evaluation_data() call (and strands-evals fetch langfuse) crashes. CI is green only because the unit tests fully mock the SDK, so they can't catch this.

Repro against real langfuse 4.14.4 (no network needed — fails at the call signature):

TypeError: ObservationsClient.get_many() got an unexpected keyword argument 'page'

Recommendation: keep <4 for now (close this PR or @dependabot ignore this major version) and track v4 support as its own change — it needs a code migration, not just a constraint bump.

Verification details

What I checked (head dbe4bdb, langfuse 4.14.4 in a clean venv with this package installed):

  • Langfuse(public_key=, secret_key=, host=) ctor — still compatible (langfuse_provider.py:98)
  • client.api.trace.list — still accepts page/limit/session_id (langfuse_provider.py:156)
  • 🔴 client.api.observations.get_manyno longer accepts page; v4 signature is cursor-based (cursor, limit, trace_id, …). _fetch_all_pages (langfuse_provider.py:130-140) passes page= and reads response.meta.total_pages, so _fetch_observations (langfuse_provider.py:160) raises:
from strands_evals.providers.langfuse_provider import LangfuseProvider
p = LangfuseProvider(public_key="pk", secret_key="sk", host="https://example.invalid")
p._fetch_observations("some-trace-id")
# TypeError: ObservationsClient.get_many() got an unexpected keyword argument 'page'

Why CI didn't catch it: tests/strands_evals/providers/test_langfuse_provider.py MagicMocks the whole client, so the real v4 signatures are never exercised.

Second issue even after a pagination fix: in SDK v4, client.api.observations.* targets the Observations v2 endpoints, which require a Langfuse v4 server. Users on self-hosted Langfuse v3 would need client.api.legacy.observations_v1.get_many (which keeps page-based pagination). So proper v4 support means choosing between the legacy resource or cursor pagination + a server-version story — worth its own issue/PR.

Also note: the resulting range >=2.0.0,<5 would span three majors with materially different client surfaces, which the current code doesn't attempt to handle.

Updates the requirements on [langfuse](https://github.com/langfuse/langfuse) to permit the latest version.
- [Release notes](https://github.com/langfuse/langfuse/releases)
- [Commits](https://github.com/langfuse/langfuse/commits)

---
updated-dependencies:
- dependency-name: langfuse
  dependency-version: 4.14.3
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/pip/langfuse-gte-2.0.0-and-lt-5 branch from dbe4bdb to fe97d60 Compare August 13, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-community Repo health, governance, contributor process, release process, and CI dependency bumps chore Maintenance tasks, dependency updates, CI changes, refactoring with no user-facing impact dependencies Pull requests that update a dependency file python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants