{"record":{"id":"677278ef54e35b68","repo":"BerriAI/litellm","slug":"nvidia-riva-client-is-not-installed-install-with","errorCode":null,"errorMessage":"NVIDIA Riva client is not installed. Install with `pip install 'litellm[stt-nvidia-riva]'`.","messagePattern":"NVIDIA Riva client is not installed\\. Install with `pip install 'litellm\\[stt-nvidia-riva\\]'`\\.","errorType":"exception","errorClass":"NvidiaRivaException","httpStatus":500,"severity":"error","filePath":"litellm/llms/nvidia_riva/audio_transcription/handler.py","lineNumber":404,"sourceCode":"                            \"start_time_ms\": int(getattr(word, \"start_time\", 0) or 0),\n                            \"end_time_ms\": int(getattr(word, \"end_time\", 0) or 0),\n                        }\n                    )\n                final_results.append({\"transcript\": transcript, \"words\": words})\n        return final_results\n\n\ndef _import_riva():\n    \"\"\"\n    Lazy import of ``riva.client`` and ``riva.client.proto.riva_asr_pb2``.\n\n    We try the SDK first (preferred) and fall back to importing the proto\n    module separately when the SDK packaging changes between versions.\n    \"\"\"\n    try:\n        import riva.client as riva_client\n    except ImportError as e:\n        raise NvidiaRivaException(status_code=500, message=_RIVA_INSTALL_HINT) from e\n\n    riva_asr_module = riva_client\n    if not hasattr(riva_asr_module, \"RecognitionConfig\"):\n        try:\n            from riva.client.proto import riva_asr_pb2\n\n            riva_asr_module = riva_asr_pb2\n        except ImportError as e:\n            raise NvidiaRivaException(status_code=500, message=_RIVA_INSTALL_HINT) from e\n\n    return riva_client, riva_asr_module\n","sourceCodeStart":386,"sourceCodeEnd":416,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/nvidia_riva/audio_transcription/handler.py#L386-L416","documentation":"LiteLLM's NVIDIA Riva audio transcription provider lazily imports the `riva.client` SDK only when a transcription request is made. If the import raises ImportError, LiteLLM wraps it in an NvidiaRivaException (HTTP 500) with the install hint instead of crashing at module load. This keeps the Riva extra optional: the failure only surfaces when you actually call the Riva transcription path.","triggerScenarios":"Calling litellm.transcription() (or acompletion-style routing) with model=\"riva/...\" (or any NVIDIA Riva provider model) in an environment where `import riva.client` fails. The error is raised from _import_riva() at the first transcription call, not at litellm import time.","commonSituations":"Installed plain `litellm` instead of `litellm[stt-nvidia-riva]`; using a deployment image (Docker, Lambda, serverless) that strips optional extras; wrong virtualenv/interpreter selected (package installed in another env); Python version incompatible with nvidia-riva-client wheels.","solutions":["Install the extra in the same environment that runs LiteLLM: pip install 'litellm[stt-nvidia-riva]'","If the extra resolves wrong, install the SDK directly: pip install nvidia-riva-client","Verify the interpreter can see it: python -c \"import riva.client; print(riva.client.__file__)\" — run this with the exact interpreter/venv your app uses","For Docker deployments, add the extra to the image's requirements and rebuild rather than relying on the base litellm image","If install succeeds but import still fails, check for a conflicting local file/directory named riva/ shadowing the package"],"exampleFix":"# before\nlitellm.transcription(model=\"riva/nvidia/parakeet\", file=audio_file)  # NvidiaRivaException\n\n# after (install once, then call)\n# pip install 'litellm[stt-nvidia-riva]'\nresp = litellm.transcription(model=\"riva/nvidia/parakeet\", file=audio_file)","handlingStrategy":"validation","validationCode":"import importlib.util\n\nriva_available = importlib.util.find_spec(\"riva.client\") is not None\nif not riva_available:\n    raise RuntimeError(\"Install first: pip install 'litellm[stt-nvidia-riva]'\")\n\nresp = litellm.transcription(model=\"riva/nvidia/parakeet\", file=audio_file)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Add 'litellm[stt-nvidia-riva]' to your lockfile/requirements so CI and prod images always carry the extra","Add a startup check: python -c \"import riva.client\" in your container healthcheck or boot sequence","Pin your deployment to one interpreter/venv and install extras there, not ad hoc in shells"],"tags":["nvidia-riva","speech-to-text","missing-dependency","optional-extra","import-error"],"backgroundTag":"missing-optional-dependency","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}