Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix(model_param_helper.py): update `_get_litellm_supported_transcription_kwargs()` to use proper annotations from `TranscriptionCreateParamsNonStreaming` & ``TranscriptionCreateParamsStreaming`

Hammad Saeed732ab55cc8ff
diff --git a/litellm/litellm_core_utils/model_param_helper.py b/litellm/litellm_core_utils/model_param_helper.py
index ebe3ce93fc0..3542ec3a944 100644
--- a/litellm/litellm_core_utils/model_param_helper.py
+++ b/litellm/litellm_core_utils/model_param_helper.py
@@ -1,6 +1,9 @@
from typing import Set
-from openai.types.audio.transcription_create_params import TranscriptionCreateParams
+from openai.types.audio.transcription_create_params import (
+ TranscriptionCreateParamsNonStreaming,
+ TranscriptionCreateParamsStreaming,
+)
from openai.types.chat.completion_create_params import (
CompletionCreateParamsNonStreaming,
CompletionCreateParamsStreaming,
@@ -123,7 +126,10 @@ class ModelParamHelper:
This follows the OpenAI API Spec
"""
- return set(TranscriptionCreateParams.__dict__.keys())
+ all_transcription_kwargs = set(
+ TranscriptionCreateParamsNonStreaming.__annotations__.keys()
+ ).union(set(TranscriptionCreateParamsStreaming.__annotations__.keys()))
+ return all_transcription_kwargs
@staticmethod
def _get_exclude_kwargs() -> Set[str]: