mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
9aac779c51
The opengenui route used the nonexistent model id "openai/gpt-5.2", causing every chat turn to error. Switch to "openai/gpt-4o", the verified-real id used by the sibling showcase/shell copilotkit route. The example's API routes import @copilotkit/runtime/v2 (a server-only package), but next.config.ts lacked serverExternalPackages, so Next.js attempted to bundle it. Add serverExternalPackages: ["@copilotkit/runtime"] (base package name covers the /v2 subpath), mirroring showcase/shell/next.config.ts.
14 lines
590 B
TypeScript
14 lines
590 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
// Disable React strict mode to prevent double-rendering issues with MCP Apps
|
|
// The MCPAppsActivityRenderer creates duplicate iframes in strict mode
|
|
reactStrictMode: false,
|
|
// The API routes import @copilotkit/runtime/v2 (server-only); keep it external
|
|
// so Next.js does not try to bundle it. Base package name covers the /v2 subpath.
|
|
serverExternalPackages: ["@copilotkit/runtime"],
|
|
// Note: NOT using standalone mode - hono/vercel adapter requires regular next start
|
|
};
|
|
|
|
export default nextConfig;
|