Tabbit
ResourcesBlogModels
Tabbit LogoTabbit

Tabbit — The AI Browser that Works for You

Topics

  • AI Browser Resources
  • Agentic Browser Resources
  • Browser Downloads and Install Guides
  • Browser Comparisons
  • AI Browser Alternatives
  • Browser Productivity Resources

Popular Guides

  • AI Browser
  • Agentic Browser Download
  • Best AI Browser 2026: Top 9 Tested & Ranked
  • AI Browser Download
  • Free AI Browser
  • Best AI Browser 2026
  • AI Browser Comparison 2026
  • AI Browser for Windows
  • AI Browser for Mac
  • Chrome Alternative 2026

Events

  • Tabbit Skill Competition
  • KPOP SBTI Fandom Personality Test
  • Tabbit Campus Creator Program
  • fifi's Picks: AI Skills for Research Papers
  • User Survey

About

  • Tabbit Blog
  • Press & Media
Prompt guide
MediaKimi K2.7 Code

Kimi K2.7 Code: Official Claude Code Integration & Multi-Tier Model Mapping

Original source

Kimi API Platform Documentation

AuthorMoonshot AI / Kimi

Tabbit curation2026-08-20

Read original

One-Line Summary

Forwarding Claude Code requests to Kimi's Anthropic-compatible endpoint requires explicitly keeping Thinking enabled (Tab key), setting the auto-compact window to 256K (262144), and fully mapping all Opus/Sonnet/Haiku/Fable/Subagent tier aliases.

Applicable Scenarios

  • Suitable tasks: Repository-level coding, multi-file refactoring, test execution, and subagent orchestration in Claude Code CLI.

  • Unsuitable tasks: Zero-thinking fast generation, single prompt dumps exceeding 256K context, partial configurations missing Haiku/Subagent variables.

  • Applicable model versions: kimi-k2.7-code (Standard), kimi-k2.7-code-highspeed (~180–260 tokens/s).

  • Applicable clients/APIs: @anthropic-ai/claude-code CLI, Kimi Anthropic-compatible API endpoint (https://api.moonshot.ai/anthropic).

  • Recommended inference parameters: CLAUDE_CODE_EFFORT_LEVEL="max", CLAUDE_CODE_AUTO_COMPACT_WINDOW="262144", Thinking enabled.

Directly Usable Content

Option 1: Terminal Environment Variables (Current Session)

macOS / Linux (bash/zsh)

export ANTHROPIC_BASE_URL="https://api.moonshot.ai/anthropic"
export ANTHROPIC_AUTH_TOKEN="YOUR_MOONSHOT_API_KEY"
export ANTHROPIC_MODEL="kimi-k2.7-code"
export ANTHROPIC_DEFAULT_OPUS_MODEL="kimi-k2.7-code"
export ANTHROPIC_DEFAULT_SONNET_MODEL="kimi-k2.7-code"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="kimi-k2.7-code"
export ANTHROPIC_DEFAULT_FABLE_MODEL="kimi-k2.7-code"
export CLAUDE_CODE_SUBAGENT_MODEL="kimi-k2.7-code"
export CLAUDE_CODE_AUTO_COMPACT_WINDOW="262144"
export CLAUDE_CODE_EFFORT_LEVEL="max"
claude

Windows (PowerShell)

$env:ANTHROPIC_BASE_URL="https://api.moonshot.ai/anthropic";
$env:ANTHROPIC_AUTH_TOKEN="YOUR_MOONSHOT_API_KEY";
$env:ANTHROPIC_MODEL="kimi-k2.7-code";
$env:ANTHROPIC_DEFAULT_OPUS_MODEL="kimi-k2.7-code";
$env:ANTHROPIC_DEFAULT_SONNET_MODEL="kimi-k2.7-code";
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL="kimi-k2.7-code";
$env:ANTHROPIC_DEFAULT_FABLE_MODEL="kimi-k2.7-code";
$env:CLAUDE_CODE_SUBAGENT_MODEL="kimi-k2.7-code";
$env:CLAUDE_CODE_AUTO_COMPACT_WINDOW="262144";
$env:CLAUDE_CODE_EFFORT_LEVEL="max";
claude

Option 2: Persistent Configuration (~/.claude/settings.json)

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.moonshot.ai/anthropic",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_MOONSHOT_API_KEY",
    "ANTHROPIC_MODEL": "kimi-k2.7-code",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "kimi-k2.7-code",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "kimi-k2.7-code",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "kimi-k2.7-code",
    "ANTHROPIC_DEFAULT_FABLE_MODEL": "kimi-k2.7-code",
    "CLAUDE_CODE_SUBAGENT_MODEL": "kimi-k2.7-code",
    "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "262144",
    "CLAUDE_CODE_EFFORT_LEVEL": "max"
  }
}

Testing / Workflow Steps

  1. Install Claude Code: npm install -g @anthropic-ai/claude-code.

  2. Obtain an API Key from Kimi API Platform (platform.kimi.ai).

  3. Set environment variables or update ~/.claude/settings.json.

  4. Run claude and execute /status to verify:

    • Base URL displays https://api.moonshot.ai/anthropic

    • Model displays kimi-k2.7-code

  5. Press Tab in Claude Code to ensure the "Thinking on" indicator is active.

  6. Submit a test instruction (e.g. summarize directory structure and package.json) to confirm tool execution.

Raw Evidence & Data

  • Multi-tier model fallback: Claude Code uses Haiku for background summaries and Opus/Sonnet for complex tasks. Omitting tier variables causes silent 404/auth failures.

  • Compaction window matching: K2.7 Code has a 256K window (262144). Setting 1M causes context overflow errors; setting too low causes premature context loss.

  • Thinking requirement: kimi-k2.7-code rejects non-thinking requests with HTTP 400 (invalid thinking: only type=enabled is allowed).

Boundaries & Constraints

  • Requires Kimi's Anthropic compatibility endpoint; unofficial wrappers must support reasoning token propagation.

  • /model menu in Claude Code is hardcoded and will not list Kimi aliases; verify via /status.

Curated by Tabbit

Prompt material is summarized from public sources and Tabbit editorial notes. Check the original licensing and intended use before copying it.

Kimi K2.7 Code

Use in Tabbit

Kimi K2.7 Code

Related prompts

MediaKimi API Platform official documentation

Kimi K2.7 Code: Official Integration and Long-Horizon Coding Prompt Workflow

MediaKimi API Platform Documentation / Hugging Face Model Card

Kimi K2.7 Code: Official Multimodal Video Tool Calling & Agent Loop

CommunityGitHub Blog Changelog

Kimi K2.7 Code: Official GitHub Copilot Integration & Enterprise Policy Setup

CommunityUnsiloed AI Engineering Blog / Reddit r/LangChain

Unsiloed Benchmark: Full FastAPI Project Generation Prompt & Architectural Standard

Kimi K2.7 Code

Related reviews

CommunityReddit, r/kimi

Reddit Community: Where to Draw the Line Between Kimi K2.7 Code, K2.6, and K2.5

MediaHugging Face / Moonshot AI Official Model Card2026-06-12

Kimi K2.7 Code: Official Hugging Face Model Specifications and Full Benchmark Data

CommunityUnsiloed AI Engineering Blog / Reddit r/LangChain

Unsiloed Benchmark: Kimi K2.7 Code vs GLM 5.2 Controlled Benchmark on Real-World Code Generation and Large Repository Analysis

CommunityReddit r/windsurf / Devin.ai (Cognition)

Devin Team: FrontierCode Extended Benchmark and Long-Horizon Engineering Performance