[Bug for MCP&API]: Slashes in text break local output file saving
Đá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
- 88/100
Hướng nghiên cứu
Bắt đầu trong minimax_mcp/utils.py tại build_output_file(), sau đó kiểm tra đường dẫn lưu cục bộ trong minimax_mcp/server.py. Tái hiện sự cố bằng script TemporaryDirectory được cung cấp và thêm một bài kiểm thử hồi quy bao quát văn bản có dấu gạch chéo kiểu ngày tháng. Hoàn tất có nghĩa là cả hai định dạng ngày tháng đều tạo tệp trực tiếp bên trong thư mục đầu ra được yêu cầu và việc ghi thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Text starting with a date like 2026/10/03 breaks local output saving for
text_to_audio (MINIMAX_API_RESOURCE_MODE=local).
build_output_file() takes the first 10 characters and only replaces spaces.
The result is t2a_2026/10/03_<timestamp>.mp3. The slashes are treated as path
separators, but those directories don't exist. Changing the date to 2026-10-03
lets the file save normally.
Reproduction
Run this from the repository root with the Python dependencies installed. It
imports the unmodified utility and writes test bytes directly to a temporary
directory, without calling the API. Both inputs use the same absolute output
path, which also avoids the separate path-joining issue.
from pathlib import Path
from tempfile import TemporaryDirectory
from minimax_mcp.utils import build_output_file, build_output_path
records = []
with TemporaryDirectory() as directory:
output_path = build_output_path(str(Path(directory) / "output"))
for text in ("2026-10-03", "2026/10/03"):
output_file = build_output_file("t2a", text, output_path, "mp3")
output_path.parent.mkdir(parents=True, exist_ok=True)
try:
with open(output_path / output_file, "wb") as stream:
stream.write(b"local write probe")
result = "saved"
except OSError as error:
result = type(error).__name__
parent_matches = output_file.parent == output_path
print(text, "parent_matches:", parent_matches, "write:", result)
records.append({"text": text, "parent_matches": parent_matches, "write": result})
Both runs gave this output:
2026-10-03 parent_matches: True write: saved
2026/10/03 parent_matches: False write: FileNotFoundError
Both inputs should save directly inside the requested directory.
Environment
Windows, Python 3.11.9, package version 0.0.19 at
0856b9aef8a9d676bb63bdd6b6426d7b640a3b7a.
Models used and Trace-ID: N/A (local reproduction, no request).
The relevant code is filename construction
and the local audio save path.
I've checked the Python/JS READMEs, MCP guide and existing issues. #73/#74 address
repeated path joining, and #92 covers nested-directory writability; none changes
how text becomes a filename.
Would you be open to a small fix that replaces path separators in the text,
keeps ordinary Unicode characters, and adds a file-write regression test?
- Ngôn ngữ chính
- Python
- Star
- 1.6k
- Fork
- 284
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 MiniMax-AI/MiniMax-MCP
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
MiniMax-AI/MiniMax-MCP#89 · 1 bình luận ·
-
bug(server): text_to_audio validates text outside try/except, inconsistent with other toolsCó thể đã có người làm @cnYui đã nhận 122 ngày trước. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
MiniMax-AI/MiniMax-MCP#88 ·
-
Information disclosure for `play_audio`Có thể đã có người làm @TumCucTom đã nhận 128 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
MiniMax-AI/MiniMax-MCP#78 ·
-
fix(server): music_generation has inconsistent indentation — try block indented inside function bodyCó thể đã có người làm @TumCucTom đã nhận 128 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
MiniMax-AI/MiniMax-MCP#69 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
MiniMax-AI/MiniMax-MCP#105 · 1 bình luận ·
Tất cả issue của MiniMax-AI/MiniMax-MCP
Issue tương tự
-
changelog investigate
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
ramnes/notion-sdk-py#409 ·
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
lindicaphxag-tech/kaggle#28 ·
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 62/100
BSData/horus-heresy-3rd-edition#3211 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug tests
Độ 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