feat(api): update API spec from langfuse/langfuse 1ea859c - #929
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@claude review |
There was a problem hiding this comment.
LGTM, straightforward auto-generated type update.
What was reviewed: the new EvaluatorChatMessageRole union type and its re-export from the types index; the widening of EvaluatorChatMessage.role from the "user" literal to that union; and the doc-comment updates on the chat prompt/request/response types describing support for multi-role, ordered chat messages. No runtime logic changed, and the edits are consistent with the auto-generated Fern pattern used elsewhere in this file set.
Extended reasoning...
Overview
This PR is a Fern-auto-generated sync of the Langfuse evaluators SDK types with an updated API definition. It adds a new EvaluatorChatMessageRole string-literal union ("system" | "user" | "assistant"), widens EvaluatorChatMessage.role from the literal "user" to this new union type, re-exports the new type from the types index.ts, and updates several doc comments (CreateLlmAsJudgeEvaluatorRequest, UpdateLlmAsJudgeEvaluatorRequest, LlmAsJudgeEvaluator, LlmAsJudgeEvaluatorVersion, EvaluatorChatPrompt, EvaluatorChatPromptInput) to describe support for an ordered list of chat messages rather than exactly one user message.
Security risks
None. These are pure TypeScript type/interface definitions and JSDoc comments with no executable logic, no I/O, no auth/crypto/permission handling, and no changes to request validation or serialization behavior.
Level of scrutiny
Low. The change is confined to auto-generated type declarations mirroring an upstream OpenAPI/Fern spec change, is small in scope (9 files, mostly comment and type-widening edits), and follows the established generator pattern already present in the codebase (e.g., how other role-like unions are defined). There is no ambiguity in intent and no design decision for a human to weigh in on beyond what the upstream API spec dictates.
Other factors
The diff is self-contained, mechanical, and consistent (the new union type constant object follows the same style as similar generated enums elsewhere in the codebase). There is no PR conversation history or third-party objections to consider, and no CLAUDE.md conventions apply. The bug-hunting pass reported no findings, consistent with the low-risk nature of type-only changes.
Greptile Summary
This generated API update expands LLM-as-judge prompts from one user message to ordered system, user, and assistant messages.
Confidence Score: 4/5
The prompt ordering contract should be represented or validated before merging so type-safe callers cannot submit a system message in an invalid position.
The new role union is correctly exported, but combining it with an unrestricted message array accepts prompts that violate the newly documented ordering rule and can fail only after reaching the API.
Files Needing Attention: packages/core/src/api/api/resources/evaluators/types/EvaluatorChatPrompt.ts
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "feat(api): update API spec from langfuse..." | Re-trigger Greptile