[BUG] Default file constraints reject documented audio/video MIME types
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
Start in lib/crewai-files/src/crewai_files/processing/constraints.py at DEFAULT_AUDIO_FORMATS (line 40) and DEFAULT_VIDEO_FORMATS (line 61), and compare them with the AudioMimeType and VideoMimeType literals in ../core/types.py plus the AudioFile/VideoFile docstrings. Run the issue's reproduction snippet against validate_audio and validate_video to see the rejections. Done means every modelled/docstring MIME type passes the default constraints, with tests updated accordingly. Note an open pull request (#9757) already targets this, so check its state first.
索引モデルが issue の本文から書いたものです。
説明
Description
DEFAULT_AUDIO_FORMATS and DEFAULT_VIDEO_FORMATS (lib/crewai-files/src/crewai_files/processing/constraints.py:40 and :61) are the format lists used by every AudioConstraints/VideoConstraints that does not override supported_formats (OpenAI Responses and Azure audio, and the default constraints in general). They are narrower than the MIME types the library models and documents:
AudioMimeType(lib/crewai-files/src/crewai_files/core/types.py) includesaudio/x-wav,audio/mp4,audio/x-ms-wma,audio/aiffandaudio/opus; theAudioFiledocstring advertises M4A, WMA and AIFF.DEFAULT_AUDIO_FORMATShas none of them exceptaudio/m4a.- In particular
audio/x-wav- the content type Python'smimetypesreports for.wavon Windows - is rejected althoughaudio/wavis accepted. VideoMimeTypeincludesvideo/x-msvideo(AVI),video/x-matroska(MKV),video/x-flvandvideo/x-ms-wmv; theVideoFiledocstring advertises AVI, MKV, FLV and WMV.DEFAULT_VIDEO_FORMATShas none of them.
validate_audio / validate_video reject any file whose detected content type is not in supported_formats with UnsupportedFileTypeError, so a documented, modelled format is refused before the provider ever sees it. FLAC can also be reported as audio/x-flac, which the AudioMimeType literal itself does not model.
Steps to Reproduce
from types import SimpleNamespace
from crewai_files.processing.constraints import AudioConstraints, VideoConstraints
from crewai_files.processing.validators import validate_audio, validate_video
wav = SimpleNamespace(read=lambda: b"RIFF", filename="meeting.wav", content_type="audio/x-wav")
validate_audio(wav, AudioConstraints(max_size_bytes=10 * 1024 * 1024))
avi = SimpleNamespace(read=lambda: b"RIFF", filename="demo.avi", content_type="video/x-msvideo")
validate_video(avi, VideoConstraints(max_size_bytes=10 * 1024 * 1024))
The first call raises UnsupportedFileTypeError: Audio format 'audio/x-wav' is not supported. ... and the second does the same for video/x-msvideo, although both are valid types the library models.
Expected Behavior
The default constraints accept every MIME type listed in the AudioMimeType / VideoMimeType literals and advertised by the AudioFile / VideoFile docstrings, so a documented format is not rejected by the default validation path.
AI assistance
I used an AI coding agent to investigate, reproduce, and prepare this report, and reviewed its results. Per CONTRIBUTING.md, please apply the llm-generated label; external contributors cannot add it with my current permissions.
- 主要言語
- Python
- スター
- 61.2k
- フォーク
- 9.2k
- 平均マージ
- 1日 14時間
- マージ済み PR(30日)
- 180
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
crewAIInc/crewAI のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
[FEATURE] Add Straitly as a native OpenAI-compatible LLM provider対応中かも @HashimSyedUBC が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[BUG] Native OpenAI sync streaming with response_model returns an empty string and emits no completed event when the parse is missing対応中かも @basil-k-aji-dev が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
[BUG] Native Azure provider ignores the seed setting対応中かも @basil-k-aji-dev が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
crewAIInc/crewAI#9787 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] LiteLLM path reports 0 cached and reasoning tokens in the usage summary対応中かも @basil-k-aji-dev が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
crewAIInc/crewAI の issue をすべて見る
似ている issue
-
bug harness
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mruangutai/harness#2687 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
modal-labs/modal-client#4158 ·
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 72/100
The-Swarm-Corporation/swarms-rs#168 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] SMTP listener now binds to EMAIL_PORT instead of 2525 since the gunicorn switch 5.0.3-ls373オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
linuxserver/docker-healthchecks#137 · コメント 1 件 ·