feat: Add Moonshot (Kimi) provider and documentation improvements#1246
feat: Add Moonshot (Kimi) provider and documentation improvements#1246nKOxxx wants to merge 23 commits intoruvnet:mainfrom
Conversation
Add 'moonshot' to the LLMProvider union type and define Kimi model variants (kimi-k2-5, kimi-k2, kimi-k2-thinking). This enables Moonshot AI as a supported provider in the multi-LLM orchestration system.
Add MoonshotProvider to public exports and update module documentation to include Moonshot in supported providers list.
Add MoonshotProvider to the provider factory switch statement, enabling automatic provider instantiation from configuration.
Add complete Moonshot provider implementation supporting: - Kimi K2.5, K2, and K2 Thinking models - 256k context length - Streaming and non-streaming completions - Cost tracking with competitive pricing - Health checks and proper error handling - OpenAI-compatible API integration Enables multi-LLM orchestration with Moonshot as a first-class provider alongside Anthropic, OpenAI, etc.
Update GitHub repository links from claude-flow to ruflo: - Fix badge links to point to ruvnet/ruflo - Update CDN install script URLs - Fix documentation links Note: npm package remains claude-flow (not renamed) Config files and CLI commands unchanged
Add example environment file with all supported provider API keys and configuration options. Makes it easier for new users to get started with proper configuration.
Add basic contribution guidelines with setup instructions, testing commands, and submission process. Helps new contributors get started quickly.
Add scripts/health-check.sh for quick installation verification. Checks Node.js, npm, Ruflo CLI, and environment variables. Helps users troubleshoot setup issues.
Add simple mock LLM provider implementation for use in tests. Makes it easier to test components without calling real APIs or needing API keys.
Add common development patterns to .gitignore: - Local environment files (.env) - Log files and directories - Build artifacts - Temporary directories
Add SECURITY.md with: - Supported versions table - Vulnerability reporting process - Response timeline commitments - Security best practices - Environment variable guidance - Local development security tips - Security audit results Helps users and security researchers understand how to report issues responsibly.
Update settings generator to default to Kimi models: - Default model: kimi-k2-5 (instead of claude-opus-4-6) - Routing model: kimi-k2 (instead of claude-haiku) - Add MOONSHOT_API_KEY to environment config template - Update comments to reference Kimi capabilities This makes the fork Kimi-first while maintaining support for other providers as fallbacks.
- Update tagline to highlight Moonshot/Kimi as default - Add star indicator for Moonshot in supported providers - Maintain mention of other supported providers - Position as multi-LLM with Kimi as primary
Add config/kimi-default.json with: - Moonshot as priority 1 provider (default) - Anthropic as priority 2 (fallback) - Kimi model routing preferences - Cost-optimized routing strategy Makes it easy to start with Kimi-first setup.
Put MOONSHOT_API_KEY first as the required/default provider. Add DEFAULT_PROVIDER and DEFAULT_MODEL environment variables. Keep other providers as optional fallbacks.
Add KIMI_QUICKSTART.md with: - Moonshot API key setup instructions - Available Kimi models overview - Configuration examples - How to use other providers as fallbacks - Why Kimi as default explanation
Fix BaseProvider initialization to match other providers: - Move API key setup to doInitialize() method - Use this.config.apiKey/apiUrl instead of options - Update complete() to check apiKey directly - Remove custom validate() in favor of doInitialize() This fixes the 'Cannot read properties of undefined' error when initializing the provider.
Moonshot uses different endpoints for different regions: - api.moonshot.cn for China users - api.moonshot.ai for international users Update baseUrl to use the .ai endpoint which works with international API keys.
API uses dot notation, not dashes: - kimi-k2.5 (not kimi-k2-5) - kimi-k2-turbo-preview (not kimi-k2) - kimi-k2-thinking Also updated pricing and capabilities to match. Fixes 'resource_not_found_error' when using incorrect model names.
Use correct API model names: - Default: kimi-k2.5 - Routing: kimi-k2-turbo-preview
Moonshot API rejects temperature values other than 1 for some models. Only include these params in the request if user explicitly sets them. Fixes 'invalid temperature' error.
Prevent accidental commits of test files that might temporarily contain sensitive data during development. test-moonshot-live.ts and test-moonshot-isolated.ts are now ignored by git.
Complete rebrand of the fork: - Package name: anthill - Product name: Anthill - CLI commands: anthill (instead of ruflo/claude-flow) - Updated all documentation - New README with ant metaphor Kimi-first multi-agent platform.
Code Review: PR #1246Verdict: ❌ REQUEST CHANGES — Close this PR This PR must not be merged in its current form. It violates multiple contribution principles: 1. Do NOT Overwrite UpstreamThis PR replaces the upstream project's README, tagline, badges, and identity. Contributors should not overwrite the upstream project's branding, positioning, or documentation structure. These changes belong in your own fork, not in a PR to the upstream repo. 2. Do NOT Change the Default LLM ProviderThe PR changes the default LLM provider from Claude to Moonshot (Kimi) in the settings generator. Changing the default provider is a major architectural decision that requires explicit approval from the project maintainers. This was not requested or authorized. 3. Do NOT Rebrand the ProjectThe PR renames the project from Ruflo to Anthill across README, docs, CLI references, and install scripts. You cannot rebrand someone else's project in a pull request. If you want to rebrand, do it in your own fork. What could be acceptable (as separate PRs)
What is NOT acceptable
🤖 Review by Claude Code |
|
Closing: This PR rebrands the project, overwrites the upstream README, and changes the default LLM provider without maintainer authorization. Please resubmit as a focused PR adding Moonshot as an optional provider only. |
Summary
This PR adds support for Moonshot AI (Kimi models) as a first-class LLM provider alongside Anthropic, OpenAI, and others.
Changes
Moonshot Provider (4 commits)
Documentation & DX (6 commits)
Supported Models
Testing
Checklist
cc @ruvnet