feat(api): update API spec from langfuse/langfuse a93f65a#1545
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Introduce
ObservationV2class and integrate it into the API structure, updating imports and response handling.ObservationV2class inobservation_v2.pywith various fields likeid,trace_id,start_time, etc.__init__.pyinapiandcommonsto includeObservationV2in imports and__all__.observations_v2response.pyto useObservationV2indatafield.ObservationV2to_dynamic_importsincommons/types/__init__.pyandcommons/__init__.py.This description was created by
for f2494f0. You can customize this summary. It will automatically update as commits are pushed.
Disclaimer: Experimental PR review
Greptile Summary
This PR introduces the
ObservationV2class for the v2 observations API and integrates it throughout the API module structure. The key change improves type safety by replacingtyping.List[typing.Dict[str, typing.Any]]withtyping.List[ObservationV2]in theObservationsV2Responseclass.ObservationV2Pydantic model with 30+ fields including core observation data, timestamps, usage/cost tracking, and model informationObservationV2into module exports acrossapi,commons, andcommons/typespackages with correct alphabetical orderingextra="allow"for API flexibility andfrozen=Truefor immutabilityAll imports follow the custom rule requirement of being placed at the top of modules. The auto-generated code is clean and follows Python/Pydantic best practices.
Confidence Score: 5/5
Important Files Changed
ObservationV2modelLast reviewed commit: f2494f0