feat(api): update API spec from langfuse/langfuse 41f064c #719
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Important
Update API spec to change optional properties to nullable types and add
expandMetadataparameter for metadata handling inObservationsV2.BaseScore,BaseScoreV1,Comment,Dataset,DatasetItem,DatasetRun,DatasetRunItem,Model,Observation,ObservationsView,ScoreConfig,Session,Trace,TraceWithDetails,TraceWithFullDetails, andUsage.expandMetadataquery parameter inGetObservationsV2Requestto allow non-truncated metadata retrieval inClient.ts.This description was created by
for 840c074. You can customize this summary. It will automatically update as commits are pushed.
Disclaimer: Experimental PR review
Greptile Summary
Auto-generated API spec synchronization from langfuse/langfuse commit 41f064c. This update brings TypeScript type definitions in sync with the backend API.
field?: Type) to explicit nullable types (field: Type | null), making nullability explicit in the type systemexpandMetadataparameter to the observationsV2 API, allowing retrieval of non-truncated metadata values (metadata is truncated to 200 chars by default)Usage.unitchanged fromModelUsageUnitenum tostring | null;Observation.modelParameterschanged fromRecord<string, MapValue>tounknownThese are standard Fern-generated updates that reflect changes in the backend API specification.
Confidence Score: 5/5
Important Files Changed
Sequence Diagram
sequenceDiagram participant Client as SDK Client participant API as ObservationsV2 API participant Backend as Langfuse Backend Client->>API: getMany({ fields, expandMetadata, ... }) Note over API: Build query params with<br/>new expandMetadata option API->>Backend: GET /api/public/v2/observations Backend-->>API: ObservationsV2Response Note over API: Response uses updated types:<br/>- Usage (required fields)<br/>- Observation (explicit nulls)<br/>- TraceWithDetails (optional arrays) API-->>Client: Typed response with<br/>explicit nullability