mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-07-26 01:25:35 +00:00
* 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. |
||
|---|---|---|
| .. | ||
| e2e | ||
| fixtures | ||
| providers | ||
| anthropic-errors.test.ts | ||
| anthropic.test.ts | ||
| capability-providers.test.ts | ||
| capability.test.ts | ||
| catalog.test.ts | ||
| echo-provider.test.ts | ||
| errors.test.ts | ||
| finish-reason.test.ts | ||
| generate.test.ts | ||
| google-genai.test.ts | ||
| kimi-files.test.ts | ||
| kimi.test.ts | ||
| message.test.ts | ||
| openai-common-errors.test.ts | ||
| openai-legacy.test.ts | ||
| openai-responses.test.ts | ||
| provider.test.ts | ||
| regression.test.ts | ||
| scripted-echo-provider.test.ts | ||
| select-tools.test.ts | ||
| simple-toolset.test.ts | ||
| step.test.ts | ||
| stress.test.ts | ||
| strict-role-alternation.test.ts | ||
| tool-message-conversion.test.ts | ||
| type-safety-negative.ts | ||
| type-safety.test.ts | ||
| typed-tool.test.ts | ||
| usage.test.ts | ||