Skip to content

docs: api.scores.create takes a list in Python SDK v5 and JS/TS SDK v6 - #4036

Merged
hassiebp merged 2 commits into
hassiebbot/sdk-majors-migration-guides-84a8from
hassiebbot/scores-create-list-docs-bd8b
Oct 13, 2026
Merged

hassiebp merged 2 commits into
hassiebbot/sdk-majors-migration-guides-84a8from
hassiebbot/scores-create-list-docs-bd8b

Conversation

@hassiebp

@hassiebp hassiebp commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

This PR stacks on #4008.

Summary

POST /api/public/scores is documented with a list body only, following langfuse/langfuse#18751. The server still accepts a single object.

  • Upgrade guides (Python v4→v5, JS v5→v6): api.scores.create() takes a list of score requests only. It returns the batch response: CreateScoreBatchResponse when all scores are accepted, or CreateScoreBatchResults with accepted/rejected counts and errors. The examples pass a list. The JS guide notes that the response no longer includes the score id; set id on the request if you need it.
  • REST examples: the 11 curl examples that post to /api/public/scores now send a JSON array. They are in scores-via-sdk, corrections, and the human-in-the-loop scoring guide.
  • API reference links: the two stale #tag/legacyscorev1/POST/api/public/scores links in scores-via-sdk now point to #tag/scores/POST/api/public/scores.

Merge timing

  • The SDK text matches only after the Python and JS clients are regenerated from #18751.
  • The #tag/scores/POST/... anchor resolves once #18751 is deployed to the public API reference.

Verification

  • pnpm run format:check: "All matched files use Prettier code style!"
  • node scripts/check-h1-headings.js: "Success: All checked markdown/MDX files have at most one H1 heading."
  • No md-override counterparts for the edited pages. Generated cookbook pages were not edited.
Open in Web Open in Cursor 

RetriggerConfidence Score: 5/5

No actionable issue was found that blocks merging these documentation changes.

Summary

Updates the Python v5 and JS/TS v6 upgrade guides to show list-only calls to api.scores.create().

  • The score creation guides show list requests and batch results.

Reviews (1) · Last reviewed commit: "docs: api.scores.create takes a list in ..." · Reviewed by Greptile

Co-authored-by: hassieb.pakzad <hassieb.pakzad@clickhouse.com>
@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
langfuse-docs Ready Ready Preview Oct 13, 2026 8:04pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T19:58:39.711290Z 1b7b446 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

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.

@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.

Code review found no issues

No high-confidence issues detected in this change.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1b7b4463ba

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

**Breaks:** TypeScript compile errors, or `TypeError` / `undefined` at runtime in JavaScript.

- `api.scores.create()` now accepts a single `CreateScoreRequest` or an array, and returns `CreateScoresResponse`, a union of the single-score and batch responses. Single-score calls keep working, but TypeScript code that reads fields from the response needs to narrow the type first.
- `api.scores.create()` now takes an array of `CreateScoreRequest` objects, and returns `CreateScoresResponse`: `CreateScoreBatchResponse` when all scores are accepted, or `CreateScoreBatchResults` with accepted/rejected counts and errors. The response no longer includes the score `id`; set `id` on the request if you need it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Broaden the affected-user summary to all create callers

Because v6 now requires an array, every existing direct api.scores.create({...}) caller must change, even if it ignores the result. However, the “Are you affected?” bullet at line 29 still limits this migration to callers that read the response, so those users are incorrectly told they can upgrade unchanged; update that summary bullet to cover all direct calls.

Useful? React with 👍 / 👎.

…rence

Co-authored-by: hassieb.pakzad <hassieb.pakzad@clickhouse.com>
@hassiebp
hassiebp merged commit cd3e50d into hassiebbot/sdk-majors-migration-guides-84a8 Oct 13, 2026
11 checks passed
@hassiebp
hassiebp deleted the hassiebbot/scores-create-list-docs-bd8b branch October 13, 2026 20:09

This branch was successfully deployed

1 active deployment
Preview — 15559132 Deployed Oct 13, 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.

2 participants