You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] kagent install hard-requires OPENAI_API_KEY even when not using OpenAI #1622
I have searched the existing issues to avoid creating a duplicate
By submitting this issue, you agree to follow our Code of Conduct
I am using the latest version of the software
I have tried to clear cache/cookies or used incognito mode (if ui-related)
I can consistently reproduce this issue
🎯 Affected Service(s)
Not Sure
🚦 Impact/Severity
Minor inconvenience
🐛 Bug Description
The kagent install CLI currently enforces the presence of OPENAI_API_KEY, even when the user intends to use a non-OpenAI provider (e.g. Ollama, local models, or other supported providers).
This creates a misleading and blocking setup experience for users who are not using OpenAI at all.
According to the quickstart documentation, an OpenAI API key is required as part of the setup flow, but this requirement is not universally valid, since kagent supports multiple providers and OpenAI is optional.
🔄 Steps To Reproduce
kagent install --profile minimal
Without setting:
export OPENAI_API_KEY=...
🤔 Expected Behavior
The CLI exits with:
OPENAI_API_KEY is not set
Please set the OPENAI_API_KEY environment variable
This blocks installation entirely.
📱 Actual Behavior
Installation should succeed without requiring OPENAI_API_KEY when:
user is not configuring OpenAI
user intends to use another provider (e.g. Ollama)
or no model is configured at install time
💻 Environment
kagent CLI version: (0.8.4)
Kubernetes: Kind (local)
Provider: Ollama (in-cluster)
🔧 CLI Bug Report
Workaround
Users can bypass this by setting a dummy value:
export OPENAI_API_KEY=dummy
However, this is unintuitive and not documented.
🔍 Additional Context
The installer currently assumes OpenAI as a mandatory dependency, which contradicts the multi-provider design of kagent. This should be relaxed to support non-OpenAI workflows cleanly.
Hi, I've been looking into this issue and have a fix ready.
I've changed InstallCmd and InteractiveInstallCmd to emit a warning
instead of hard-exiting when the API key is not set, allowing users
on non-OpenAI providers to complete installation.
PR coming shortly — would love to get this assigned.
Activity
tmohanvamsi commentedon Apr 23, 2026
Hi, I've been looking into this issue and have a fix ready.
I've changed
InstallCmdandInteractiveInstallCmdto emit a warninginstead of hard-exiting when the API key is not set, allowing users
on non-OpenAI providers to complete installation.
PR coming shortly — would love to get this assigned.
fix(cli): recognize all providers in install and improve missing key …