feat(scribe): support disabling logging via enableLogging - #907
Merged
Conversation
Threads an enableLogging option through Scribe.connect and the useScribe hook, sending enable_logging=true|false on the realtime WebSocket URL. Omitted when unset so the server default applies. Closes #545 Co-authored-by: Kræn Hansen <mail@kraenhansen.dk>
The published /v1/speech-to-text/realtime contract reports enable_logging in the session_started config; disable_logging was hand-written into this schema when it was first added and is never sent by the server. Co-authored-by: Kræn Hansen <mail@kraenhansen.dk>
PaulAsjes
approved these changes
Jul 30, 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.
description
Closes #545. Threads the realtime Scribe
enable_loggingquery param through the SDKs so callers can opt into zero retention mode.enableLogging?: booleanonBaseOptionsin@elevenlabs/client, appended to the WebSocket URI asenable_logging=true|false. Omitted entirely when unset, so the server default (logging enabled) still applies.enableLogging?: booleanonScribeHookOptionsin@elevenlabs/react, forwarded in both the microphone and manual-audio branches. Resolved with??soconnect({ enableLogging: false })can disable logging for a single session even when the hook was created withenableLogging: true.Confirmed against the backend repo:
/v1/speech-to-text/realtimetakes anenable_loggingquery param (bool, defaulttrue), and there is nodisable_loggingon the public API —disable_loggingexists only internally as the derived/inverted value.That also settles the naming. @kraenhansen raised
disableLogging: trueas affirmative-language alternative on #680, butdisable_loggingis an internal-only concept, so mirroring it in a public option would name something the API does not expose.enableLoggingmatches the query param, the Python SDK, and the LiveKit plugin, and is consistent with how this file already mirrors API names (noVerbatim→no_verbatim).second commit
22baef6renamesdisable_loggingtoenable_loggingin the Scribesession_startedconfig schema. The published/v1/speech-to-text/realtimecontract reportsenable_logginginMessagesSessionStartedConfigand has nodisable_logging.disable_loggingwas hand-written intoscribe.asyncapi.yamlwhen the file was created in #328 and is referenced nowhere else in the repo, so nothing consumes it today — the internal derived value is the likely source of the mistake. It matters here because this is how a caller would confirm zero retention mode took effect.One thing worth a second pair of eyes from someone with backend access: this is the field name in the
session_startedresponse payload, not the query param. The published contract saysenable_logging, but if the handler happens to serialize the internal config object into that message, it could emit the deriveddisable_logginginstead. Confirming which model backs that payload would close it out; the commit is separable if you would rather not take it on faith.Not touched: the same schema declares
vad_commit_strategywhere the published contract sayscommit_strategy. Same class of drift, unrelated to this issue.testing
Added unit tests, run with
pnpm exec vitest --browser.headless:Full suites pass: 160 tests in
@elevenlabs/client, 133 in@elevenlabs/react, plusturbo check-types lintforclient,react, andtypes.The client-side assertions inspect the URI the mock server actually received. The existing
builds URI with ...tests only put the expected query string in thenew Server(...)URL, whichmock-socketstrips viatrimQueryPartFromURLbefore matching, so those tests pass regardless of the query params that get built. I verified the new ones fail when the param name is misspelled, when the boolean is inverted, and when theundefinedguard is removed.