Repository navigation
feat: raise the sync config caps to match the service - #180
Closed
aurpsis-aai wants to merge 1 commit into
Closed
aurpsis-aai wants to merge 1 commit into
aurpsis-aai wants to merge 1 commit into
Conversation
The sync API raised its `config` caps, so the SDK was rejecting values the server now accepts: prompt 4096 → 6000, keyterms_prompt 2048 → 8000, and conversation_context 100 → 500 turns / 4096 → 16000 characters. Also enforce the server's 100-term cap on keyterms_prompt, which had no client-side check. Mirrors the Python SDK's 1.5.2. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Author
|
Superseded by #181, which raised the same sync caps (plus the SyncTranscriptionConfig JSDoc) as part of the Python-parity change and has merged into main at 4.41.0. — Jeeves |
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.
What
Raise the client-side caps in
src/services/sync/service.tsto the values the sync service enforces, and add the one check the SDK was missing.promptkeyterms_promptkeyterms_promptterm countconversation_contextOver-cap
promptandkeyterms_promptstill throw before the request is sent; over-capconversation_contextis still trimmed oldest-first rather than rejected. Only the numbers move.Why
The service raised these caps (DeepLearning#20095), so the SDK has been rejecting values the API now accepts — a caller passing a 5000-character prompt gets a client-side
Errorfor a request the server would have taken. The values here matchasr_sync_u3pro/http_server/schemas.py:27-36exactly, and the Python SDK made the same change in 1.5.2.The 100-term cap is new to this SDK: the service rejects a
keyterms_promptover 100 terms, and without a local check that surfaces as a server error mid-request instead of an immediate one.Testing
pnpm test:unit -- tests/unit/sync.test.ts— 34 passed. Five existing cases asserted behavior at the old caps (3000-char keyterms rejected, 5000-char prompt rejected, 120 turns trimmed, and twoconversation_contexttrims) and were re-based on the new ones; added a case for the term-count cap.pnpm lint:eslint,lint:tsc, and prettier are clean on the changed files.Pre-existing on
main, untouched by this PR:tests/unit/utils.test.ts(3 user-agent assertions expectingruntime_env=Node/) andtests/unit/realtime.test.tsfail, and prettier reports 6 unformatted files undersamples/and the generatedsrc/types/*.generated.ts. Verified by running both suites with this branch's two source files reverted toorigin/main.Not in this PR
stt_promptis a dictation parameter, and this SDK has no dictation surface yet — the Python SDK grew one in 1.5.x. Addingclient.dictationis a feature, not a cap change, so it's out of scope here.🤖 Generated with Claude Code