cd /news/large-language-models/kimi-k2-7-code-open-weight-1t-model-… Β· home β€Ί topics β€Ί large-language-models β€Ί article
[ARTICLE Β· art-27163] src=dev.to β†— pub= topic=large-language-models verified=true sentiment=Β· neutral

Kimi K2.7-Code: Open-Weight 1T Model That Beats Claude Opus on Tool Use

Moonshot AI released Kimi K2.7-Code, an open-weight 1 trillion parameter Mixture-of-Experts model that achieves 81.1% on MCPMark Verified, surpassing Claude Opus 4.8's 76.4% on tool-use tasks. The model costs $0.95 per million input tokens via Moonshot's API and is available under a modified MIT license, but requires 8Γ—H200 GPUs for inference. While it excels at tool use, it trails GPT-5.5 and Claude Opus 4.8 on general coding benchmarks like Kimi Code Bench v2.

read7 min publishedJun 14, 2026

81.1% on MCPMark Verified β€” that's Kimi K2.7-Code's tool-use score, which clears Claude Opus 4.8's 76.4% on the same benchmark. The model is open-weight, costs $0.95 per million input tokens at Moonshot's API, and dropped on June 12, 2026 under a modified MIT license. If you're running agentic pipelines that make heavy use of MCP tools, the arithmetic on switching is straightforward.

Here's what you actually need to know about this release.

K2.7-Code is a Mixture-of-Experts model with 1 trillion total parameters. That number sounds overwhelming until you realize only 32 billion are active per token inference β€” the rest sit dormant in the 384-expert pool, waiting for routing decisions. The active footprint is comparable to a mid-size dense model; the full-weight checkpoint is not.

At 340GB, the checkpoint is not a weekend project. Moonshot's Hugging Face page lists vLLM, SGLang, and KTransformers as verified inference engines. The vLLM INT4 quantized setup requires 8Γ—H200 GPUs β€” roughly 640GB aggregate VRAM. That's a 10-node Kubernetes cluster, not a developer laptop.

Context window is 256K tokens. For most agentic workflows involving tool calls over a long session, that's enough headroom. Versus K2.6: K2.7 cuts reasoning-token usage by 30% on equivalent tasks, which matters when you're billing per token and running multi-step agent loops.

Moonshot reports +21.8% over K2.6 on Kimi Code Bench v2, +11.0% on Program Bench, and +31.5% on MLS Bench Lite. Those are internal benchmarks measuring improvements within the K2 family, not absolute comparisons to frontier models. The cross-model comparison tells a more nuanced story:

| Benchmark | Kimi K2.7-Code | Claude Opus 4.8 | GPT-5.5 | |---|

| MCPMark Verified | 81.1% | 76.4% | 92.9% |

| Kimi Code Bench v2 | 62.0 | 67.4 | 69.0 |

| Program Bench (vs K2.6) | +11.0% | β€” | β€” |

| MLS Bench Lite (vs K2.6) | +31.5% | β€” | β€” |

The pattern: K2.7-Code has a specific edge in MCP tool-use tasks, where it beats Claude Opus 4.8 by 4.7 points. On general coding quality via Kimi Code Bench v2, it's behind both Claude Opus 4.8 (67.4) and GPT-5.5 (69.0). GPT-5.5 is still comfortably ahead on MCPMark at 92.9% β€” an 11.8-point gap over K2.7-Code.

The honest read: K2.7-Code is not a frontier model. It's a competitive open-weight coding agent with a standout tool-use benchmark and a price point that makes it worth evaluating for cost-sensitive MCP-heavy workloads. The Kimi Code Bench v2 result (62.0 vs 67.4 for Opus) is a real deficit on complex code generation tasks.

GPT-5.5 runs $11.00 per million input tokens and $44.00 per million output tokens (per The Decoder, June 2026). K2.7-Code via Moonshot API is $0.95 in / $4.00 out. Via OpenRouter, $0.75 in / $3.50 out.

| Model | Input ($/M tokens) | Output ($/M tokens) | MCPMark | |---|

| GPT-5.5 | $11.00 | $44.00 | 92.9% |

| Claude Opus 4.8 | $5.00 | $25.00 | 76.4% |

| K2.7-Code (Moonshot) | $0.95 | $4.00 | 81.1% |

| K2.7-Code (OpenRouter) | $0.75 | $3.50 | 81.1% |

| K2.7-Code (cached input) | $0.19 | $4.00 | 81.1% |

K2.7-Code on cached inputs β€” $0.19/M β€” is genuinely cheap for repeated system-prompt calls in long-running agents. A pipeline that sends 10M input tokens per day on warm cache runs at $1.90 instead of $50 with Claude Opus 4.8. That's not marketing math; it's arithmetic.

The tradeoff: if your benchmark requirement is the highest possible MCPMark score, you're 11.8 points short of GPT-5.5 and you'd need to justify the quality gap. For workflows where Claude Opus 4.8's 76.4% is acceptable, K2.7-Code's 81.1% at a fifth the cost is the obvious move.

The Moonshot API is OpenAI- and Anthropic-compatible, meaning swapping K2.7-Code into an existing pipeline is a base-URL and model-string change, not a rewrite.

import OpenAI from 'openai'

const client = new OpenAI({
  apiKey: process.env.MOONSHOT_API_KEY,
  baseURL: 'https://api.moonshot.ai/v1',
})

const response = await client.chat.completions.create({
  model: 'kimi-k2.7-code',
  messages: [
    { role: 'user', content: 'Write a TypeScript function to parse MCP tool responses.' }
  ],
  max_tokens: 2048,
})

console.log(response.choices[0].message.content)

Get your API key at platform.moonshot.ai. As of June 14, 2026, access was immediate after account verification β€” no waitlist.

OpenRouter exposes K2.7-Code at moonshotai/kimi-k2.7-code

with unified billing if you're already running mixed-model pipelines through them. Input pricing is $0.75/M β€” cheaper than Moonshot direct. The latency overhead from OpenRouter's proxy layer is measurable but small on long-context requests.

Moonshot ships a CLI agent called Kimi Code, targeting the same terminal-based agentic coding workflows as Claude Code. If you want to benchmark it on your actual codebase:

npm install -g kimi-code
kimi-code auth
kimi-code "refactor this module to use TypeScript strict mode"

No separate public pricing page for Kimi Code as of this writing β€” it bills against your Moonshot API key at standard K2.7-Code rates.

The weights are on Hugging Face under moonshotai/Kimi-K2.7-Code

. The verified INT4 setup:

pip install vllm --pre

vllm serve moonshotai/Kimi-K2.7-Code \
  --quantization awq \
  --tensor-parallel-size 8 \
  --max-model-len 65536

340GB checkpoint. 8Γ—H200 for INT4. If you have that infrastructure already, self-hosting cuts your cost to $0 per token at the model layer. Most developers don't have 640GB of H200 on hand β€” use the API.

K2.6 was released in late April 2026 and immediately led open-weight models on HLE (Humanity's Last Exam). K2.7-Code is not a general-capability upgrade β€” it's a coding-specialist fine-tune on K2.6's base. The architecture is identical: same MoE structure, same expert count, same context window.

The three measurable changes:

30% fewer reasoning tokens on K2.7-Code compared to K2.6 on equivalent coding tasks. Reasoning chains are more direct, with less self-correction noise between tool calls.

+21.8% on Kimi Code Bench v2. That's a meaningful jump in one revision cycle β€” it suggests the fine-tuning dataset was specifically targeted at the failure modes K2.6 exhibited on this benchmark.

MCP tool-use score improved enough to clear Claude Opus 4.8. Moonshot didn't publish K2.6's MCPMark score directly, so the absolute gain is opaque, but the resulting 81.1% is the number that matters.

What didn't change: general reasoning capability outside coding domains. This is not a drop-in replacement for K2.6 if your pipeline handles mixed workloads. It's optimized specifically for code-heavy, tool-heavy agentic tasks. Routing the wrong workload class here will get you worse results than K2.6.

Use K2.7-Code if you're running MCP-heavy agentic pipelines that currently use Claude Opus 4.8 and you're looking to cut inference costs without sacrificing tool-use accuracy. The MCPMark gap β€” K2.7 at 81.1% vs Opus at 76.4% β€” means you're not trading quality for cost here. You're gaining 4.7 points on the benchmark that matters most for that workload class.

Don't switch if raw code quality on complex tasks is the priority. On Kimi Code Bench v2, both Claude Opus 4.8 and GPT-5.5 outperform K2.7-Code. Novel algorithm implementation, deep architectural reasoning, or code that requires multi-step chain-of-thought on hard problems still favors the closed frontier models.

The practical two-model strategy: route agentic tool-calling tasks to K2.7-Code via OpenRouter at $0.75/M, keep Claude Opus 4.8 or GPT-5.5 on retainer for high-stakes code generation. LiteLLM's router makes this a single config change:

model_list:
  - model_name: "tool-agent"
    litellm_params:
      model: "openrouter/moonshotai/kimi-k2.7-code"
      api_key: os.environ/OPENROUTER_API_KEY
  - model_name: "code-gen"
    litellm_params:
      model: "anthropic/claude-opus-4-8"
      api_key: os.environ/ANTHROPIC_API_KEY

Moonshot's modified MIT license adds one material restriction over standard MIT: you cannot use these weights as training data to build a competing foundation model without a separate commercial agreement. Standard commercial deployment, fine-tuning for vertical applications, and redistribution are all permitted.

For the vast majority of developer use cases β€” building products on top of K2.7-Code or fine-tuning it for a domain-specific task β€” the modified terms are not a practical constraint. Read the full license on the Hugging Face model card before deploying if you're in any doubt about your specific use case.

Moonshot has shipped five major releases in under a year (K2.0 through K2.7). The cadence suggests K2.8 or K3 before year-end. The pattern so far: alternating general-capability and coding-specialist releases, with each coding specialist cutting reasoning-token usage and improving Kimi Code Bench scores.

Originally published at wowhow.cloud

── more in #large-language-models 4 stories Β· sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/kimi-k2-7-code-open-…] indexed:0 read:7min 2026-06-14 Β· β€”