Get a clear error for AI Gateway requests over 32 MiB
Shipped by Brenden Ehlers and mohamed
Inference requests, such as chat completions, messages, and embeddings, can be up to 32 MiB on every API format. A larger request gets ERR_NGROK_AI_GATEWAY_REQUEST_BODY_TOO_LONG right away, so it never reaches a provider.
Most requests are far below the limit. If you hit it, trim long conversation history or large embedded documents.
Get started
- Check the error code reference for the full error.
- If you see it, shorten the request and send it again.