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

Aperta
#1,119 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
github

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
Nessun dato sulla lingua
Stelle
4.2k
Fork
377
Merge medio
1g 3h
PR unite (30g)
6

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CommandCodeAI/command-code

Tutte le issue di CommandCodeAI/command-code

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.