run: npm run dev everything is OK
but npm run build, then npm run start it was wrong:
ERROR: Error event thrown: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
component: "remote-actions.remote-lg-action.streamEvents"
endpoint: {
"deploymentUrl": "http://localhost:8124",
"langsmithApiKey": "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",
"agents": [
{
"name": "sample_agent",
"description": "A helpful LLM agent."
}
],
"type": "langgraph-platform"
}
err: {
"type": "Error",
"message": "Error event thrown: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable",
"stack":
Error: Error event thrown: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
at streamEvents (D:\git-project\open-mcp-client1.next\server\app\api\copilotkit\route.js:477:655)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.start (D:\git-project\open-mcp-client1.next\server\app\api\copilotkit\route.js:471:24693)
}