#6960: feat: Add kimi-coding provider support
app: web-ui
agents
Cluster:
Kimi Model Enhancements
## 🎯 Summary
This PR adds support for the **kimi-coding** provider, enabling direct API access to Kimi Code K2.5 model for users in China region.
## 🐛 Problems Fixed
1. **Missing Provider**: provider was completely missing from the codebase
2. **Incorrect Base URL**: Initial attempt used non-existent `https://api.kimi.com/v1` (404)
3. **Wrong Model ID**: Used `k2p5` which doesn't exist
4. **API Key Reference**: Fixed environment variable reference format
## ✅ Changes
### Code Changes
- Added `buildKimiCodingProvider()` function in `src/agents/models-config.providers.ts`
- Added `KIMI_CODING_*` constants for API configuration
- Integrated `kimi-coding` provider in `resolveImplicitProviders()`
- Updated UI data file `ui/src/ui/data/moonshot-kimi-k2.ts` with `KIMI_CODING_MODELS`
### Configuration
- **Base URL**: `https://api.moonshot.cn/v1` (China region endpoint)
- **Model ID**: `kimi-k2.5` (correct model identifier)
- **API Key**: Supports `KIMI_API_KEY` environment variable
- **Context Window**: 256,000 tokens
- **Max Tokens**: 8,192 tokens
## 🧪 Testing
- ✅ Lint checks passed
- ✅ Build successful
- ✅ Model appears in `openclaw models list` with `Auth: yes`
- ✅ API endpoint verified (China region)
- ⚠️ Live API test showed server overload (temporary Moonshot API issue, not configuration problem)
## 📝 Usage
```bash
# Set API key
openclaw config set env.KIMI_API_KEY "your-api-key"
# List models
openclaw models list --all | grep kimi-coding
# Use the model
openclaw message send --model kimi-coding/kimi-k2.5 --message "Hello" --target telegram
```
## 🔗 Related
- Complements existing Moonshot provider
- Enables multi-model collaboration with other Kimi variants
- Follows the same pattern as other API providers in the codebase
Closes #(issue-number-if-any)
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a new implicit `kimi-coding` provider alongside existing Moonshot support by wiring it into `resolveImplicitProviders()` and defining a new provider config (base URL `https://api.moonshot.cn/v1`, OpenAI-compatible API) plus UI model catalog entries.
Most of the change follows existing provider patterns (hardcoded baseUrl + a default model list). The key risk is correctness of how auth is plumbed and whether the model id aligns with the rest of the codebase/docs/onboarding flows for Kimi Coding.
<h3>Confidence Score: 2/5</h3>
- Not safe to merge as-is due to a likely env API key resolution bug and inconsistent Kimi Coding model IDs.
- `resolveImplicitProviders()` currently uses the env var *name* (e.g. `KIMI_API_KEY`) as the `apiKey` value, which will break authentication when the provider is sourced from env. Additionally, the PR changes Kimi Coding’s model id to `kimi-k2.5` while other parts of the repo still reference `k2p5`, which risks broken onboarding/defaults and model selection.
- src/agents/models-config.providers.ts (auth resolution + provider defaults); also audit `src/commands/onboard-auth.models.ts` and docs that still reference `kimi-coding/k2p5`.
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#4459: fix: enable image input for Kimi K2.5 and refresh stale config mode...
by manikv12 · 2026-01-30
83.9%
#21911: Enable `reasoning: true` for Kimi models
by ighostych · 2026-02-20
83.2%
#9024: Fix/Moonshot Provider Issue with kimi-k2-thinking Model Role Mappin...
by fotorpics · 2026-02-04
81.3%
#6454: fix: enable reasoning flag for Kimi K2.5 in Moonshot provider (#6451)
by coupclawbot · 2026-02-01
80.9%
#15117: feat: add Kimi (Moonshot AI) as web_search provider
by adshine · 2026-02-13
80.9%
#7570: fix: allow models from providers with auth profiles configured
by DonSqualo · 2026-02-03
79.9%
#5947: Feature/kimi reasoning support
by zzjj7000 · 2026-02-01
78.7%
#6015: CLI: clarify Moonshot AI/Kimi auth option labels based on user feed...
by xxr3376 · 2026-02-01
78.1%
#12063: feat: add Moonshot (Kimi K2.5) native video understanding provider
by xiaoyaner0201 · 2026-02-08
77.8%
#14187: fix: add Moonshot AI to non-standard provider detection
by shad0wca7 · 2026-02-11
77.2%