kimi-code/docs/en
Kai 25a655cf88
feat(agent-core): enable Preserved Thinking by default on the Anthropic provider (#1432)
* feat(agent-core): enable Preserved Thinking by default on the Anthropic provider

Default thinking.keep to "all" for the Anthropic provider (Claude and Kimi in Anthropic-compatible mode) while Thinking is on, via a context_management clear_thinking_20251015 edit, mirroring the Kimi default. Reuses [thinking] keep and KIMI_MODEL_THINKING_KEEP (env > config > default "all"); off-values disable it.

* feat(kosong): route Anthropic Preserved Thinking through the beta Messages API

Force the beta endpoint (client.beta.messages.create) when thinking.keep is enabled, since clear_thinking_20251015 is only honored there. Also prepend clear_thinking to any existing context-management edits (for example clear_tool_uses) instead of replacing them, keeping it first as Anthropic requires when combining edits.

* docs: clarify Anthropic beta endpoint and compaction keep behavior

Note in code comments and bilingual docs that enabling Anthropic Preserved Thinking routes requests to the beta Messages API (client.beta.messages.create), with keep=off as the escape hatch back to the standard endpoint. Correct the resolveThinkingKeep comment to reflect that compaction shares ConfigState.provider and intentionally carries the same keep.

* test(kosong): cover Anthropic beta endpoint (streaming and forced betaApi)

Add a streaming beta-endpoint capture and a test that withThinkingKeep forces the beta endpoint even when constructed with betaApi: false, pinning down the documented behavior.
2026-07-06 23:45:17 +08:00
..
configuration feat(agent-core): enable Preserved Thinking by default on the Anthropic provider (#1432) 2026-07-06 23:45:17 +08:00
customization docs: document plugin slash commands (#1253) 2026-07-01 13:49:43 +08:00
guides feat(tui): show compaction summary with Ctrl-O (#1346) 2026-07-06 13:32:37 +08:00
reference feat(tui): show compaction summary with Ctrl-O (#1346) 2026-07-06 13:32:37 +08:00
release-notes docs(changelog): fix tui revert wording in 0.22.3 (#1376) 2026-07-04 19:57:03 +08:00
index.md Kimi For Coding 2026-05-22 15:54:50 +08:00