fix(audio-tool-bug): loading online non-mp3 file#6
Merged
shiqian-su merged 1 commit intomainfrom Aug 12, 2025
Merged
Conversation
…n transcription and QA functions, which caused failing in loading online non-mp3 file
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug where the audio tool was failing to load online non-MP3 audio files due to overly restrictive content type validation. The fix removes the content type checks that were preventing valid audio files from being processed.
Key changes:
- Removed content type validation logic from both
audio_transcriptionandaudio_question_answeringfunctions - Allows processing of audio files regardless of their HTTP content-type header
| raise Exception(f"Invalid content type '{content_type}'.") | ||
|
|
||
| # Get proper extension for the temporary file | ||
| file_extension = _get_audio_extension(audio_path_or_url, content_type) |
There was a problem hiding this comment.
The content_type variable is now retrieved but never used after removing the validation logic. Consider removing this line to avoid unused variable assignment.
| return f"[ERROR]: Audio question answering failed: Invalid content type '{content_type}'. Expected audio file.\nNote: Files from sandbox are not available. You should use local path given in the instruction. \nURLs must include the proper scheme (e.g., 'https://') and be publicly accessible. The file should be in a common audio format such as MP3.\nNote: YouTube video URL is not supported." | ||
|
|
||
| # Get proper extension for the temporary file | ||
| file_extension = _get_audio_extension(audio_path_or_url, content_type) |
There was a problem hiding this comment.
The content_type variable is now retrieved but never used after removing the validation logic. Consider removing this line to avoid unused variable assignment.
Zhudongsheng75
pushed a commit
to open-compass/MiroFlow
that referenced
this pull request
Dec 27, 2025
fix(audio-tool-bug): remove content type validation for audio files in transcription and QA functions, which caused failing in loading online non-mp3 file
BinWang28
added a commit
that referenced
this pull request
Mar 11, 2026
feat(agent): add context error rollback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
remove content type validation for audio files in transcription and QA functions, which caused failing in loading online non-mp3 file
Describe this PR
Checklist for PR
Must Do
feat(agent): add pdf tool via mcp,perf: make llm client asyncandfix(utils): load custom config via importlibetc. CI jobcheck-pr-titleenforces Angular commit message format to PR title.make precommitlocally. CI joblintenforce ruff default format/lint rules on all new codes.make pytest. Check test summary (located atreport.html) and coverage report (located athtmlcov/index.html) on new codes.Nice To Have
/testsforfeatandtestPR./docsfordocsandciPR.