Skip to content

The api_key client option must be set either by passing api_key to the client #22

@sy-l123

Description

@sy-l123

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)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions