diff --git a/next.config.mjs b/next.config.mjs index 85c7a258..3853b4b0 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -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) {