Skip to content

docs(api): document fromStartTime as required on experiments endpoints - #1947

Merged
niklassemmler merged 5 commits into
mainfrom
api-spec/experiments-from-start-time-docs
Oct 7, 2026
Merged

niklassemmler merged 5 commits into
mainfrom
api-spec/experiments-from-start-time-docs

Conversation

@niklassemmler

@niklassemmler niklassemmler commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Split out of #1943 (the bot sync from langfuse/langfuse 4e733d0), so that each upstream API definition change can be reviewed and merged on its own. Regenerated langfuse/api from the last synced spec (langfuse/langfuse 619dbe3) with only this upstream change applied, using the same post-processing as sdk-api-spec.yml.

Upstream: langfuse/langfuse#17603. JS counterpart: langfuse/langfuse-js#990.

Docstrings only: explains why from_start_time is required on the experiments endpoints.

Breaking changes

None. from_start_time was already a required argument on main, and no signature changes.

Type of change

  • Documentation update

Verification

uv run --frozen ruff check .                      # pass
uv run --frozen ruff format --check .             # only tests/unit/test_media.py, same on main
uv run --frozen mypy langfuse --no-error-summary  # pass
uv run --frozen pytest -n auto --dist worksteal tests/unit   # 696 passed, 2 skipped, 18 errors; identical on unmodified main

The 18 errors are all in tests/unit/test_prompt.py (Langfuse client is not initialized) and reproduce identically on unmodified main locally, so they are environmental and not caused by this diff.

Skipped: tests/e2e and tests/live_provider, because no Langfuse server or provider credentials were available locally.

Generation was checked against the bot output: regenerating langfuse/langfuse 619dbe3 (the last synced spec, #1866) with the same steps as sdk-api-spec.yml reproduces main exactly, and regenerating 4e733d0 reproduces #1943 byte-for-byte. scripts/patch_generated_score_compat.py ran and is a no-op on this tree.

Checklist

  • I self-reviewed the diff using code_review.md.
  • I added or updated tests for behavior changes. (generated client only)
  • I updated docs, examples, or .env.template if needed. (n/a)
  • I did not hand-edit generated files; if generated files changed, I used the upstream regeneration path.
  • I did not commit secrets or credentials.

Release info

Bump level: patch (ships in the current 4.x major).

🤖 Generated with Claude Code
🤖 Written by Claude (an AI agent) on behalf of Niklas

RetriggerConfidence Score: 4/5

The PR appears safe to merge, with a non-blocking correction to the documented upper-bound keyword.

Summary

This PR updates eight parameter docstrings across the regular and raw experiment clients.

  • Explains why from_start_time is required and clarifies event-time filtering.
  • Leaves method signatures and request behavior unchanged.
  • One non-blocking correction: use the Python keyword to_start_time instead of the HTTP name toStartTime.

Reviews (1) · Last reviewed commit: "docs(api): document fromStartTime as req..." · Reviewed by Greptile

Regenerated langfuse/api from the upstream Fern definition: baseline
langfuse/langfuse 619dbe3 (last sync, #1866) plus langfuse/langfuse#17603.
Split out of the bundled API-spec bot PR #1943.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

@claude review

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, straightforward docstring-only change to generated API client files.

What was reviewed: the full diff in langfuse/api/experiments/client.py and raw_client.py — confirmed all four hunks are docstring text expansions for the already-required from_start_time parameter on get/get_items (sync and async), with no changes to signatures, defaults, types, or logic.

Extended reasoning...

The diff touches only two Fern-generated API client files, adding clarifying docstring text (marking from_start_time as "Required" and explaining the rationale) to four methods; no signatures, types, defaults, or behavior changed, and the parameter was already required before this diff. No security-sensitive surface (auth, crypto, permissions) is touched, the change is small and mechanical, and there is no outstanding reviewer objection in the timeline.

Comment thread langfuse/api/experiments/client.py Outdated
niklassemmler and others added 4 commits October 7, 2026 17:53
Regenerated from langfuse/langfuse branch
docs/experiments-from-start-time-neutral-wording. The fromStartTime
docstrings named `toStartTime`, but the Python parameter is
`to_start_time`; they now say "an upper bound" instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@niklassemmler
niklassemmler enabled auto-merge (squash) October 7, 2026 17:08
@niklassemmler
niklassemmler merged commit a4cbc21 into main Oct 7, 2026
18 checks passed
@niklassemmler
niklassemmler deleted the api-spec/experiments-from-start-time-docs branch October 7, 2026 17:10
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.

1 participant