Skip to content

feat(api): update API spec from langfuse/langfuse d89dbc1#1703

Closed
langfuse-bot wants to merge 1 commit into
mainfrom
api-spec-bot-d89dbc1
Closed

feat(api): update API spec from langfuse/langfuse d89dbc1#1703
langfuse-bot wants to merge 1 commit into
mainfrom
api-spec-bot-d89dbc1

Conversation

@langfuse-bot

@langfuse-bot langfuse-bot commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Greptile Summary

This auto-generated PR (from the Fern API spec at langfuse/langfuse d89dbc1) updates the Python SDK documentation across three areas: blob-storage integrations, scores v2, and scores v3.

  • Blob storage: exportFieldGroups now applies to LEGACY_TRACES_OBSERVATIONS in addition to the V2 sources — the old "must be omitted/null or get HTTP 400" restriction is gone; docs and model docstrings are updated consistently across client, raw_client, and type files.
  • Scores v2 (/api/public/scores): Deprecation notices are added to get_many and get in all four client classes, directing users to GET /api/public/v3/scores instead.
  • Scores v3 (/api/public/v3/scores): Endpoint docstrings are enriched with the exact set of always-returned core fields and a per-group field list; core is removed from the fields parameter allowed-values list because it is now unconditionally included.

Confidence Score: 4/5

All changes are auto-generated docstring updates with no functional Python logic altered; the main risk is that removing core from the allowed fields values list signals a server-side breaking change for callers who currently pass fields=core explicitly.

The scores v3 docstring change drops core from the listed allowed values for the fields query parameter, and the same 'Unknown group names return HTTP 400' rule still applies. If the Langfuse v4 server enforces this, any existing SDK user passing fields="core" will receive a 400 error with no SDK-level warning or migration guard. The blob-storage and deprecation notice changes are straightforward and carry no regression risk.

langfuse/api/scores_v3/client.py and langfuse/api/scores_v3/raw_client.py — the fields parameter description change warrants a check that the server still gracefully handles core being passed (or that a migration note is communicated to existing users).

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Client calls scores endpoint] --> B{Which version?}
    B -->|v2 GET /api/public/scores| C[Deprecated - Not available on v4+]
    C --> D[Redirect to v3]
    B -->|v3 GET /api/public/v3/scores| E[Always returns core fields]
    E --> F{fields param provided?}
    F -->|fields=details| G[+ comment, configId, metadata]
    F -->|fields=subject| H[+ kind, id, traceId]
    F -->|fields=annotation| I[+ authorUserId, queueId]
    F -->|fields=core| J[HTTP 400 - no longer a valid group name]
    F -->|omitted| K[core fields only]

    subgraph BlobStorage [Blob Storage exportFieldGroups]
        L[LEGACY_TRACES_OBSERVATIONS] --> M[exportFieldGroups now accepted]
        N[OBSERVATIONS_V2] --> O[exportFieldGroups controls columns]
        P[LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS] --> Q[exportFieldGroups controls both portions]
    end
Loading
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
langfuse/api/scores_v3/client.py:81
**`core` silently removed from allowed `fields` values**

The previous docstring listed `core` as an explicit allowed value for the `fields` parameter ("Allowed: core, details, subject, annotation. Defaults to 'core'"). The new docstring removes `core` from the allowed list because core fields are now always returned. If the server also starts rejecting `fields=core` with HTTP 400 (as the new wording "Unknown group names return HTTP 400" implies), any existing caller that explicitly passes `fields="core"` or `fields="core,details"` will receive a 400 error without any SDK-level warning. The same change appears in `raw_client.py` and both classes in `scores_v3/raw_client.py`.

### Issue 2 of 2
langfuse/api/blob_storage_integrations/types/blob_storage_integration_response.py:53-55
**`null` semantics no longer documented**

The previous docstring explicitly stated that `export_field_groups` is always `null` when `exportSource` is `LEGACY_TRACES_OBSERVATIONS`. The new text only explains the empty-list case ("An empty list is treated as all groups during export") but leaves `null` undefined for readers of the model. Since the field is still typed `Optional[List[...]]`, callers need to know when to expect `null` vs `[]` vs a populated list.

Reviews (1): Last reviewed commit: "feat(api): update API spec from langfuse..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

@github-actions

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.

LGTM — auto-generated Fern client docstring updates only.

Extended reasoning...

Overview

This PR is an auto-generated API spec sync from the upstream langfuse/langfuse repo. All 10 modified files are Fern-generated client code under langfuse/api/, and every change in the diff is a docstring/comment update — no logic, signatures, request bodies, or response shapes change.

Security risks

None. The diff contains only Python docstrings and an enum class-level docstring; runtime behavior is unchanged. No auth, crypto, network, or input-handling code is touched.

Level of scrutiny

Low. These files carry the # This file was auto-generated by Fern from our API Definition. marker, the PR is part of the routine API-sync workflow, and the diff is purely documentation describing changes already made on the server side (exportFieldGroups now applying to all blob-storage export sources; v2 scores endpoints marked deprecated in favor of v3; v3 scores fields description expanded).

Other factors

The bug hunting system found no issues. The PR description matches the diff exactly. Approving without human review is appropriate.


fields : typing.Optional[str]
Comma-separated field groups to include. Allowed: core, details, subject, annotation. Defaults to "core". Unknown names return HTTP 400.
Comma-separated field groups to include in addition to the always-returned core fields. Allowed: details, subject, annotation — see the endpoint description for the fields each group adds. Unknown names return HTTP 400.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 core silently removed from allowed fields values

The previous docstring listed core as an explicit allowed value for the fields parameter ("Allowed: core, details, subject, annotation. Defaults to 'core'"). The new docstring removes core from the allowed list because core fields are now always returned. If the server also starts rejecting fields=core with HTTP 400 (as the new wording "Unknown group names return HTTP 400" implies), any existing caller that explicitly passes fields="core" or fields="core,details" will receive a 400 error without any SDK-level warning. The same change appears in raw_client.py and both classes in scores_v3/raw_client.py.

Prompt To Fix With AI
This is a comment left during a code review.
Path: langfuse/api/scores_v3/client.py
Line: 81

Comment:
**`core` silently removed from allowed `fields` values**

The previous docstring listed `core` as an explicit allowed value for the `fields` parameter ("Allowed: core, details, subject, annotation. Defaults to 'core'"). The new docstring removes `core` from the allowed list because core fields are now always returned. If the server also starts rejecting `fields=core` with HTTP 400 (as the new wording "Unknown group names return HTTP 400" implies), any existing caller that explicitly passes `fields="core"` or `fields="core,details"` will receive a 400 error without any SDK-level warning. The same change appears in `raw_client.py` and both classes in `scores_v3/raw_client.py`.

How can I resolve this? If you propose a fix, please make it concise.

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