Kimi K2.7 Code
Kimi K2.7 Code is Moonshot AI's coding-focused agentic model with stronger coding and agent performance than Kimi K2.6, less overthinking, and a context window of 262.1K tokens, available through AI Gateway via moonshotai, deepinfra, fireworks, baseten.
import { streamText } from 'ai'
const result = streamText({ model: 'moonshotai/kimi-k2.7-code', prompt: 'Why is the sky blue?'})Frequently Asked Questions
What's new in Kimi K2.7 Code compared to Kimi K2.6?
Three things: stronger coding and agent performance, roughly 30% fewer thinking tokens on average, and better instruction following in long-horizon coding sessions. Moonshot AI's internal benchmarks show gains like 62.0 against 50.9 on Kimi Code Bench V2; treat those as vendor-reported numbers.
Can I turn off thinking mode on Kimi K2.7 Code?
No. Kimi K2.7 Code always reasons before answering, and the mode can't be disabled. Budget output tokens for reasoning traces, and use a non-thinking Kimi K2 variant if deliberation never helps your workload.
Does Kimi K2.7 Code accept images and video?
Yes. Kimi K2.7 Code takes images in formats like PNG, JPEG, WebP, and GIF, plus video in MP4, MOV, AVI, and others, with temporal analysis for video understanding. Confirm modality limits on https://platform.kimi.ai/docs/guide/kimi-k2-7-code-quickstart before you build a media-heavy pipeline.
How long can Kimi K2.7 Code run in a single agentic session?
Moonshot AI reports improved success on sequences exceeding 4,000 tool calls and runs lasting over 12 hours of continuous execution. Plan your agent harness and token budgets around extended runs.
Is Kimi K2.7 Code open weights?
Yes. Moonshot AI publishes the weights under a Modified MIT license. Through AI Gateway you get hosted access without managing the trillion-parameter deployment yourself.
How do I use Kimi K2.7 Code on AI Gateway?
Use the identifier
moonshotai/kimi-k2.7-codewith the AI SDK or any supported interface like Chat Completions, Responses, or Messages. AI Gateway routes across moonshotai, deepinfra, fireworks, baseten and handles failover automatically.Does Kimi K2.7 Code support zero data retention?
Yes, Zero Data Retention is available for this model. Zero Data Retention is offered on a per-provider basis. See https://vercel.com/docs/ai-gateway/capabilities/zdr for details.