feat(api): update API spec from langfuse/langfuse 53433e8#1712
Conversation
|
@claude review |
There was a problem hiding this comment.
LGTM — auto-generated Fern API spec update adding evaluator delete endpoint, mirroring existing patterns.
Extended reasoning...
Overview
This PR is an auto-generated update of the Fern-produced API client, syncing with langfuse/langfuse commit 53433e8. It adds a new delete method for evaluators on the unstable API surface (DELETE /api/public/unstable/evaluators/{evaluatorId}), along with the corresponding DeleteEvaluatorResponse type and lazy-import registrations across __init__.py files. All six files are explicitly auto-generated ("This file was auto-generated by Fern from our API Definition.").
Security risks
None. The change is confined to generated client code under langfuse/api/unstable/. URL construction uses jsonable_encoder(evaluator_id) consistent with the sibling get endpoint, and authentication / request handling is delegated to the shared httpx_client wrapper. No auth, crypto, or permission logic is touched.
Level of scrutiny
Low. This is a mechanical, generator-output PR with a tightly scoped surface (one new endpoint + one new response type). The new delete methods on RawEvaluatorsClient / AsyncRawEvaluatorsClient / EvaluatorsClient / AsyncEvaluatorsClient are structurally identical to the existing get methods, with the appropriate addition of a 409 ConflictError branch reflecting the documented "rules still reference this evaluator" case. Lazy-import dictionaries and __all__ lists are updated consistently across all four __init__.py files.
Other factors
No bugs were flagged by the bug hunting system. There are no prior reviewer comments to address. The duplicated error-handler blocks (e.g., two if _response.status_code == 400 branches per method) are a Fern code-generation artifact present throughout the existing client and not introduced by this PR.
There was a problem hiding this comment.
Auto-generated Fern API spec update adding a delete evaluator endpoint.
Extended reasoning...
Overview
This PR is an auto-generated Fern API spec update that adds a delete endpoint for evaluators in the unstable API surface. It introduces a DeleteEvaluatorResponse Pydantic model and adds synchronous and asynchronous delete methods to both the raw and high-level evaluator clients, mirroring the existing list, create, and get patterns. All exports are wired through the relevant __init__.py layers.
Security risks
None. This is generated client SDK code that issues an HTTP DELETE request to a Langfuse API endpoint. No auth, crypto, or permissions logic; no user-supplied input flows into anything other than a URL path component (already passed through jsonable_encoder).
Level of scrutiny
Low. The diff is entirely Fern-generated and strictly follows the conventions established by the surrounding methods in the same file. The one concern flagged by Greptile (duplicate unreachable status-code handler blocks for 400/401/403/404/405) is a pre-existing code-generator artifact present in every other method in this file — not a regression introduced by this PR.
Other factors
The new model is a simple frozen Pydantic model with a single message field. Documentation is generated from the spec and accurately describes the 403 (managed evaluators) and 409 (active evaluation rules) error semantics. Tests are not added but this is mechanical generated code that mirrors well-tested patterns.
Greptile Summary
This is a Fern-generated API spec update that adds a
deleteendpoint for evaluators in the unstable API surface, following the same code pattern used by the existinglist,create, andgetendpoints.DeleteEvaluatorResponse(a frozen Pydantic model with a singlemessagefield) and exports it through all relevant__init__.pylayers.deletemethods to both the raw and high-level evaluator clients, with proper error handling for 403 (managed evaluators), 409 (active evaluation rules), 404, and other standard HTTP error codes.Confidence Score: 4/5
Auto-generated code that closely mirrors existing patterns; the only notable issue is pre-existing unreachable duplicate error handlers that appear in every method and are a Fern template artifact.
All six changed files follow established patterns. The one concern — duplicate status-code handlers where the second block (commons-namespace errors for 400/401/403/404/405) is never reached — is a pre-existing code-generator artifact shared by every other method in the file, not a regression introduced here.
langfuse/api/unstable/evaluators/raw_client.py — the new
deletemethods carry the same unreachable handler blocks as the pre-existing methods; the upstream Fern template should be fixed to deduplicate them.Sequence Diagram
sequenceDiagram participant Caller participant EvaluatorsClient participant RawEvaluatorsClient participant LangfuseAPI Caller->>EvaluatorsClient: delete(evaluator_id) EvaluatorsClient->>RawEvaluatorsClient: delete(evaluator_id) RawEvaluatorsClient->>LangfuseAPI: "DELETE /api/public/unstable/evaluators/{evaluator_id}" alt 200-299 Success LangfuseAPI-->>RawEvaluatorsClient: "{message: Evaluator successfully deleted}" RawEvaluatorsClient-->>EvaluatorsClient: HttpResponse[DeleteEvaluatorResponse] EvaluatorsClient-->>Caller: DeleteEvaluatorResponse else "403 Forbidden (scope=managed)" LangfuseAPI-->>RawEvaluatorsClient: PublicApiError RawEvaluatorsClient-->>Caller: AccessDeniedError else 409 Conflict (evaluation rules still reference it) LangfuseAPI-->>RawEvaluatorsClient: PublicApiError RawEvaluatorsClient-->>Caller: ConflictError else 404 Not Found LangfuseAPI-->>RawEvaluatorsClient: PublicApiError RawEvaluatorsClient-->>Caller: NotFoundError else 400/401/429/500 LangfuseAPI-->>RawEvaluatorsClient: PublicApiError RawEvaluatorsClient-->>Caller: Appropriate HTTP error endPrompt To Fix All With AI
Reviews (1): Last reviewed commit: "feat(api): update API spec from langfuse..." | Re-trigger Greptile