Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

perf: limit max length of trpc batch requests (#1966)

Marc Klingena88764db7ead
diff --git a/web/src/utils/api.ts b/web/src/utils/api.ts
index ceb22dc391..cd0dadc860 100644
--- a/web/src/utils/api.ts
+++ b/web/src/utils/api.ts
@@ -60,6 +60,7 @@ export const api = createTRPCNext<AppRouter>({
// when condition is false, use batching
false: httpBatchLink({
url: `${getBaseUrl()}/api/trpc`,
+ maxURLLength: 2083, // avoid too large batches
}),
}),
],
@@ -87,6 +88,7 @@ export const directApi = createTRPCProxyClient<AppRouter>({
}),
httpBatchLink({
url: `${getBaseUrl()}/api/trpc`,
+ maxURLLength: 2083, // avoid too large batches
}),
],
});