Moonshot AI / Kimi — Specialty LLM Tier

One provider, two product names: Moonshot AI is the company; Kimi is the consumer product and model family. In OpenClaw the two names are used interchangeably. The active integration is the Kimi K2 API (OpenAI-compatible endpoint at https://api.moonshot.ai/v1) accessed via portkey virtual key moonshot-kimi-84f4a1. This is a Tier 2 specialty path used for reasoning-heavy or coding-adjacent workloads — not the primary LLM tier. A SOURCE MISSING flag applies: the KB at knowledge-base/moonshot/ contains only a vendor audit file (_audit/2026-05-02.md), not a formal API.md. All documentation in this hub is sourced from that audit file + proxy.js code inspection.

⚠️ SOURCE MISSING

knowledge-base/moonshot/ contains only _audit/2026-05-02.md — no API.md, no WEBHOOKS.md, no CREDENTIALS.md. All content in this hub is derived from:

  1. workspace/knowledge-base/moonshot/_audit/2026-05-02.md (vendor audit, 39 findings, 2026-05-02)
  2. /home/opsadmin/.openclaw/portkey-proxy/proxy.js — Fix #1 implementation (lines 344-360)
  3. workspace/_hubs/integrations/portkey.md — VK moonshot-kimi-84f4a1 entry

G-KB-SYNC-WITH-CLAUDEMD note: moonshot is in CLAUDE.md “Platforms with KB docs” list, but only has an _audit subdirectory, not a full API.md. Recommend creating knowledge-base/moonshot/API.md from vendor docs at https://platform.kimi.ai/docs/guide/start-using-kimi-api and https://github.com/moonshotai/Kimi-K2.

Quick reference

FieldValue
VendorMoonshot AI (product: Kimi)
URLhttps://platform.moonshot.ai / https://platform.kimi.ai
KB doc[[sources/kb/moonshot/_audit/2026-05-02]] (audit only — SOURCE MISSING for API.md)
Auth methodBearer (API key)
Auth credentialop://Aurora/moonshot/api_key
Cred-proxy portn/a (pending B1-B6 ratification per nemoclaw-audit-2026-05-03)
Webhook portn/a
Webhook handlern/a
Webhook dedup tablen/a
Tunnel pathn/a
Outbound API basehttps://api.moonshot.ai/v1 (OpenAI-compatible)
Anthropic-compat basehttps://api.moonshot.ai/anthropic (Anthropic-format; NOT used in production)
Rate limitsRPM scales with cumulative recharge tier (default: low; paid: hundreds/min)
Rate-limit action429 → exponential backoff (3 retries), Discord ops alert; 429 may mask balance exhaustion
Costkimi-k2-turbo: up to 50% lower input pricing; kimi-k2-thinking-turbo: same reduced rates
Backup/recoveryVendor-owned; fall through to OpenRouter via Portkey tier config on failure
Discord alert channelops
Drift cadencemanual
Statusproduction
Primary modelskimi-k2.6, kimi-k2-turbo, kimi-k2-thinking, kimi-k2-thinking-turbo
Portkey virtual keymoonshot-kimi-84f4a1

Fix #1: Kimi 404 → per-model gating in proxy.js

This is the most important implementation detail for this integration. Without this fix, Kimi (or any non-Claude model) requested by a max-plan agent caused a 404 on the :18903 LOCAL-SHORTCUT path, because that upstream binary (anthropic-max-router) only handles Anthropic /v1/messages requests.

Root cause

Max-plan agents (served via :18903) have their traffic routed to the LOCAL-SHORTCUT path by default. The :18903 anthropic-max-router does not serve non-Anthropic models — it returns 404 on anything that isn’t a Claude model request.

Fix implementation

proxy.js lines 344-360 gate the LOCAL-SHORTCUT path on isAnthropicModel:

// Step 2: Determine tier now that model is known.
// Max-plan agent routing is gated by isAnthropicModel — non-Claude models on max-plan
// agents (e.g., dispo asking for kimi-for-coding) fall through to Portkey cloud path.
// Without this gate, ALL of the agent's traffic would hit the Anthropic-only LOCAL-SHORTCUT
// and 404 on non-Claude models.
const isAnthropicModel = !!(model && model.toLowerCase().startsWith('claude'));
let portKeyConfig, tier;
const isMaxPlanAgent = !!(agentId && AGENT_CONFIGS[agentId] && isAnthropicModel);
if (isMaxPlanAgent) {
  const agentCfg = AGENT_CONFIGS[agentId];
  portKeyConfig = agentCfg.config;
  tier = agentCfg.tier;
} else {
  const tierInfo = MODEL_CONFIGS[model] || { config: DEFAULT_CONFIG, tier: 'default' };
  portKeyConfig = tierInfo.config;
  tier = tierInfo.tier;
}

Effect: When a max-plan agent requests kimi-k2.6 (or any non-claude- model):

  1. isAnthropicModel = false
  2. isMaxPlanAgent = false (gated)
  3. Falls through to MODEL_CONFIGS[model]moonshot-kimi-84f4a1 virtual key → Portkey cloud → Moonshot API
  4. No 404. Tool_calls row written via CHOKEPOINT-1.

Fix location: /home/opsadmin/.openclaw/portkey-proxy/proxy.js, lines ~344–360. Fix authored: 2026-05-01 (per portkey hub notes as “Fix #1”). Also documented in: portkey and anthropic.

Kimi K2 model family

ModelBest forNotes (from audit)
kimi-k2.6General-purpose KimiOpenAI SDK compatible; base_url=https://api.moonshot.ai/v1
kimi-k2-turboHigh-speed, input-heavy50% lower input pricing; ~100 tokens/second throughput
kimi-k2-thinkingComplex multi-step reasoningTool use, function calling, agentic tasks
kimi-k2-thinking-turboReasoning + speedSame reduced pricing as turbo; speed + reasoning combined
kimi-k2-0905-previewPreview / testingEarlier preview; not for production

Key capability from audit: Kimi K2 is a 1T parameter MoE model with 32B activated parameters, specifically designed for tool use, reasoning, and autonomous problem-solving. Strong on tau2-telecom and AceBench benchmarks — well-suited for multi-step RE workflow orchestration.

Temperature note: Kimi-K2-Instruct recommended temperature = 0.6. If using Anthropic-compatible endpoint, Moonshot applies implicit mapping real_temperature = request_temperature * 0.6do not rely on this; use OpenAI-compatible endpoint with direct temperature=0.6.

Components

  • /home/opsadmin/.openclaw/portkey-proxy/proxy.js — Fix #1 implementation (lines 344–360); isAnthropicModel gate; moonshot-kimi-84f4a1 VK assignment via MODEL_CONFIGS
  • workspace/knowledge-base/moonshot/_audit/2026-05-02.md — vendor audit (39 findings); SOURCE MISSING for formal API reference
  • Portkey virtual key moonshot-kimi-84f4a1 — resolves to op://Aurora/moonshot/api_key in Portkey dashboard
  • Platform dashboard: https://platform.moonshot.ai — API key management, usage, billing recharge tiers

How it’s used

  • Trigger condition: Agent requests a model starting with kimi- (e.g., kimi-k2.6, kimi-k2-turbo) or moonshot/ prefixed model; or a Portkey tier config specifies Moonshot for reasoning tasks
  • Workflow: proxy.jsisAnthropicModel = false (kimi does not start with ‘claude’) → MODEL_CONFIGS["kimi-k2.6"] → Portkey VK moonshot-kimi-84f4a1https://api.moonshot.ai/v1/chat/completions → Kimi response
  • Agents involved: dispo (kimi-for-coding pattern noted in portkey hub); any agent needing agentic/reasoning tasks that benefit from K2’s tool-call strength
  • Failure mode: 404 (prevented by Fix #1); 429 rate limit (RPM tied to billing tier — may need recharge); balance exhaustion returns 429 (indistinguishable from rate limit)
  • Success criteria: Non-404 response; tool_calls row written to Supabase; latency appropriate for model variant (turbo = faster)

Agents that touch this

  • _summary — “kimi-for-coding” model request pattern documented in portkey hub
  • _summary — may route reasoning-heavy sub-tasks to Kimi K2
  • _summary — complex multi-step research; K2 agentic tool-calling is relevant

Skills that invoke this

  • acq-analyze — complex analysis tasks may benefit from K2 reasoning
  • hubspot-deal-ingest — multi-hop data enrichment; K2 tool-calling could orchestrate

Plans that govern this

Feedback rules

KB / source docs

  • [[sources/kb/moonshot/_audit/2026-05-02]] — 39-finding vendor audit (confidence: low throughout; NEEDS VERIFICATION for production use)
  • SOURCE MISSING: No knowledge-base/moonshot/API.md — recommended remediation: create from https://platform.kimi.ai/docs/guide/start-using-kimi-api

System maps

  • request-lifecycle — non-Anthropic model path; same flow as OpenRouter but terminates at Moonshot
  • ports-topology — Portkey :18900 as single routing surface

Anchor: portkey

MemberRole
portkeyAnchor; CHOKEPOINT-1; Fix #1 lives in proxy.js; VK moonshot-kimi-84f4a1
anthropicPrimary tier (Tier 1); Moonshot is Tier 2 specialty alternative
openrouterTier 2 aggregator; broader model selection; different VK (openrouter-fallback)
moonshot-kimiThis hub — Tier 2 specialty; Kimi K2 MoE; tool-use + reasoning
voyageEmbedding tier; separate from LLM routing; Memory/embeddings cluster anchor: supabase

Open issues / TODOs

  • SOURCE MISSING: Create knowledge-base/moonshot/API.md from https://platform.kimi.ai/docs/guide/start-using-kimi-api and https://github.com/moonshotai/Kimi-K2
  • cred-proxy-eligible: pending — resolve after B1-B6 ratification per nemoclaw-audit-2026-05-03
  • Verify which MODEL_CONFIGS keys in proxy.js map to moonshot-kimi-84f4a1 — may need kimi-k2.6, kimi-k2-turbo, kimi-k2-thinking all registered
  • Billing tier: Moonshot RPM scales with cumulative recharge — verify current tier before enabling high-volume routing
  • Anthropic-compatible endpoint (https://api.moonshot.ai/anthropic) is NOT wired and NOT tested — do not use without explicit testing
  • Temperature behavior: audit notes implicit temperature * 0.6 mapping on Anthropic-compat path — OpenAI-compat path should use direct temperature=0.6 per Kimi docs

Recent activity

  • 2026-05-03: hub created (W2-S7); SOURCE MISSING flagged; Fix #1 documented
  • 2026-05-01: Fix #1 (Kimi 404 → per-model gating) shipped in proxy.js
  • 2026-05-02: Vendor audit knowledge-base/moonshot/_audit/2026-05-02.md generated (39 findings)