{"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/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/nvidia_riva/audio_transcription/handler.py#L386-L416","documentation":"The Riva transcription path lazily imports the `riva.client` Python SDK (nvidia-riva-client) inside `_import_riva()`. If the package is absent, the ImportError is re-raised as NvidiaRivaException(500) with the install hint `pip install 'litellm[stt-nvidia-riva]'`. This is a local environment problem, not a Riva service problem — no network request has been attempted.","triggerScenarios":"Calling litellm.transcription with a `riva/...` model on an environment where `import riva.client` fails: the nvidia-riva-client package was never installed, was installed in a different virtualenv/interpreter than the one running litellm, or was uninstalled during an image slimming step.","commonSituations":"Using a minimal Docker image or lambda layer that omits the optional STT extra; a CI requirements file that pins litellm but not the [stt-nvidia-riva] extra; multiple pythons on the machine with the package installed under a different one; pip install succeeded but the deploy environment was rebuilt from a stale lockfile.","solutions":["Install the optional dependency group: pip install 'litellm[stt-nvidia-riva]'.","If that extra is unavailable in your litellm version, install the SDK directly: pip install nvidia-riva-client.","Verify in the same interpreter that runs litellm: python -c \"import riva.client; print(riva.client.__file__)\".","Rebuild/redeploy the container after adding the dependency so it is baked into the image."],"exampleFix":"# before\npip install litellm\n# ...transcription(model='riva/...') -> NvidiaRivaException 500\n\n# after\npip install 'litellm[stt-nvidia-riva]'\npython -c \"import riva.client\"  # sanity check","handlingStrategy":"validation","validationCode":"import importlib.util\n\nif importlib.util.find_spec('riva.client') is None:\n    raise RuntimeError(\"nvidia-riva-client missing — run: pip install 'litellm[stt-nvidia-riva]'\")","typeGuard":"def riva_sdk_available() -> bool:\n    import importlib.util\n    return importlib.util.find_spec('riva.client') is not None","tryCatchPattern":"from litellm.llms.nvidia_riva.common_utils import NvidiaRivaException\n\ntry:\n    litellm.transcription(model='riva/...', audio_file=f, api_base=base)\nexcept NvidiaRivaException as e:\n    if 'not installed' in str(e):\n        logger.error('environment misconfigured: install litellm[stt-nvidia-riva]')\n        raise SystemExit(1)  # config error, do not retry","preventionTips":["Add the [stt-nvidia-riva] extra to the pinned requirements file next to litellm itself.","Add a startup health check that imports riva.client in the deploy environment before serving traffic.","Run the app in the same virtualenv/interpreter used to install dependencies; verify with python -m pip list."],"tags":["dependencies","nvidia-riva","import-error","speech-to-text","environment"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}