{"record":{"id":"b85e52add44a2a0e","repo":"zylon-ai/private-gpt","slug":"audio-blocks-found-but-no-audio-capable-llm-provid","errorCode":null,"errorMessage":"Audio blocks found but no audio-capable LLM provided.","messagePattern":"Audio blocks found but no audio-capable LLM provided\\.","errorType":"exception","errorClass":"ValueError","httpStatus":400,"severity":"error","filePath":"private_gpt/components/chat/processors/chat_history/multimodality/audio_preprocessor.py","lineNumber":59,"sourceCode":"        Preprocessed message with audio content converted to text descriptions\n\n    Raises:\n        ValueError: If audio preprocessing fails or required capabilities are missing\n    \"\"\"\n    needs_audio_preprocessing = requires_audio_preprocessing(\n        main_llm, audio_multimodal_llm\n    )\n    if not needs_audio_preprocessing:\n        yield AudioProcessingResponse(message=message)\n        return\n\n    audio_blocks = extract_audio_blocks(message)\n    if not audio_blocks:\n        yield AudioProcessingResponse(message=message)\n        return\n\n    if audio_multimodal_llm is None:\n        raise ValueError(\"Audio blocks found but no audio-capable LLM provided.\")\n\n    event = MultimodalProcessingStatus(status=\"processing\", type=\"audio\")\n    yield AudioProcessingResponse(processing_status=event)\n\n    try:\n        audio_description = await process_audio_in_message(\n            audio_multimodal_llm, message, user_query=message.content, **kwargs\n        )\n\n        if not audio_description:\n            raise ValueError(\"Failed to describe audio in the message.\")\n\n        event = event.model_copy(\n            update={\n                \"status\": \"completed\",\n                \"content\": audio_description,\n            }\n        )","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/zylon-ai/private-gpt/blob/4a030776a31a901ad80b1bf4d7faa2c1a367efbb/private_gpt/components/chat/processors/chat_history/multimodality/audio_preprocessor.py#L41-L77","documentation":"The audio preprocessor detected audio blocks in the incoming message (needs_audio_preprocessing was true, extract_audio_blocks non-empty) but audio_multimodal_llm is None — no audio-capable LLM was wired into the component. Transcription cannot proceed, so it fails fast instead of silently dropping the audio.","triggerScenarios":"Sending a chat message containing AudioBlock content while the audio multimodal LLM was not configured/injected into the audio preprocessor's run().","commonSituations":"Deployment enables multimodal ingestion but never configures the audio model in settings; DI wiring returns None because the audio LLM profile is unset; clients uploading audio to a text-only deployment.","solutions":["Configure an audio-capable multimodal LLM in settings so audio_multimodal_llm is provided","Reject audio uploads at the API edge with a 415/400 when the deployment has no audio model","If audio is not supported, block audio blocks client-side so this path is never reached"],"exampleFix":"# before (settings): no audio multimodal llm configured\n\n# after\n# settings.yaml\nmultimodality:\n  audio_llm: \"my-audio-model\"","handlingStrategy":"validation","validationCode":"audio_blocks = extract_audio_blocks(message)\nif audio_blocks and audio_multimodal_llm is None:\n    raise HTTPException(400, \"Audio uploads are not supported by this deployment\")","typeGuard":"def can_process_audio(message: ChatMessage, llm) -> bool:\n    return not extract_audio_blocks(message) or llm is not None","tryCatchPattern":"try:\n    async for resp in audio_preprocessor.run(message, ...):\n        ...\nexcept ValueError as e:\n    if \"no audio-capable LLM\" in str(e):\n        return 400, \"audio not supported\"  # surface as client error, not 500\n    raise","preventionTips":["Gate audio uploads at the API layer based on deployment capabilities","Fail startup checks when ingestion allows audio but no audio LLM is configured","Advertise supported modalities to clients so they never send unsupported blocks"],"tags":["multimodal","audio","configuration","llm"],"backgroundTag":null,"analyzedSha":"4a030776a31a901ad80b1bf4d7faa2c1a367efbb","analyzedAt":"2026-08-15T03:51:26.951Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}