Skip to content

feat(api): update API spec from langfuse/langfuse 570909d - #999

Closed
langfuse-bot wants to merge 1 commit into
mainfrom
api-spec-bot-570909d-37649627766-1
Closed

langfuse-bot wants to merge 1 commit into
mainfrom
api-spec-bot-570909d-37649627766-1

Conversation

@langfuse-bot

@langfuse-bot langfuse-bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

RetriggerConfidence Score: 4/5

Fix the incompatible score return types before merging.

Summary

Updates the generated API client with batch score creation, experimental skills endpoints, prompt filters, API key names and expiration, and ingestion migration guidance.

  • Preserve single-score return types to fix the core TypeScript failure.
  • Correct the hash comment so callers do not encode values twice.

Reviews (1) · Last reviewed commit: "feat(api): update API spec from langfuse..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
langfuse-js Error Error Oct 7, 2026 4:10pm UTC

Request Review

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

@claude review

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

No review was started: this request came from a bot account. Manual reviews can only be requested by someone with write access to this repository. Ask a maintainer to comment @claude review, or have your automation post the comment from a user account with write access.

Tip: disable this comment in your organization's Code Review settings.

Comment on lines 93 to +96
public create(
request: LangfuseAPI.CreateScoreRequest,
request: LangfuseAPI.CreateScoresRequest,
requestOptions?: Scores.RequestOptions,
): core.HttpResponsePromise<LangfuseAPI.CreateScoreResponse> {
): core.HttpResponsePromise<LangfuseAPI.CreateScoresResponse> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Score types break compilation

Scores.create() now returns HttpResponsePromise<CreateScoresResponse> even for a single score. ScoreV1.create() still returns that call as HttpResponsePromise<CreateScoreResponse>. The batch responses lack id, so these types are incompatible and the core package fails TypeScript checking.

Add overloads that preserve CreateScoreResponse for single-score requests and return the batch response types for arrays.

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/core/src/api/api/resources/scores/client/Client.ts
Line: 93-96

Comment:
**Score types break compilation**

`Scores.create()` now returns `HttpResponsePromise<CreateScoresResponse>` even for a single score. `ScoreV1.create()` still returns that call as `HttpResponsePromise<CreateScoreResponse>`. The batch responses lack `id`, so these types are incompatible and the core package fails TypeScript checking.

Add overloads that preserve `CreateScoreResponse` for single-score requests and return the batch response types for arrays.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

* }
*/
export interface GetSkillFileContentsRequest {
/** Comma-separated list of one to 50 canonical base64-encoded SHA-256 hashes from skill file manifests. URL-encode the value, including +, /, and = characters. */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Hash instructions encode twice

The sha256Hashes comment tells callers to URL-encode the value, but the client already does this. Following that instruction turns %2B, %2F, and %3D into %252B, %252F, and %253D. The server then receives escaped text instead of canonical base64 hashes.

Tell callers to pass raw, comma-separated hashes and let the client encode them.

Suggested change
/** Comma-separated list of one to 50 canonical base64-encoded SHA-256 hashes from skill file manifests. URL-encode the value, including +, /, and = characters. */
/** Comma-separated list of one to 50 canonical base64-encoded SHA-256 hashes from skill file manifests. Pass raw hashes; the client URL-encodes the value automatically. */
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/core/src/api/api/resources/unstable/resources/skills/client/requests/GetSkillFileContentsRequest.ts
Line: 12

Comment:
**Hash instructions encode twice**

The `sha256Hashes` comment tells callers to URL-encode the value, but the client already does this. Following that instruction turns `%2B`, `%2F`, and `%3D` into `%252B`, `%252F`, and `%253D`. The server then receives escaped text instead of canonical base64 hashes.

Tell callers to pass raw, comma-separated hashes and let the client encode them.

```suggestion
  /** Comma-separated list of one to 50 canonical base64-encoded SHA-256 hashes from skill file manifests. Pass raw hashes; the client URL-encodes the value automatically. */
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed this PR and didn't find any bugs. Because it's a large auto-generated regeneration touching many API client files, a human look would still be worthwhile.

What was reviewed: the ingestion→scores type renames (SdkLogBody/SdkLogEvent exports removed, replaced by new CreateScoreBatch*/CreateScores* types, consistently re-exported in scores/types/index.ts); the new skills sub-resource wiring into unstable/client/Client.ts and unstable/resources/index.ts; the OrganizationApiKey name/deprecated note field addition; and the expiresAt nullability typing across ApiKeyResponse/ApiKeySummary/OrganizationApiKey (inconsistency present but inherited from the spec, not a new bug introduced here).

Extended reasoning...

This is a Fern-generated regeneration of the Langfuse API client (55 files, 1442 insertions/35 deletions) adding a new unstable skills resource, renaming ingestion SdkLog types into new scores batch types, and adding fields to OrganizationApiKey/ApiKeyResponse/ApiKeySummary and a prompts list filter param; no hand-written logic, no auth/crypto changes, purely generated typings and client wiring. The bug hunt reported no findings; I independently spot-checked the index.ts export renames and the new skills client wiring for consistency and found them correct. The one candidate issue noted (ApiKeySummary/OrganizationApiKey expiresAt missing | null unlike ApiKeyResponse) is a pre-existing spec-inherited typing quirk, not a newly introduced bug, so it was ruled out rather than flagged. Given the sheer size and scope of files touched, I'm deferring rather than approving outright.

This branch had an error being deployed

1 failed deployment
Preview — d7695467 Deployed Oct 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant