Repository navigation
fix(streaming): send mode mid-session and reject unknown session params - #297
Merged
Merged
Conversation
RealTimeSessionParameters had no `mode` field and pydantic's default extra="ignore" dropped it, so set_params(mode="manual") sent nothing for mode. Add `mode` and `continuous_partials` (both accepted by the server's UpdateConfiguration), forbid unknown fields on the session/connect parameter models, and add a keyword `update_configuration(**kwargs)` wrapper on StreamingClient and AsyncStreamingClient. Fixes #296 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…duration Connect parameters drop unknown fields with a logged warning instead of raising; session parameters still raise. Add max_turn_duration (accepted at connect and mid-session). set_params warns when format_turns or filter_profanity is set, since the server applies them only at connect, and still sends them. Fix README/CLAUDE.md, which said format_turns can be switched mid-session. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ccampbell-aai
marked this pull request as ready for review
November 17, 2026 01:21
bgotthold-aai
approved these changes
Nov 17, 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.
Fixes #296.
RealTimeSessionParametersgainsmode,continuous_partialsandmax_turn_duration. The streaming API accepts all three inUpdateConfiguration;max_turn_durationis also accepted at connect.set_params) reject unknown fields. Connect params (RealTimeParameters) ignore them and log a warning per key.set_paramswarns when givenformat_turnsorfilter_profanity, which the API only applies at connect. They are still sent, matching the Node SDK.update_configuration(**kwargs)on both clients, a thin wrapper aroundset_params.format_turnscan change mid-session. Bumps to 1.10.11.Test plan
test_streaming*.pyassemblyai/filesNode counterpart: AssemblyAI/assemblyai-node-sdk#213
streaming.assemblyai.com,assemblyai-stt-3-7-realtime-agent), sync + async:update_configuration(mode="manual")after the first turn stops natural turn ends untilforce_endpoint()(control: 4 natural turns); Datadog showsUpdateConfiguration {mode: manual}. Wire frame,max_turn_duration(connect + mid-session), unknown-param warning/rejection,format_turnswarning and Termination all as expected🤖 Generated with Claude Code