feat(api): update API spec from langfuse/langfuse 8ab6c91 - #1835
Conversation
|
@claude review |
| Examples | ||
| -------- | ||
| from langfuse import LangfuseAPI | ||
| from langfuse.commons import ModelUsageUnit |
There was a problem hiding this comment.
馃煛 New docstring Examples added for create()/upsert() (sync and async) use from langfuse.commons import ModelUsageUnit, but no langfuse.commons module exists anywhere in the package (only langfuse.api.commons). Running the example as written raises ModuleNotFoundError. The same broken import pattern pre-exists for ScoreConfigDataType in langfuse/api/score_configs/client.py, but this diff newly introduces four fresh occurrences of the identical mistake (lines ~111, ~222, ~466, ~585) for the headline new upsert API and the now-required unit parameter, so the copy-paste example a user reaches for immediately fails.
Extended reasoning...
A developer copies the client.models.upsert(...) or client.models.create(...) example from the docstring, adds from langfuse.commons import ModelUsageUnit as shown, and gets ModuleNotFoundError: No module named 'langfuse.commons' before the client call ever executes.
Verification: Severity: nit. The docstring Examples for the new/updated create() and upsert() (sync at langfuse/api/models/client.py:111 and :222, async equivalents) contain from langfuse.commons import ModelUsageUnit, e.g. diff line adding it above client = LangfuseAPI(...) and client.models.create(... unit=ModelUsageUnit.CHARACTERS). There is no langfuse.commons module: ls langfuse/commons -> "No s
Greptile Summary
Updates the generated Models API to match the latest upstream specification.
Confidence Score: 5/5
The PR appears safe to merge with no concrete changed-code failure identified.
The generated synchronous and asynchronous request paths remain aligned, public exports cover the new types, and the updated request models serialize consistently with the documented API contract.
Reviews (1): Last reviewed commit: "feat(api): update API spec from langfuse..." | Re-trigger Greptile