kimi-code/docs/zh/configuration
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
..
config-files.md feat(agent-core): enable Preserved Thinking by default on the Anthropic provider (#1432) 2026-07-06 23:45:17 +08:00
data-locations.md feat(update): roll out automatic updates in staged batches via CDN manifest (#691) 2026-06-15 16:52:44 +08:00
env-vars.md feat(agent-core): enable Preserved Thinking by default on the Anthropic provider (#1432) 2026-07-06 23:45:17 +08:00
overrides.md feat(cli): add -c as shorthand for --continue (#999) 2026-06-23 13:53:31 +08:00
providers.md fix(provider): honor base_url for google-genai and vertexai providers (#1269) 2026-07-01 19:33:35 +08:00