Skip to content
2 changes: 1 addition & 1 deletion .kimi/prompts/gen-changelog.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
根据当前分支相对于 main 分支的修改,在的 @CHANGELOG.md 文件中添加更新日志条目,遵循现有的格式和风格。
根据当前分支相对于 main 分支的修改,在的根目录 CHANGELOG.md 或相应 package/sdk 等目录的 CHANGELOG.md 文件中添加更新日志条目,遵循现有的格式和风格。
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Only write entries that are worth mentioning to users.

## Unreleased

- Shell: Use `/model` to toggle thinking mode instead of Tab key
- Config: Add `default_thinking` config option (auto-migrated from metadata)
- LLM: Add `always_thinking` capability for models that always use thinking mode

## 0.76 (2026-01-12)

- Tool: Make `ReadFile` tool description reflect model capabilities for image/video support
Expand Down
2 changes: 2 additions & 0 deletions docs/en/configuration/config-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The configuration file contains the following top-level configuration items:
| Item | Type | Description |
| --- | --- | --- |
| `default_model` | `string` | Default model name, must be a model defined in `models` |
| `default_thinking` | `boolean` | Whether to enable thinking mode by default (defaults to `false`) |
| `providers` | `table` | API provider configuration |
| `models` | `table` | Model configuration |
| `loop_control` | `table` | Agent loop control parameters |
Expand All @@ -35,6 +36,7 @@ The configuration file contains the following top-level configuration items:

```toml
default_model = "kimi-for-coding"
default_thinking = false

[providers.kimi-for-coding]
type = "kimi"
Expand Down
2 changes: 1 addition & 1 deletion docs/en/configuration/env-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export KIMI_MODEL_MAX_CONTEXT_SIZE="262144"

### `KIMI_MODEL_CAPABILITIES`

Overrides the model's `capabilities` field in the configuration file. Multiple capabilities are comma-separated, supported values are `thinking`, `image_in`, and `video_in`.
Overrides the model's `capabilities` field in the configuration file. Multiple capabilities are comma-separated, supported values are `thinking`, `always_thinking`, `image_in`, and `video_in`.

```sh
export KIMI_MODEL_CAPABILITIES="thinking,image_in"
Expand Down
9 changes: 7 additions & 2 deletions docs/en/configuration/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ The `capabilities` field in model configuration declares the capabilities suppor

| Capability | Description |
| --- | --- |
| `thinking` | Supports thinking mode (deep reasoning) |
| `thinking` | Supports thinking mode (deep reasoning), can be toggled |
| `always_thinking` | Always uses thinking mode (cannot be disabled) |
| `image_in` | Supports image input |
| `video_in` | Supports video input |

Expand All @@ -122,7 +123,11 @@ capabilities = ["thinking", "image_in"]

### `thinking`

When thinking mode is enabled, the model performs deeper reasoning before answering, suitable for complex problems. In shell mode, you can toggle thinking mode with the `Tab` key, or control it at startup with `--thinking` / `--no-thinking` flags.
Declares that the model supports thinking mode. When enabled, the model performs deeper reasoning before answering, suitable for complex problems. In shell mode, you can use the `/model` command to switch models and thinking mode, or control it at startup with `--thinking` / `--no-thinking` flags.

### `always_thinking`

Indicates the model always uses thinking mode and cannot be disabled. For example, models with "thinking" in their name like `kimi-k2-thinking-turbo` typically have this capability. When using such models, the `/model` command won't prompt for thinking mode toggle.

### `image_in`

Expand Down
9 changes: 0 additions & 9 deletions docs/en/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@ If you need to change working directory:
- **Use `--work-dir` flag**: Specify working directory at startup, like `kimi --work-dir /path/to/project`.
- **Use absolute paths in commands**: Execute commands with absolute paths directly, like `ls /path/to/dir`.

### Thinking mode unavailable

When pressing `Tab` to toggle thinking mode, if you see "Thinking mode requires a model with thinking capability", it means the current model doesn't support thinking mode.

Solutions:

- **Switch to a supported model**: Use `/setup` to select a model that supports thinking (like `kimi-k2-thinking-turbo`).
- **Check model capability configuration**: If you're sure the model supports thinking, you can force enable it with the environment variable `KIMI_MODEL_CAPABILITIES=thinking`.

### Image paste fails

When using `Ctrl-V` to paste an image, if you see "Current model does not support image input", it means the current model doesn't support image input.
Expand Down
4 changes: 2 additions & 2 deletions docs/en/guides/interaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ In shell mode, each command executes independently. Commands that change the env

Thinking mode allows the AI to think more deeply before responding, suitable for handling complex problems.

In agent mode, press `Tab` to toggle thinking mode on or off. The status bar at the bottom will show a notification after switching. You can also enable it at startup with the `--thinking` flag:
You can use the `/model` command to switch models and thinking mode. After selecting a model, if the model supports thinking mode, the system will ask whether to enable it. You can also enable it at startup with the `--thinking` flag:

```sh
kimi --thinking
```

::: tip
Thinking mode requires support from the current model.
Thinking mode requires support from the current model. Some models (like `kimi-k2-thinking-turbo`) always use thinking mode and cannot be disabled.
:::

## Multi-line input
Expand Down
14 changes: 1 addition & 13 deletions docs/en/reference/keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Kimi CLI shell mode supports the following keyboard shortcuts.
| Shortcut | Function |
|----------|----------|
| `Ctrl-X` | Toggle agent/shell mode |
| `Tab` | Toggle thinking mode |
| `Ctrl-/` | Show help |
| `Ctrl-J` | Insert newline |
| `Alt-Enter` | Insert newline (same as `Ctrl-J`) |
Expand All @@ -25,20 +24,9 @@ Press `Ctrl-X` in the input box to switch between two modes:
- **Shell mode**: Input is executed as local shell command

The prompt changes based on current mode:
- Agent mode: `✨` or `💫` (thinking mode)
- Agent mode: `✨` (normal) or `💫` (thinking mode)
- Shell mode: `$`

### `Tab`: Toggle thinking mode

In agent mode, when the input box is empty or no completion menu is displayed, press `Tab` to toggle thinking mode.

- When thinking mode is enabled, the prompt changes to `💫`
- A notification is displayed when switching

::: tip
Thinking mode requires model support.
:::

### `Ctrl-/`: Show help

Press `Ctrl-/` in the input box to quickly display help information, equivalent to entering the `/help` command.
Expand Down
6 changes: 3 additions & 3 deletions docs/en/reference/slash-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ After configuration, settings are automatically saved to `~/.kimi/config.toml` a

### `/model`

Switch the default model.
Switch models and thinking mode.

This command first refreshes the available models list from the API platform. When called without arguments, displays an interactive selection interface; you can also specify a model name directly, e.g., `/model kimi-k2`.
This command first refreshes the available models list from the API platform. When called without arguments, displays an interactive selection interface where you first select a model, then choose whether to enable thinking mode (if the model supports it).

After selecting a new model, Kimi CLI will automatically update the configuration file and reload.
After selection, Kimi CLI will automatically update the configuration file and reload.

::: tip
This command is only available when using the default configuration file. If a configuration was specified via `--config` or `--config-file`, this command cannot be used.
Expand Down
4 changes: 4 additions & 0 deletions docs/en/release-notes/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This page documents the changes in each Kimi CLI release.

## Unreleased

- Shell: Use `/model` to toggle thinking mode instead of Tab key
- Config: Add `default_thinking` config option (auto-migrated from metadata)
- LLM: Add `always_thinking` capability for models that always use thinking mode

## 0.76 (2026-01-12)

- Tool: Make `ReadFile` tool description reflect model capabilities for image/video support
Expand Down
2 changes: 2 additions & 0 deletions docs/zh/configuration/config-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ kimi --config '{"default_model": "kimi-for-coding", "providers": {...}, "models"
| 配置项 | 类型 | 说明 |
| --- | --- | --- |
| `default_model` | `string` | 默认使用的模型名称,必须是 `models` 中定义的模型 |
| `default_thinking` | `boolean` | 默认是否开启 Thinking 模式(默认为 `false`) |
| `providers` | `table` | API 供应商配置 |
| `models` | `table` | 模型配置 |
| `loop_control` | `table` | Agent 循环控制参数 |
Expand All @@ -35,6 +36,7 @@ kimi --config '{"default_model": "kimi-for-coding", "providers": {...}, "models"

```toml
default_model = "kimi-for-coding"
default_thinking = false

[providers.kimi-for-coding]
type = "kimi"
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/configuration/env-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export KIMI_MODEL_MAX_CONTEXT_SIZE="262144"

### `KIMI_MODEL_CAPABILITIES`

覆盖配置文件中模型的 `capabilities` 字段。多个能力用逗号分隔,支持的值为 `thinking`、`image_in` 和 `video_in`。
覆盖配置文件中模型的 `capabilities` 字段。多个能力用逗号分隔,支持的值为 `thinking`、`always_thinking`、`image_in` 和 `video_in`。

```sh
export KIMI_MODEL_CAPABILITIES="thinking,image_in"
Expand Down
9 changes: 7 additions & 2 deletions docs/zh/configuration/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ env = { GOOGLE_CLOUD_PROJECT = "your-project-id" }

| 能力 | 说明 |
| --- | --- |
| `thinking` | 支持 thinking 模式(深度思考) |
| `thinking` | 支持 Thinking 模式(深度思考),可开关 |
| `always_thinking` | 始终使用 Thinking 模式(不可关闭) |
| `image_in` | 支持图片输入 |
| `video_in` | 支持视频输入 |

Expand All @@ -122,7 +123,11 @@ capabilities = ["thinking", "image_in"]

### `thinking`

启用 Thinking 模式后,模型会在回答前进行更深入的推理,适合复杂问题。在 Shell 模式下,可以通过 `Tab` 键切换 Thinking 模式,或在启动时通过 `--thinking` / `--no-thinking` 参数控制。
声明模型支持 Thinking 模式。启用后,模型会在回答前进行更深入的推理,适合复杂问题。在 Shell 模式下,可以通过 `/model` 命令切换模型和 Thinking 模式,或在启动时通过 `--thinking` / `--no-thinking` 参数控制。

### `always_thinking`

表示模型始终使用 Thinking 模式,无法关闭。例如 `kimi-k2-thinking-turbo` 等名称中包含 "thinking" 的模型通常具有此能力。使用这类模型时,`/model` 命令不会提示选择 Thinking 模式的开关。

### `image_in`

Expand Down
9 changes: 0 additions & 9 deletions docs/zh/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@ API 密钥无效可能的原因:
- **使用 `--work-dir` 参数**:启动时指定工作目录,如 `kimi --work-dir /path/to/project`。
- **在命令中使用绝对路径**:直接使用绝对路径执行命令,如 `ls /path/to/dir`。

### Thinking 模式不可用

按 `Tab` 键切换 Thinking 模式时,如果提示 "Thinking mode requires a model with thinking capability",说明当前模型不支持 Thinking 模式。

解决方法:

- **切换到支持的模型**:使用 `/setup` 选择支持 Thinking 的模型(如 `kimi-k2-thinking-turbo`)。
- **检查模型能力配置**:如果你确定模型支持 Thinking,可以通过环境变量 `KIMI_MODEL_CAPABILITIES=thinking` 强制启用。

### 粘贴图片失败

使用 `Ctrl-V` 粘贴图片时,如果提示 "Current model does not support image input",说明当前模型不支持图片输入。
Expand Down
4 changes: 2 additions & 2 deletions docs/zh/guides/interaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ Shell 模式中每个命令独立执行,`cd`、`export` 等改变环境的命

Thinking 模式让 AI 在回答前进行更深入的思考,适合处理复杂问题。

在 Agent 模式下按 `Tab` 键可以切换 Thinking 模式的开关状态,切换后底部状态栏会显示提示。也可以在启动时通过 `--thinking` 参数启用:
你可以通过 `/model` 命令切换模型和 Thinking 模式。在选择模型后,如果模型支持 Thinking 模式,系统会询问是否开启。也可以在启动时通过 `--thinking` 参数启用:

```sh
kimi --thinking
```

::: tip 提示
Thinking 模式需要当前模型支持。
Thinking 模式需要当前模型支持。部分模型(如 `kimi-k2-thinking-turbo`)始终使用 Thinking 模式,无法关闭。
:::

## 多行输入
Expand Down
14 changes: 1 addition & 13 deletions docs/zh/reference/keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Kimi CLI Shell 模式支持以下键盘快捷键。
| 快捷键 | 功能 |
|--------|------|
| `Ctrl-X` | 切换 Agent/Shell 模式 |
| `Tab` | 切换 Thinking 模式 |
| `Ctrl-/` | 显示帮助 |
| `Ctrl-J` | 插入换行 |
| `Alt-Enter` | 插入换行(同 `Ctrl-J`) |
Expand All @@ -25,20 +24,9 @@ Kimi CLI Shell 模式支持以下键盘快捷键。
- **Shell 模式**:输入作为本地 Shell 命令执行

提示符会根据当前模式变化:
- Agent 模式:`✨` 或 `💫`(thinking 模式)
- Agent 模式:`✨`(普通)或 `💫`(Thinking 模式)
- Shell 模式:`$`

### `Tab`:切换 Thinking 模式

在 Agent 模式下,当输入框为空或没有显示补全菜单时,按 `Tab` 可切换 Thinking 模式。

- 启用 Thinking 模式时,提示符变为 `💫`
- 切换时会显示提示信息

::: tip 提示
Thinking 模式需要模型支持。
:::

### `Ctrl-/`:显示帮助

在输入框中按 `Ctrl-/` 可快速显示帮助信息,等价于输入 `/help` 命令。
Expand Down
6 changes: 3 additions & 3 deletions docs/zh/reference/slash-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@

### `/model`

切换默认模型
切换模型和 Thinking 模式

此命令会先从 API 平台刷新可用模型列表。不带参数调用时,显示交互式选择界面;也可以直接指定模型名称,如 `/model kimi-k2`
此命令会先从 API 平台刷新可用模型列表。不带参数调用时,显示交互式选择界面,首先选择模型,然后选择是否开启 Thinking 模式(如果模型支持)

选择新模型后,Kimi CLI 会自动更新配置文件并重新加载。
选择完成后,Kimi CLI 会自动更新配置文件并重新加载。

::: tip 提示
此命令仅在使用默认配置文件时可用。如果通过 `--config` 或 `--config-file` 指定了配置,则无法使用此命令。
Expand Down
4 changes: 4 additions & 0 deletions docs/zh/release-notes/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

## 未发布

- Shell:使用 `/model` 命令切换 Thinking 模式,取代 Tab 键
- Config:添加 `default_thinking` 配置项(从 metadata 自动迁移)
- LLM:为始终使用 Thinking 模式的模型添加 `always_thinking` 能力

## 0.76 (2026-01-12)

- Tool:让 `ReadFile` 工具描述根据模型能力动态反映图片/视频支持情况
Expand Down
4 changes: 4 additions & 0 deletions packages/kosong/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- Add `thinking_effort` property to `ChatProvider` protocol to query current thinking effort level

## 0.37.0 (2026-01-08)

- Change `TokenUsage` from dataclass to pydantic BaseModel.
Expand Down
7 changes: 7 additions & 0 deletions packages/kosong/src/kosong/chat_provider/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ def model_name(self) -> str:
"""
...

@property
def thinking_effort(self) -> "ThinkingEffort | None":
"""
The current thinking effort level. Returns None if not explicitly set.
"""
...

async def generate(
self,
system_prompt: str,
Expand Down
4 changes: 4 additions & 0 deletions packages/kosong/src/kosong/chat_provider/chaos.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ def model_name(self) -> str:
return f"chaos({self._provider.model_name})"
return self._provider.model_name

@property
def thinking_effort(self) -> ThinkingEffort | None:
return self._provider.thinking_effort

def with_thinking(self, effort: ThinkingEffort) -> "ChaosChatProvider":
return ChaosChatProvider(self._provider.with_thinking(effort), self._chaos_config)

Expand Down
4 changes: 4 additions & 0 deletions packages/kosong/src/kosong/chat_provider/echo.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ class EchoChatProvider:
def model_name(self) -> str:
return "echo"

@property
def thinking_effort(self) -> ThinkingEffort | None:
return None

async def generate(
self,
system_prompt: str,
Expand Down
15 changes: 15 additions & 0 deletions packages/kosong/src/kosong/chat_provider/kimi.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,21 @@ def __init__(
def model_name(self) -> str:
return self.model

@property
def thinking_effort(self) -> ThinkingEffort | None:
reasoning_effort = self._generation_kwargs.get("reasoning_effort")
if reasoning_effort is None:
return None
match reasoning_effort:
case "low":
return "low"
case "medium":
return "medium"
case "high":
return "high"
case _:
return "off"

async def generate(
self,
system_prompt: str,
Expand Down
4 changes: 4 additions & 0 deletions packages/kosong/src/kosong/chat_provider/mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ def __init__(
def model_name(self) -> str:
return "mock"

@property
def thinking_effort(self) -> ThinkingEffort | None:
return None

async def generate(
self,
system_prompt: str,
Expand Down
12 changes: 12 additions & 0 deletions packages/kosong/src/kosong/chat_provider/openai_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ def thinking_effort_to_reasoning_effort(effort: ThinkingEffort) -> ReasoningEffo
return "high"


def reasoning_effort_to_thinking_effort(effort: ReasoningEffort) -> ThinkingEffort:
match effort:
case "low" | "minimal":
return "low"
case "medium":
return "medium"
case "high" | "xhigh":
return "high"
case "none" | None:
return "off"


def tool_to_openai(tool: Tool) -> ChatCompletionToolParam:
"""Convert a single tool to OpenAI tool format."""
# simply `model_dump` because the `Tool` type is OpenAI-compatible
Expand Down
Loading