Skip to content

feat: Add Moonshot (Kimi) provider and documentation improvements#1246

Closed
nKOxxx wants to merge 5962 commits intoruvnet:mainfrom
nKOxxx:main
Closed

feat: Add Moonshot (Kimi) provider and documentation improvements#1246
nKOxxx wants to merge 5962 commits intoruvnet:mainfrom
nKOxxx:main

Conversation

@nKOxxx
Copy link

@nKOxxx nKOxxx commented Feb 28, 2026

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)

  • Add 'moonshot' to LLMProvider type with Kimi model variants
  • Full provider implementation with streaming, tool calling, health checks
  • Register in ProviderManager for automatic instantiation
  • Export from public API

Documentation & DX (6 commits)

  • Fix README links (claude-flow → ruflo)
  • Add .env.example template for easy configuration
  • Add CONTRIBUTING.md guide for new contributors
  • Add health-check.sh diagnostic script
  • Add MockProvider for unit testing
  • Update .gitignore for common patterns

Supported Models

  • kimi-k2-5 (256k context, 8k output)
  • kimi-k2 (256k context, 8k output)
  • kimi-k2-thinking (256k context, 8k output)

Testing

  • Provider implements full ILLMProvider interface
  • Health check validates API connectivity
  • Cost tracking with competitive pricing (/bin/zsh.002//bin/zsh.008 per 1k)

Checklist

  • Provider implements all required methods
  • Added to ProviderManager factory
  • Exported from public API
  • Documentation updated
  • No breaking changes

cc @ruvnet

ruvnet and others added 30 commits February 8, 2026 21:40
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-08T21:40:13Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-08T21:40:18Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-08T21:41:35Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-08T21:41:52Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-08T21:42:24Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-08T21:44:59Z
- Changes: 5 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-08T22:15:04Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-08T22:15:24Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-08T22:15:49Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-08T22:17:41Z
- Changes: 2 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-08T22:18:53Z
- Changes: 3 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-08T22:22:54Z
- Changes: 6 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-08T22:23:38Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-08T22:23:46Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-08T22:23:52Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-08T22:25:58Z
- Changes: 2 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-09T16:45:42Z
- Changes: 5 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-09T16:53:21Z
- Changes: 6 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-09T16:55:06Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-09T16:56:56Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-09T16:59:29Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-09T17:01:21Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-09T17:03:35Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-09T17:07:10Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-09T17:10:56Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-09T17:11:05Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-09T17:13:24Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-09T17:14:02Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-09T17:16:09Z
- Changes: 3 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-09T17:16:15Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ruvnet and others added 26 commits February 28, 2026 03:08
Replace all claude-flow references in install.sh with ruflo branding
and change ruflo@alpha to ruflo@latest throughout README.md to match
current package naming and recommended install path.

Co-Authored-By: claude-flow <ruv@ruv.net>
…ication suite

ADR-058 defines the RVFA (RuVector Format Appliance) — a single .rvf
file containing Linux kernel, Node.js, Claude Code, Ruflo, ruvLLM
(from RuVector), and a 35-category verification suite (127 checks).

Three profiles: offline (4GB, air-gapped), hybrid (2GB), cloud (60MB).
ruvLLM extends @ruvector/core with on-device GGUF inference.

scripts/verify-appliance.sh runs all 35 categories (113 critical
checks, 10 non-critical warnings, 4 skipped) — verified in Docker.

Co-Authored-By: claude-flow <ruv@ruv.net>
Full implementation of self-contained Ruflo RVF Appliance (ADR-058):

Core modules (v3/@claude-flow/cli/src/appliance/):
- rvfa-format.ts: Binary format reader/writer with RVFA magic bytes,
  section management, SHA256 integrity, gzip compression (500 lines)
- rvfa-builder.ts: Multi-stage build pipeline for cloud/hybrid/offline
  profiles with AES-256-GCM API key vault encryption (394 lines)
- rvfa-runner.ts: Boot sequence with native and container isolation,
  verify section extraction, vault decryption (282 lines)
- ruvllm-bridge.ts: Local LLM inference bridge from @ruvector ecosystem
  with 3-tier routing (Agent Booster → local GGUF → cloud API) (307 lines)

CLI command (commands/appliance.ts):
- `ruflo appliance build` — build .rvf with profile selection
- `ruflo appliance inspect` — show header + section manifest
- `ruflo appliance verify` — integrity + capability checks
- `ruflo appliance extract` — unpack sections to directory
- `ruflo appliance run` — boot in cli/mcp/verify mode

Tests: 59/59 passing (44 format + 15 builder)
Docker: Dockerfile.appliance for production Alpine image

Co-Authored-By: claude-flow <ruv@ruv.net>
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.
@bono-bot
Copy link

Code Review: PR #1246

Verdict: ❌ REQUEST CHANGES — Close this PR

This PR must not be merged in its current form. It violates multiple contribution principles:


1. Do NOT Overwrite Upstream

This 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 Provider

The 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 Project

The 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)

  • Moonshot provider implementation only — Adding Moonshot as an optional provider (not the default) could be a valid contribution, submitted as its own focused PR
  • Bug fixes — The constructor pattern fix and API endpoint corrections are legitimate fixes for the provider code

What is NOT acceptable

  • Rebranding Ruflo → Anthill in upstream
  • Making Kimi the default over Claude
  • Overwriting the README with fork-specific content
  • Changing install scripts to point to a different repo

🤖 Review by Claude Code

@bono-bot
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants