Repository navigation
docs: api.scores.create takes a list in Python SDK v5 and JS/TS SDK v6 - #4036
Conversation
Co-authored-by: hassieb.pakzad <hassieb.pakzad@clickhouse.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@claude review |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
💡 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. |
There was a problem hiding this comment.
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>
cd3e50d
into
hassiebbot/sdk-majors-migration-guides-84a8
This PR stacks on #4008.
Summary
POST /api/public/scoresis documented with a list body only, following langfuse/langfuse#18751. The server still accepts a single object.api.scores.create()takes a list of score requests only. It returns the batch response:CreateScoreBatchResponsewhen all scores are accepted, orCreateScoreBatchResultswith accepted/rejected counts and errors. The examples pass a list. The JS guide notes that the response no longer includes the scoreid; setidon the request if you need it.curlexamples that post to/api/public/scoresnow send a JSON array. They are inscores-via-sdk,corrections, and the human-in-the-loop scoring guide.#tag/legacyscorev1/POST/api/public/scoreslinks inscores-via-sdknow point to#tag/scores/POST/api/public/scores.Merge timing
#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."md-overridecounterparts for the edited pages. Generated cookbook pages were not edited.
Confidence 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().Reviews (1) · Last reviewed commit: "docs: api.scores.create takes a list in ..." · Reviewed by Greptile