Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Only write entries that are worth mentioning to users.
- Auth: Fix managed model list refresh silently failing for OAuth users with expired tokens — the background `/models` sync now detects 401 responses, forces an OAuth token refresh, and retries with the refreshed token; if the refresh fails or the refreshed token is still rejected, it falls back to the originally configured static API key instead of skipping the provider
- Core: Fix connection recovery not triggering OAuth refresh when the retry returns 401 — after recreating the HTTP client on `APIConnectionError` or `APITimeoutError`, the retry now re-enters the full recovery path so a subsequent 401 correctly refreshes the OAuth token instead of bubbling to the user as an unrecoverable error
- Shell: Echo `/skill:*` and `/flow:*` inputs in the transcript so workflow commands stay visible after enter; operational slash commands like `/usage` and `/model` remain hidden
- Core: Raise default `max_steps_per_turn` from 500 to 1000 so long-running agents are less likely to hit the per-turn limit

## 1.39.0 (2026-04-24)

Expand Down
4 changes: 2 additions & 2 deletions docs/en/configuration/config-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ model = "kimi-for-coding"
max_context_size = 262144

[loop_control]
max_steps_per_turn = 500
max_steps_per_turn = 1000
max_retries_per_step = 3
max_ralph_iterations = 0
reserved_context_size = 50000
Expand Down Expand Up @@ -149,7 +149,7 @@ capabilities = ["thinking"]

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `max_steps_per_turn` | `integer` | `500` | Maximum steps per turn (alias: `max_steps_per_run`) |
| `max_steps_per_turn` | `integer` | `1000` | Maximum steps per turn (alias: `max_steps_per_run`) |
| `max_retries_per_step` | `integer` | `3` | Maximum retries per step |
| `max_ralph_iterations` | `integer` | `0` | Extra iterations after each user message; `0` disables; `-1` is unlimited |
| `reserved_context_size` | `integer` | `50000` | Reserved token count for LLM response generation; auto-compaction triggers when `context_tokens + reserved_context_size >= max_context_size` |
Expand Down
1 change: 1 addition & 0 deletions docs/en/release-notes/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This page documents the changes in each Kimi Code CLI release.
- Auth: Fix managed model list refresh silently failing for OAuth users with expired tokens — the background `/models` sync now detects 401 responses, forces an OAuth token refresh, and retries with the refreshed token; if the refresh fails or the refreshed token is still rejected, it falls back to the originally configured static API key instead of skipping the provider
- Core: Fix connection recovery not triggering OAuth refresh when the retry returns 401 — after recreating the HTTP client on `APIConnectionError` or `APITimeoutError`, the retry now re-enters the full recovery path so a subsequent 401 correctly refreshes the OAuth token instead of bubbling to the user as an unrecoverable error
- Shell: Echo `/skill:*` and `/flow:*` inputs in the transcript so workflow commands stay visible after enter; operational slash commands like `/usage` and `/model` remain hidden
- Core: Raise default `max_steps_per_turn` from 500 to 1000 so long-running agents are less likely to hit the per-turn limit

## 1.39.0 (2026-04-24)

Expand Down
4 changes: 2 additions & 2 deletions docs/zh/configuration/config-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ model = "kimi-for-coding"
max_context_size = 262144

[loop_control]
max_steps_per_turn = 500
max_steps_per_turn = 1000
max_retries_per_step = 3
max_ralph_iterations = 0
reserved_context_size = 50000
Expand Down Expand Up @@ -149,7 +149,7 @@ capabilities = ["thinking"]

| 字段 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| `max_steps_per_turn` | `integer` | `500` | 单轮最大步数(别名:`max_steps_per_run`) |
| `max_steps_per_turn` | `integer` | `1000` | 单轮最大步数(别名:`max_steps_per_run`) |
| `max_retries_per_step` | `integer` | `3` | 单步最大重试次数 |
| `max_ralph_iterations` | `integer` | `0` | 每个 User 消息后额外自动迭代次数;`0` 表示关闭;`-1` 表示无限 |
| `reserved_context_size` | `integer` | `50000` | 预留给 LLM 响应生成的 token 数量;当 `context_tokens + reserved_context_size >= max_context_size` 时自动触发压缩 |
Expand Down
1 change: 1 addition & 0 deletions docs/zh/release-notes/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Auth:修复 OAuth 用户 access token 过期时托管模型列表刷新静默失败的问题——后台 `/models` 同步任务现在会检测 401 响应,强制进行 OAuth token 刷新并用刷新后的 token 重试;如果刷新本身失败或刷新后的 token 仍被拒绝,则回退到最初配置的静态 API 密钥,而不是跳过该 provider
- Core:修复连接恢复后重试返回 401 时未能触发 OAuth 刷新的问题——在 `APIConnectionError` 或 `APITimeoutError` 后重建 HTTP 客户端时,重试现在会重新进入完整恢复路径,使得后续的 401 能正确刷新 OAuth token,而不是作为不可恢复的错误直接抛给用户
- Shell:在 transcript 中回显 `/skill:*` 和 `/flow:*` 输入,工作流命令按下回车后不再消失;`/usage`、`/model` 等操作类斜杠命令仍然保持隐藏
- Core:将默认 `max_steps_per_turn` 从 500 提升到 1000,长任务更不容易撞到单轮步数上限

## 1.39.0 (2026-04-24)

Expand Down
2 changes: 1 addition & 1 deletion src/kimi_cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class LoopControl(BaseModel):
"""Agent loop control configuration."""

max_steps_per_turn: int = Field(
default=500,
default=1000,
ge=1,
validation_alias=AliasChoices("max_steps_per_turn", "max_steps_per_run"),
)
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_default_config_dump():
"models": {},
"providers": {},
"loop_control": {
"max_steps_per_turn": 500,
"max_steps_per_turn": 1000,
"max_retries_per_step": 3,
"max_ralph_iterations": 0,
"reserved_context_size": 50000,
Expand Down
Loading