Repository navigation
fix(nodejs-client): allow long knowledge document text - #44679
Merged
crazywoola merged 1 commit intoOct 30, 2026
Merged
Conversation
crazywoola
approved these changes
Oct 30, 2026
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #44678.
A 10,001-character knowledge document is rejected before the Node.js SDK sends any HTTP request, even though the document API accepts it. Creation hits the method's generic string limit; updating hits the separate HTTP body validator. Changing only one layer leaves the other failure intact.
Keep the generic limits as defaults and add a per-request exemption for named body string fields. Only
texton document create/update opts in. Creation still validates that text is a non-empty string. Names, IDs, query strings, other body fields, and other requests retain their existing checks. No dependencies change.Verification
tsc --noEmit, SDKvp pack, and repository-config Oxlint and Oxfmt checks on all five changed files pass. The lint/format config was loaded through a temporary root re-export ofpackages/tooling/repository.config.tsto resolve workspace tooling in the isolated checkout; the temporary file is not part of this PR.DocumentTextCreatePayload/DocumentTextUpdateand persist 10,001/50,000 characters through actualFileService.upload_text, SQLite and filesystem OpenDAL storage, verifying the saved content and byte size.Screenshots
ValidationErrorwithout sending a request.Checklist
make lint && make type-check(backend) andvp staged(frontend) to appease the lint godsSDK-scoped validation is listed above; the full backend/frontend checks are not claimed. No documentation change is required for restoring the accepted document text contract.
From Codex