feat(agent): adaptive thinking for Kimi-family Anthropic endpoints - #67231
feat(agent): adaptive thinking for Kimi-family Anthropic endpoints#67231webtecnica wants to merge 1 commit into
Conversation
Kimi's Anthropic-compatible endpoints (api.moonshot.cn/anthropic, api.kimi.com/coding) now implement the adaptive thinking contract (thinking.type="adaptive" + output_config.effort), and the replay-validation 400s that originally motivated dropping the thinking parameter (NousResearch#13848) no longer occur. - _supports_adaptive_thinking() returns True for Kimi-family models - Remove blanket Kimi thinking suppression in build_anthropic_kwargs() - MiniMax and other non-adaptive third parties keep the manual budget_tokens path; Claude behavior unchanged - Update tests: Kimi gets adaptive thinking, effort mapping verified Closes NousResearch#67228
5b1a3e0 to
75578f4
Compare
|
Thanks for isolating the Kimi change and retaining the existing replay coverage. Current The PR tests cover official and proxied Kimi-family endpoint shapes, effort mapping, disabled thinking, and retain the unsigned replay regression at Automated hermes-sweeper review. |
|
Closing as an exact duplicate of #67228 — the two diffs are byte-identical (same adapter change, same tests) and #67228 was submitted first (01:03 vs 01:11 UTC). Consolidating review onto #67228; if it lands, both approaches are covered since they're the same change. Thanks for the contribution — please coordinate on #67228 going forward. |
Kimi's Anthropic-compatible endpoints (
api.moonshot.cn/anthropic,api.kimi.com/coding) implement the adaptive thinking contract — they acceptthinking.type=adaptive+output_config.effort(all of low, medium, high, xhigh, max verified live) and return thinking blocks, and the replay-validation 400s that originally motivated dropping the parameter (#13848) no longer occur._supports_adaptive_thinking()now returnsTruefor Kimi-family models, so they getthinking={type: adaptive, display: summarized}+output_config.effortviaADAPTIVE_EFFORT_MAPinstead of nothing, and the blanket drop of thethinkingparameter for Kimi-family endpoints is removed. MiniMax and other non-adaptive third parties keep the manualbudget_tokenspath; Claude behavior is unchanged.What does this PR do?
Kimi's Anthropic-compatible endpoints (
api.moonshot.cn/anthropic,api.kimi.com/coding) implement the adaptive thinking contract. Stop dropping thethinkingparameter for the Kimi family and send it in adaptive form.Related Issue
Fixes #67228
Type of Change
Changes Made
_supports_adaptive_thinking()returns True for Kimi-family models →thinking={type: adaptive, display: summarized}+output_config.effortviaADAPTIVE_EFFORT_MAP(never manualbudget_tokens)thinkingparameter for Kimi-family endpoints ([Bug]: 400 error for kimi-for-coding #13848-era mitigation) is removedbudget_tokenspath; Claude behavior unchangedHow to Test
Test it against the kimi for coding endpoint:
thinking.type="adaptive"+output_config.effortin {low, medium, high, xhigh, max} → all HTTP 200 with thinking blocks;display="summarized"acceptedChecklist