Kimi K2.7 Code lands on Workers AI!
Heya, it's Shiichan! Today's news is about a new AI model that's really good at coding. So exciting!
Cloudflare ChangelogWhat was announced?
From Cloudflare's Changelog: Moonshot AI's Kimi K2.7 Code is now available on Workers AI. The model ID is @cf/moonshotai/kimi-k2.7-code.
It's a code-optimized model built on a Mixture-of-Experts (MoE) architecture, with 1 trillion total parameters and 32B active per token. It has a 262.1k token context window and vision support, so it can read images too.
Why it matters
The Kimi K2 series is already known as a large-scale model, and this is its code-focused variant. Compared to the previous K2.6, it posts solid gains on coding and agentic benchmarks:
- +21.8% on Kimi Code Bench v2
- +11.0% on Program Bench
- +31.5% on MLS Bench Lite
It also reaches answers using 30% fewer reasoning tokens, cutting down on overthinking. For reasoning-heavy workloads, that means lower inference cost.
What changes
Now that it's on Workers AI, you can call this coding model straight from Cloudflare's edge without provisioning your own GPUs. You can keep long conversation histories, tool definitions, and whole codebases inside the 262.1k token window, which is a great fit for long-running agent sessions.
Dive Deep
Here's what you can use:
- A 262.1k token context window to retain long conversations and codebases
- Vision inputs so you can pass images
- Thinking mode with configurable depth via
chat_template_kwargs.thinking - Multi-turn tool calling
- Structured outputs with JSON schema support
You can call it three ways: via the Workers AI binding with env.AI.run(), the REST API at /ai/run, or the OpenAI-compatible endpoint at /v1/chat/completions. All of them also work through AI Gateway.
The post also notes migration tips from K2.6: API usage is identical, with no parameter changes required. Pricing did change, though — cached input tokens cost $0.19 per million (vs $0.16 for K2.6). For details, check the Kimi K2.7 Code model page and pricing.
Wrap-up
- Moonshot AI's Kimi K2.7 Code arrives on Workers AI (
@cf/moonshotai/kimi-k2.7-code) - MoE with 1T total / 32B active parameters, a 262.1k token context, and vision support
- Coding benchmarks improve over K2.6, with 30% fewer reasoning tokens
- Cached input is $0.19 per million tokens, and the API stays compatible with K2.6
- A great update if you want to build coding agents over long context!