mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
8483f434f7
CopilotKitIntelligence resolves apiUrl/wsUrl to the managed hosts when they are omitted, and its own docstring says leaving both unset is always correct against the managed service. Every starter's runtime route supplied `?? "http://localhost:4201"` instead, so a managed reader who copied the block got a runtime aimed at a local stack that is not running -- the failure the starter's own .env.example warns about two files away. Replace the fallbacks with the conditional spread these same starters already use in channel-host.mts, so a self-hosted override still works and the managed default applies when it is absent. Three .env.example files also set the values uncommented, two of them directly under a comment telling the reader to leave them unset; comment those out to match the other nineteen starters. Guard both shapes in validate-intelligence-env-names.ts, which already polices the canonical Intelligence key name and hosts and runs unfiltered on every PR. The rule is the pattern rather than the literal, so a staging host substituted for localhost fails the same way. Local e2e harnesses and demo stacks that genuinely target a local deployment are allowlisted with their reasons. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
13 lines
538 B
Bash
13 lines
538 B
Bash
OPENAI_API_KEY=your-api-key-here
|
|
AGENT_URL=http://localhost:8000/
|
|
|
|
# Optional: enable CopilotKit Intelligence Threads locally
|
|
COPILOTKIT_LICENSE_TOKEN=
|
|
INTELLIGENCE_API_KEY=
|
|
# INTELLIGENCE_API_URL and INTELLIGENCE_GATEWAY_WS_URL point at a self-hosted
|
|
# or local Intelligence deployment only — leave them unset when using managed
|
|
# Intelligence, or the channel host and runtime will try to reach a local
|
|
# stack that usually is not running.
|
|
# INTELLIGENCE_API_URL=http://localhost:4201
|
|
# INTELLIGENCE_GATEWAY_WS_URL=ws://localhost:4401
|