Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

fix(server): missing timeout on all requests.get() calls — potential indefinite hang

Đang mở
#64 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu trong minimax_mcp/server.py và kiểm tra sáu vị trí gọi requests.get() được liệt kê trong voice_clone(), play_audio(), generate_video(), query_video_generation() và text_to_image(). Sử dụng các tiêu chí chấp nhận làm checklist: mọi lệnh gọi đều có timeout tường minh, các lượt tải xuống lớn được stream khi thích hợp, và các lỗi timeout được bắt lại rồi báo cho người dùng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

Multiple requests.get() calls throughout server.py have no timeout parameter, which can cause the server to hang indefinitely if the remote server is unresponsive.

Exact locations

All in minimax_mcp/server.py:

  1. voice_clone() — requests.get(file) for URL download (line ~175)
  2. voice_clone() — requests.get(response_data.get("demo_audio")).content (line ~205)
  3. play_audio() — requests.get(input_file_path).content (line ~220)
  4. generate_video() — requests.get(download_url) for video download (line ~330)
  5. query_video_generation() — requests.get(download_url) (line ~365)
  6. text_to_image() — requests.get(image_url) for image download (line ~410)

Impact

  • MCP server can hang indefinitely waiting for a response
  • No way to recover without killing the process
  • Blocks the entire MCP tool pipeline

Proposed solution

Add a module-level constant and apply to all requests.get() calls:

# At module level
DOWNLOAD_TIMEOUT = 120  # seconds

# Apply everywhere:
requests.get(url, timeout=DOWNLOAD_TIMEOUT)

Also consider adding stream=True for large downloads (video) to avoid loading entire file into memory.

Acceptance criteria

  • Every requests.get() call has an explicit timeout parameter
  • Large file downloads use streaming where appropriate
  • Timeout errors are caught and reported to the user
Ngôn ngữ chính
Python
Star
1.6k
Fork
283
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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của MiniMax-AI/MiniMax-MCP

Tất cả issue của MiniMax-AI/MiniMax-MCP

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.