[BUG] Default file constraints reject documented audio/video MIME types
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 61.2k
- Fork
- 9.2k
- Merge trung bình
- 1 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 180
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của crewAIInc/crewAI
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[FEATURE] Add Straitly as a native OpenAI-compatible LLM providerCó thể đã có người làm @HashimSyedUBC đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Native OpenAI sync streaming with response_model returns an empty string and emits no completed event when the parse is missingCó thể đã có người làm @basil-k-aji-dev đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Native Azure provider ignores the seed settingCó thể đã có người làm @basil-k-aji-dev đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
crewAIInc/crewAI#9787 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] LiteLLM path reports 0 cached and reasoning tokens in the usage summaryCó thể đã có người làm @basil-k-aji-dev đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của crewAIInc/crewAI
Issue tương tự
-
[BUG] SMTP listener now binds to EMAIL_PORT instead of 2525 since the gunicorn switch 5.0.3-ls373Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
linuxserver/docker-healthchecks#137 · 1 bình luận ·
-
RequirementAgent treats list -> add -> list as a tool call cycle and drops the second list call (Python)Có thể đã có người làm @chaitanya0305 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
i-am-bee/beeai-framework#2049 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
fedora-infra/anitya#2272 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
unitaryfoundation/mitiq#3205 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
[Bug]: Index worker test drops empty Git config values on WindowsCó thể đã có người làm @xiaoyesoso đã nhận hôm nay. Đang mởtriage/confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
agentscope-ai/agentscope#4377 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày