Skip to content

feat: raise the sync and dictation config caps to match the service - #250

Merged
aurpsis-aai merged 1 commit into
masterfrom
aurpsis/raise-dictation-caps
Sep 11, 2026
Merged

aurpsis-aai merged 1 commit into
masterfrom
aurpsis/raise-dictation-caps

Conversation

@aurpsis-aai

Copy link
Copy Markdown
Contributor

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

Field Was Now
prompt (Sync) / stt_prompt (Dictation) 4096 chars 6000 chars
keyterms_prompt 2048 chars 8000 chars + 100-term cap
conversation_context 100 turns / 4096 chars 500 turns / 16000 chars

Both surfaces, not just dictation. SyncTranscriptionConfig in types.py mirrors 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_prompt is now under the cap. They read the constants now, so the next cap change can't quietly turn them into no-ops.

ruff check and ruff format --check --config ./ruff.toml clean on the changed files. (ruff check flags 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

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
aurpsis-aai force-pushed the aurpsis/raise-dictation-caps branch from 8b22593 to c5bbd12 Compare September 11, 2026 14:23
@aurpsis-aai
aurpsis-aai marked this pull request as ready for review September 11, 2026 16:25
@aurpsis-aai
aurpsis-aai merged commit 31d9864 into master Sep 11, 2026
8 checks passed
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