Skip to content

Commit 4a550ef

Browse files
sailistjackfish212
andauthored
chore(release): bump kimi-cli to 1.49.0 and kosong to 0.55.0 (#2503)
Co-authored-by: jackfish212 <jackfish212@outlook.com>
1 parent 7c52e76 commit 4a550ef

10 files changed

Lines changed: 35 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ Only write entries that are worth mentioning to users.
1111

1212
## Unreleased
1313

14+
## 1.49.0 (2026-07-16)
15+
16+
**Highlights**: The completion-token budget for Kimi providers now adapts to the model's remaining context window, reducing context-length overflow errors on long turns
17+
18+
- LLM: Clamp the Kimi completion-token budget to the model's remaining context window — the CLI no longer sends a fixed `max_tokens=32000` but estimates the remaining context for each request and caps `max_completion_tokens` accordingly. Set the new `KIMI_MODEL_MAX_COMPLETION_TOKENS` env var for an explicit hard cap (`KIMI_MODEL_MAX_TOKENS` remains a compatibility alias; `0` or a negative value disables clamping)
1419
- Kosong: Stop Kimi from automatically sending the legacy `reasoning_effort` parameter when configuring thinking — requests now use `thinking.type` exclusively while preserving explicit legacy passthrough
20+
- Kosong: Fix empty-string `reasoning_content` from thinking models being dropped from history — a reply that reasoned but ended with empty reasoning was recorded as having no reasoning at all, so Preserved Thinking backends that require `reasoning_content` on every assistant message rejected the next request with a 400
1521

1622
## 1.47.0 (2026-06-05)
1723

docs/en/release-notes/breaking-changes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This page documents breaking changes in Kimi Code CLI releases and provides migr
44

55
## Unreleased
66

7+
## 1.49.0
8+
79
### Kimi no longer sends legacy `reasoning_effort` automatically
810

911
Kimi thinking configuration now uses `thinking.type` exclusively. `Kimi.with_thinking(...)` no longer adds the legacy `reasoning_effort` parameter to requests.

docs/en/release-notes/changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ This page documents the changes in each Kimi Code CLI release.
44

55
## Unreleased
66

7+
## 1.49.0 (2026-07-16)
8+
9+
**Highlights**: The completion-token budget for Kimi providers now adapts to the model's remaining context window, reducing context-length overflow errors on long turns
10+
11+
- LLM: Clamp the Kimi completion-token budget to the model's remaining context window — the CLI no longer sends a fixed `max_tokens=32000` but estimates the remaining context for each request and caps `max_completion_tokens` accordingly. Set the new `KIMI_MODEL_MAX_COMPLETION_TOKENS` env var for an explicit hard cap (`KIMI_MODEL_MAX_TOKENS` remains a compatibility alias; `0` or a negative value disables clamping)
712
- Kosong: Stop Kimi from automatically sending the legacy `reasoning_effort` parameter when configuring thinking — requests now use `thinking.type` exclusively while preserving explicit legacy passthrough
13+
- Kosong: Fix empty-string `reasoning_content` from thinking models being dropped from history — a reply that reasoned but ended with empty reasoning was recorded as having no reasoning at all, so Preserved Thinking backends that require `reasoning_content` on every assistant message rejected the next request with a 400
814

915
## 1.47.0 (2026-06-05)
1016

docs/zh/release-notes/breaking-changes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
## 未发布
66

7+
## 1.49.0
8+
79
### Kimi 不再自动发送旧版 `reasoning_effort`
810

911
Kimi 的 Thinking 配置现在仅使用 `thinking.type``Kimi.with_thinking(...)` 不再自动把旧版 `reasoning_effort` 参数加入请求。

docs/zh/release-notes/changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44

55
## 未发布
66

7+
## 1.49.0 (2026-07-16)
8+
9+
**亮点**:Kimi 供应商的补全 token 预算现在会根据模型剩余上下文窗口动态调整,减少长轮次中的上下文超限错误
10+
11+
- LLM:将 Kimi 的补全 token 预算钳制在模型剩余上下文窗口内——CLI 不再固定发送 `max_tokens=32000`,而是按每次请求估算剩余上下文并据此设置 `max_completion_tokens` 上限。可通过新的环境变量 `KIMI_MODEL_MAX_COMPLETION_TOKENS` 设置显式硬上限(`KIMI_MODEL_MAX_TOKENS` 仍为兼容别名;设为 `0` 或负值可关闭钳制)
712
- Kosong:配置 Thinking 模式时不再自动向 Kimi 请求发送旧版 `reasoning_effort` 参数——请求现在仅使用 `thinking.type`,同时保留显式传递旧版参数的兼容能力
13+
- Kosong:修复 Thinking 模型返回的空字符串 `reasoning_content` 被从历史中丢弃的问题——此前「思考过但内容为空」的回复会被当作「没有思考」,导致要求每条 Assistant 消息都携带 `reasoning_content` 的 Preserved Thinking 后端在下一次请求时返回 400
814

915
## 1.47.0 (2026-06-05)
1016

packages/kimi-code/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[project]
22
name = "kimi-code"
3-
version = "1.48.0"
3+
version = "1.49.0"
44
description = "Kimi Code is a CLI agent that lives in your terminal."
55
readme = "README.md"
66
requires-python = ">=3.12"
7-
dependencies = ["kimi-cli==1.48.0"]
7+
dependencies = ["kimi-cli==1.49.0"]
88

99
[project.scripts]
1010
kimi-code = "kimi_cli.__main__:main"

packages/kosong/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22

33
## Unreleased
44

5+
## 0.55.0 (2026-07-16)
6+
57
- Kimi: Stop automatically sending the legacy `reasoning_effort` parameter when configuring thinking — requests now use `thinking.type` exclusively while preserving explicit legacy passthrough
68
- Kimi: Preserve empty-string `reasoning_content` as `ThinkPart(think="")` in both streaming and non-streaming responses — previously the truthy check dropped empty deltas, conflating "reasoned but empty" with "no reasoning at all"; the stored (empty) ThinkPart is what makes `_convert_message` emit `reasoning_content` on the next request, so preserved-thinking backends that require the field on every assistant message no longer 400 after a reason-free turn
9+
- Kimi: Add `GenerationKwargs.max_completion_tokens` and normalize the deprecated `max_tokens` alias to it before requests — the implicit `max_tokens=32000` default is no longer sent when the field is unset, so the server (or a per-request override) decides the budget
10+
- Kimi: Accept per-request `generation_overrides` in `generate()` — callers such as kimi-cli can now clamp `max_completion_tokens` for a single request without rebuilding the provider; the Chaos provider forwards overrides to the wrapped provider when present
11+
- Core: Expose the `x-trace-id` response header as `StreamedMessage.trace_id` and fire the new `on_trace_id` callback on `generate()` as soon as the header is available; `APIStatusError` now also carries `trace_id`
712

813
## 0.53.0 (2026-04-28)
914

packages/kosong/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "kosong"
3-
version = "0.54.0"
3+
version = "0.55.0"
44
description = "The LLM abstraction layer for modern AI agent applications."
55
readme = "README.md"
66
requires-python = ">=3.12"

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "kimi-cli"
3-
version = "1.48.0"
3+
version = "1.49.0"
44
description = "Kimi Code CLI is your next CLI agent."
55
readme = "README.md"
66
requires-python = ">=3.12"
@@ -9,7 +9,7 @@ dependencies = [
99
"aiofiles>=24.0,<26.0",
1010
"aiohttp==3.13.3",
1111
"typer==0.21.1",
12-
"kosong[contrib]==0.54.0",
12+
"kosong[contrib]==0.55.0",
1313
# loguru stays >=0.6.0 because notify-py (via batrachian-toad) caps it at <=0.6.0 on 3.14+.
1414
"loguru>=0.6.0,<0.8",
1515
"prompt-toolkit==3.0.52",

uv.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)