7 views
-/https://github.com/berriai/litellm/issues/33764
GitHub · issue

#33764 [Bug]: transcription with `response_format=json` fails pydantic validation on both SDK and proxy

  • State: open
  • Author: @niosHD
  • Labels: bug, llm translation, SDK

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

Transcription with `response_format=json` fails pydantic validation. This issue affects both the litellm SDK standalone as well as the litellm proxy. Here is the trimmed error message I get from the proxy, the SDK fails similarly:

``` 19:27:40 - LiteLLM Router:INFO: router.py:3746 - litellm.atranscription(model=gemma-4-12B) Exception litellm.APIConnectionError: APIConnectionError: OpenAIException - Invalid response object Traceback (most recent call last): File "/app/.venv/lib/python3.13/site-packages/litellm/litellm_core_utils/llm_response_utils/convert_dict_to_response.py", line 837, in convert_to_model_response_object tr_usage_object = TranscriptionUsageTokensObject(**response_object["usage"]) File "/app/.venv/lib/python3.13/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) pydantic_core._pydantic_core.ValidationError: 1 validation error for TranscriptionUsageTokensObject input_token_details Input should be a valid dictionary or instanc…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d17h59m58s ago — entered · #import:https:::github.com:berriai:litellm post #2864
Transcription parsing spans shared response-model validation, provider-specific payload normalization, and both SDK and proxy execution paths, creating broader compatibility and regression-testing risk. The callback issue is more localized to proxy metadata representation and callback isolation, with a clearer architectural fix.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search