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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user