KOMU uses a shared provider abstraction for planning, explanation, and repair reasoning. Providers can influence planning, but they do not bypass playbook preference, risk review, approval flow, or execution transparency.
Current built-in providers:
| Provider | Key | Scope | Default trust | Typical fit |
|---|---|---|---|---|
| OpenCode | opencode |
remote / stub-friendly | trusted | balanced general planning |
| DeepSeek | deepseek |
remote / stub-friendly | trusted | diagnostics and repair reasoning |
| Kimi | kimi |
remote / stub-friendly | trusted | long-context runbooks and workflow planning |
| GLM-5 | glm5 |
remote / stub-friendly | trusted | fast drafts and fallback |
| Ollama | ollama |
local or self-hosted | restricted | local model use and privacy-sensitive workflows |
| OpenAI-Compatible | openai-compatible |
local or remote | restricted or untrusted | self-hosted gateways and custom OpenAI-style endpoints |
| Claude | claude |
hosted API | trusted | long-context hosted reasoning |
| OpenAI | openai |
hosted API | trusted | ChatGPT / OpenAI API access |
| Gemini | gemini |
hosted API | trusted | hosted general-purpose reasoning |
Every provider adapter plugs into the same provider layer and exposes:
- a
ProviderDescriptor - deployment metadata
- trust level metadata
- supported use cases
- capability metadata
- configuration validation
- health check behavior
- shared request / response models
- suitability scoring for routing
Current provider use cases:
planningexplanationrepair
KOMU now tracks a provider trust posture:
trustedrestricteduntrusted
This is not marketing language. It affects how much executable influence a provider gets.
-
trusted- normal provider participation
- provider output still goes through the plan model, risk engine, and approval flow
-
restricted- provider can still help with planning and explanation
- sensitive tasks are treated more cautiously
- executable suggestions may be suppressed for sensitive tasks
-
untrusted- provider can still contribute reasoning
- executable command suggestions are suppressed by default
- sensitive planning/repair tasks are blocked unless trust is explicitly raised
- official hosted providers default to
trusted - local/self-hosted providers default to
restricted - remote custom OpenAI-compatible endpoints default to
untrusted
This is the main safeguard against treating an arbitrary custom endpoint like a fully trusted built-in provider.
KOMU does not treat provider output as execution-ready authority.
Current sandboxing behavior includes:
- context minimization before provider calls
- sensitive key/value removal from provider context
- prompt sanitization for obvious secret-like content
- response shape validation
- bounded plan-step extraction
- bounded command suggestion count
- trust-aware suppression of executable suggestions
- no direct provider-to-execution path
Even a trusted provider still passes through:
- plan construction
- risk review
- approval requirements
- operator-visible execution flow
KOMU tracks provider capability metadata instead of treating all providers as interchangeable.
Current capability dimensions include:
- planning support
- explanation support
- repair reasoning support
- long-context suitability
- fast drafting suitability
- local or self-hosted friendliness
- offline suitability
- remote API dependence
- fallback priority
Inspect the matrix with:
komu providers capabilitiesKOMU supports explicit provider health checks:
komu providers health
komu providers check ollama
komu providers check openai-compatibleHealth output now distinguishes:
- trust level
- readiness
- configuration validity
- reachability
- model availability when practical
- failure kind when a check fails
Typical readiness states:
readyrestrictedneeds-configurationunavailable
Failure classes now distinguish:
- configuration problems
- authentication rejection
- network or reachability failure
- model availability problems
- malformed or unusable provider responses
Use local or self-hosted providers when you want:
- stronger data locality
- less dependence on public APIs
- compatibility with self-hosted inference
- a path for lab, private, or offline-ish workflows
Best current options:
ollamaopenai-compatible
Use hosted API providers when you want:
- stronger hosted model quality
- less local setup
- better fit for weaker local hardware
- standard SaaS API flows
Best current options:
claudeopenaigemini
Automatic routing considers:
- requested use case
- provider capability metadata
- provider trust level
- local vs remote deployment
- current configuration validity
- cached health-check state
- recent provider failures
- task wording hints
- explicit provider choice
Examples:
- diagnostic / repair wording tends to favor
deepseek - long-context workflow wording can favor
kimi,claude, orgemini - local or offline wording can favor
ollama - OpenAI-style gateway wording can favor
openai-compatible
Manual provider selection still works. If the chosen provider is unsuitable, KOMU retains fallback candidates instead of crashing immediately.
Provider generation follows a controlled candidate chain:
- select a preferred provider
- evaluate trust, readiness, and suitability
- prepare a sanitized provider request
- validate provider response shape
- suppress executable influence when trust requires it
- record failures without leaking secrets
- move to the next candidate if needed
Fallback is recorded in:
- provider selection metadata
- task history
- session events
- audit logs
Provider settings are stored through provider settings plus environment variables.
Preferred order:
- real shell environment variables
- optional keyring backend
.envfor local convenience only
Not recommended:
- storing raw API keys directly in
config.json
If KOMU detects plaintext secret-like fields in local config storage, it now warns about that risk.
KOMU can optionally read secrets through Python keyring support.
Enable it with:
KOMU_SECRET_BACKEND=keyringKOMU looks up keyring entries using the env-var reference names as the credential names, under the service name:
komu-cliby default
You can override that with:
KOMU_KEYRING_SERVICE
If keyring is requested but not installed, KOMU reports that clearly and falls back safely.
Environment variables:
KOMU_OLLAMA_BASE_URLKOMU_OLLAMA_MODELKOMU_OLLAMA_TIMEOUTKOMU_OLLAMA_TRUST
Typical setup:
KOMU_OLLAMA_BASE_URL=http://127.0.0.1:11434
KOMU_OLLAMA_MODEL=llama3.1:8b
KOMU_OLLAMA_TRUST=restrictedEnvironment variables:
KOMU_OPENAI_COMPAT_BASE_URLKOMU_OPENAI_COMPAT_API_KEYKOMU_OPENAI_COMPAT_MODELKOMU_OPENAI_COMPAT_TIMEOUTKOMU_OPENAI_COMPAT_TRUST
This adapter is meant for:
- self-hosted gateways
- local inference servers
- private internal API fronts
- third-party services that expose an OpenAI-style API
Important:
- local endpoints usually start restricted
- remote custom endpoints default to a lower-trust posture unless trust is explicitly raised
Environment variables:
KOMU_CLAUDE_API_KEYANTHROPIC_API_KEYKOMU_CLAUDE_BASE_URLKOMU_CLAUDE_MODELKOMU_CLAUDE_TIMEOUT
Environment variables:
KOMU_OPENAI_API_KEYOPENAI_API_KEYKOMU_OPENAI_BASE_URLKOMU_OPENAI_MODELKOMU_OPENAI_TIMEOUT
Environment variables:
KOMU_GEMINI_API_KEYGEMINI_API_KEYGOOGLE_API_KEYKOMU_GEMINI_BASE_URLKOMU_GEMINI_MODELKOMU_GEMINI_TIMEOUT
Environment variables remain available for:
KOMU_OPENCODE_API_KEYKOMU_DEEPSEEK_API_KEYKOMU_KIMI_API_KEYKOMU_GLM5_API_KEY
Prefer:
- hosted APIs for heavy reasoning
openai-compatibleonly when the local model or endpoint is lightweightollamaonly if the machine can handle the selected model comfortably
Prefer:
ollamafor local-first workflowsopenai-compatiblefor custom inference gateways- hosted providers as fallback for harder reasoning or broader model quality
Today a sensible default strategy is:
- keep
opencodeas a general default - turn on auto routing only after provider health checks pass
- add
deepseekfor diagnostics-heavy workflows - add
claude,openai, orgeminifor hosted reasoning - add
ollamaoropenai-compatiblewhen you want a local or private path
To add a future provider cleanly:
- implement the shared adapter contract
- define descriptor metadata
- expose capability and trust metadata
- add configuration validation and health check behavior
- register the adapter in the provider registry
- document required env/config variables
The provider layer is intentionally isolated so future adapters can be added without rewriting the CLI surface or the planning stack.