Remove deprecated send_transcription_frames param and fix broken _warn_deprecated_param calls

Remove the send_transcription_frames parameter from OpenAI Realtime LLM
(deprecated since 0.0.92). Also fix undefined _warn_deprecated_param
calls in both OpenAI and xAI realtime services, replacing them with the
existing _warn_init_param_moved_to_settings method.
This commit is contained in:
Mark Backman
2026-04-02 21:58:57 -04:00
parent 64e09d592e
commit 60933b7a56
2 changed files with 2 additions and 29 deletions

View File

@@ -218,7 +218,6 @@ class OpenAIRealtimeLLMService(LLMService):
start_audio_paused: bool = False, start_audio_paused: bool = False,
start_video_paused: bool = False, start_video_paused: bool = False,
video_frame_detail: str = "auto", video_frame_detail: str = "auto",
send_transcription_frames: Optional[bool] = None,
**kwargs, **kwargs,
): ):
"""Initialize the OpenAI Realtime LLM service. """Initialize the OpenAI Realtime LLM service.
@@ -247,26 +246,8 @@ class OpenAIRealtimeLLMService(LLMService):
This sets the image_detail parameter in the OpenAI Realtime API. This sets the image_detail parameter in the OpenAI Realtime API.
"auto" lets the model decide, "low" is faster and uses fewer tokens, "auto" lets the model decide, "low" is faster and uses fewer tokens,
"high" provides more detail. Defaults to "auto". "high" provides more detail. Defaults to "auto".
send_transcription_frames: Whether to emit transcription frames.
.. deprecated:: 0.0.92
This parameter is deprecated and will be removed in a future version.
Transcription frames are always sent.
**kwargs: Additional arguments passed to parent LLMService. **kwargs: Additional arguments passed to parent LLMService.
""" """
if send_transcription_frames is not None:
import warnings
with warnings.catch_warnings():
warnings.simplefilter("always")
warnings.warn(
"`send_transcription_frames` is deprecated and will be removed in a future version. "
"Transcription frames are always sent.",
DeprecationWarning,
stacklevel=2,
)
# 1. Initialize default_settings with hardcoded defaults # 1. Initialize default_settings with hardcoded defaults
default_settings = self.Settings( default_settings = self.Settings(
model="gpt-realtime-1.5", model="gpt-realtime-1.5",
@@ -289,11 +270,7 @@ class OpenAIRealtimeLLMService(LLMService):
default_settings.model = model default_settings.model = model
if session_properties is not None: if session_properties is not None:
_warn_deprecated_param( self._warn_init_param_moved_to_settings("session_properties", "session_properties")
"session_properties",
self.Settings,
"session_properties",
)
default_settings.session_properties = session_properties default_settings.session_properties = session_properties
# Sync model/instructions from the deprecated SP arg to top-level, # Sync model/instructions from the deprecated SP arg to top-level,
# but only if the deprecated `model` arg didn't already set it. # but only if the deprecated `model` arg didn't already set it.

View File

@@ -252,11 +252,7 @@ class GrokRealtimeLLMService(LLMService):
# 2. Apply direct init arg overrides (deprecated) # 2. Apply direct init arg overrides (deprecated)
if session_properties is not None: if session_properties is not None:
_warn_deprecated_param( self._warn_init_param_moved_to_settings("session_properties", "session_properties")
"session_properties",
self.Settings,
"session_properties",
)
default_settings.session_properties = session_properties default_settings.session_properties = session_properties
# Sync instructions from the deprecated SP arg to top-level # Sync instructions from the deprecated SP arg to top-level
if session_properties.instructions is not None: if session_properties.instructions is not None: