fix(proxy): raise Next client body limit to 128MB (configurable)

Avoid 10MB truncation of large /v1 payloads via NINEROUTER_PROXY_CLIENT_MAX_BODY_SIZE (#1529, #1572)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Delcado19
2026-06-06 12:34:43 +07:00
committed by decolua
parent 4fc02e67e5
commit 2be00e2a78

View File

@@ -7,6 +7,7 @@ const projectRoot = dirname(fileURLToPath(import.meta.url));
const tracingRoot = process.env.NEXT_TRACING_ROOT_MODE === "workspace"
? join(projectRoot, "..")
: projectRoot;
const proxyClientMaxBodySize = process.env.NINEROUTER_PROXY_CLIENT_MAX_BODY_SIZE || "128mb";
/** @type {import('next').NextConfig} */
const nextConfig = {
@@ -24,6 +25,10 @@ const nextConfig = {
unoptimized: true
},
env: {},
experimental: {
// #1529/#1572: LLM clients can send long context or base64 image payloads through /v1 rewrites.
proxyClientMaxBodySize,
},
webpack: (config, { isServer }) => {
// Ignore fs/path modules in browser bundle
if (!isServer) {