Repository navigation
feat: raise the sync and dictation config caps to match the service - #250
Merged
Merged
Conversation
DeepLearning #20095 raises the per-field caps on the service. The SDK mirrors them client-side, so until it follows it rejects requests the service now accepts. - prompt / stt_prompt: 4096 -> 6000 characters - keyterms_prompt: 2048 -> 8000 characters, plus a new 100-term cap - conversation_context: 100 turns / 4096 chars -> 500 turns / 16000 chars The keyterms count cap is new on both sides: term count, not total length, is what the server's prompt-budget trim walks. Tests referenced the old numbers as literals, so several would have kept passing while exercising nothing — a 3000-character keyterms list is now valid, 120 context turns no longer trims. They read the constants now. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VK9A9Dj5YKn2dGJ1XDry9n
aurpsis-aai
force-pushed
the
aurpsis/raise-dictation-caps
branch
from
September 11, 2026 14:23
8b22593 to
c5bbd12
Compare
aurpsis-aai
marked this pull request as ready for review
September 11, 2026 16:25
bgotthold-aai
approved these changes
Sep 11, 2026
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.
Companion to DeepLearning #20095 and docs #349. Gated on the DL PR merging — until it ships these caps would let through requests the service still rejects.
Why
The SDK mirrors the service's caps client-side so a too-long prompt fails locally instead of round-tripping. That mirroring cuts both ways: once the service raises its caps, the SDK is the thing rejecting valid requests.
What changed
prompt(Sync) /stt_prompt(Dictation)keyterms_promptconversation_contextBoth surfaces, not just dictation.
SyncTranscriptionConfigintypes.pymirrors the same caps and needed the same bump — worth noting since the follow-up was originally scoped as a dictation-only change.The keyterms count cap is new on both sides. Term count, not total characters, is what the server's prompt-budget trim walks, and neither config had a count limit. 100 terms, matching the service and streaming.
Each cap lives in one constant per surface (
_SYNC_MAX_*,_DICTATION_MAX_*), and the validators, field docstrings and README comments all follow from it.Tests
pytest tests/unit— 650 pass.Four new tests (over the count cap raises, exactly at it is accepted — for both Sync and Dictation).
Five existing tests restated the old caps as literals, so raising the numbers would have left them passing while testing nothing: a 3000-character keyterms list is now valid, 120 context turns no longer trims, a 5000-character
stt_promptis now under the cap. They read the constants now, so the next cap change can't quietly turn them into no-ops.ruff checkandruff format --check --config ./ruff.tomlclean on the changed files. (ruff checkflags 8 other test files for unsorted imports on master; CI only lints a PR's changed files, so those are untouched here.)Version
Patch bump to 1.5.2.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VK9A9Dj5YKn2dGJ1XDry9n