Skip to content

feat(api): update API spec from langfuse/langfuse b3adfc3#1567

Open
langfuse-bot wants to merge 1 commit intomainfrom
api-spec-bot-b3adfc3
Open

feat(api): update API spec from langfuse/langfuse b3adfc3#1567
langfuse-bot wants to merge 1 commit intomainfrom
api-spec-bot-b3adfc3

Conversation

@langfuse-bot
Copy link
Collaborator

@langfuse-bot langfuse-bot commented Mar 18, 2026

Disclaimer: Experimental PR review

Greptile Summary

This auto-generated PR (from the Fern API definition at langfuse/langfuse@b3adfc3) adds an optional created_at / createdAt field to the dataset run item creation API, allowing callers to explicitly set the creation timestamp rather than relying on the server default.

  • Adds created_at: typing.Optional[dt.datetime] parameter to DatasetRunItemsClient.create(), AsyncDatasetRunItemsClient.create(), RawDatasetRunItemsClient.create(), and AsyncRawDatasetRunItemsClient.create().
  • Adds the corresponding created_at field to the CreateDatasetRunItemRequest Pydantic model with the createdAt camelCase alias.
  • All changes follow the established pattern of the existing dataset_version field (same type, same serialization approach, same documentation style).
  • No custom instruction violations were found; all imports remain at the top of their respective modules.

Confidence Score: 5/5

  • This PR is safe to merge — it is a minimal, auto-generated additive change that introduces one optional parameter with no breaking changes.
  • The change is purely additive (a new optional parameter with a server-side default), auto-generated from the API spec, and mirrors the pre-existing pattern for dataset_version exactly. There are no logic errors, no serialization concerns beyond what already exists, and no breaking interface changes.
  • No files require special attention.

Important Files Changed

Filename Overview
langfuse/api/dataset_run_items/types/create_dataset_run_item_request.py Adds an optional created_at field (aliased to createdAt) to the Pydantic request model, consistent with existing field conventions.
langfuse/api/dataset_run_items/raw_client.py Adds created_at: typing.Optional[dt.datetime] parameter to both sync and async create() methods, and includes it as "createdAt" in the JSON request body — mirrors the same pattern as the existing dataset_version field.
langfuse/api/dataset_run_items/client.py Adds created_at parameter to both sync and async wrapper create() methods and passes it through to the raw client — straightforward delegation change.

Sequence Diagram

sequenceDiagram
    participant Caller
    participant DatasetRunItemsClient
    participant RawDatasetRunItemsClient
    participant LangfuseAPI as Langfuse REST API

    Caller->>DatasetRunItemsClient: create(run_name, dataset_item_id, ..., created_at)
    DatasetRunItemsClient->>RawDatasetRunItemsClient: create(run_name, dataset_item_id, ..., created_at)
    RawDatasetRunItemsClient->>LangfuseAPI: POST /api/public/dataset-run-items\n{ runName, datasetItemId, ..., createdAt }
    LangfuseAPI-->>RawDatasetRunItemsClient: HttpResponse[DatasetRunItem]
    RawDatasetRunItemsClient-->>DatasetRunItemsClient: HttpResponse[DatasetRunItem]
    DatasetRunItemsClient-->>Caller: DatasetRunItem
Loading

Last reviewed commit: "feat(api): update AP..."

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