HTTP 413 (Payload Too Large) when using Browser MCP screenshot with DeepSeek V4.1 Flash (GOAT plan)

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github
Lĩnh vực
backend-api-design

Hướng nghiên cứu

Start by locating the /v1/chat/completions request path and the proxy or gateway configuration that handles its body size. Then trace how screenshot tool results and accumulated agent history are sent, and check the project’s existing tests for large request payloads. Done means reproducing the 413 and confirming the chosen handling lets the request complete without losing needed image context.

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

Mô tả

Bug Description

When using the Command Code API (via GOAT plan) with the Zed code editor and Browser MCP (browsermcp.browser_screenshot), requests frequently fail with HTTP 413 (Payload Too Large), resulting in the Zed AI assistant error: "Request Failed: The provider rejected this request".

Root Cause

Browser MCP captures screenshots at high/Retina resolution (e.g. 1568x849 or higher) and encodes them as raw base64 strings in the request body.

  1. When combined with agent history, the total request payload size exceeds the upstream reverse-proxy/Cloudflare limit (typically ~10 MB).
  2. Furthermore, Zed's agent loop resends the full accumulated history (including past base64 images) on subsequent turns, compounding the payload size and causing permanent thread lock/compaction failure.

Environment & Logs

  • Plan: GOAT Plan
  • Model: deepseek/deepseek-v4.1-flash
  • Client: Zed Editor + Browser MCP
  • CPA / Proxy Log Sample:
[2026-11-07 19:52:30] [4f23fbf1] [warn ] [gin_logger.go:111] 413 |        7.017s |             ::1 | POST    "/v1/chat/completions"

Suggested Improvements

  1. Increase or adjust upstream proxy limits (client_max_body_size) on Cloudflare/gateway for multimodal/vision requests.
  2. Provide guidance or automatic downscaling/compression options for base64 image attachments in tool results.
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
4.2k
Fork
377
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
6

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 CommandCodeAI/command-code

Tất cả issue của CommandCodeAI/command-code

Issue tương tự

Thêm issue về Backend & API Design

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.