We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d745fb commit ffc8023Copy full SHA for ffc8023
1 file changed
showcase/integrations/built-in-agent/src/app/api/copilotkit/route.ts
@@ -13,17 +13,9 @@ const runtime = new CopilotRuntime({
13
const handler = createCopilotRuntimeHandler({
14
runtime,
15
basePath: "/api/copilotkit",
16
+ mode: "single-route",
17
});
18
-async function withProbeCompat(req: Request): Promise<Response> {
19
- const res = await handler(req);
20
- if (res.status === 404) {
21
- const body = await res.text();
22
- return new Response(body, { status: 400, headers: res.headers });
23
- }
24
- return res;
25
-}
26
-
27
export const GET = (req: Request) => handler(req);
28
-export const POST = (req: Request) => withProbeCompat(req);
+export const POST = (req: Request) => handler(req);
29
export const OPTIONS = (req: Request) => handler(req);
0 commit comments