mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-16 02:12:01 +00:00
fix: serialize boolean provider params as lowercase strings
str(True) produces "True" but Mistral API expects lowercase "true". Use str(value).lower() for bool params in provider-specific fields.
This commit is contained in:
@@ -121,7 +121,7 @@ class MistralAudioTranscriptionConfig(BaseAudioTranscriptionConfig):
|
||||
openai_params=self.get_supported_openai_params(model),
|
||||
)
|
||||
for key, value in provider_specific_params.items():
|
||||
form_fields[key] = str(value)
|
||||
form_fields[key] = str(value).lower() if isinstance(value, bool) else str(value)
|
||||
|
||||
files = {
|
||||
"file": (
|
||||
|
||||
+1
-1
@@ -141,7 +141,7 @@ def test_mistral_audio_transcription_request_with_diarize():
|
||||
audio_file.close()
|
||||
|
||||
assert isinstance(result.data, dict)
|
||||
assert result.data["diarize"] == "True"
|
||||
assert result.data["diarize"] == "true"
|
||||
|
||||
|
||||
def test_mistral_audio_transcription_response_transform():
|
||||
|
||||
Reference in New Issue
Block a user