qwen-code/packages
tanzhenxin f72a156e13
fix(anthropic): allow cache_control on tool_result blocks so the per-turn breakpoint advances (#4121)
The Anthropic adapter places three cache_control breakpoints (system, last tool,
last user message), but `addCacheControlToMessages` only attached the third when
the last block of the last user message was a non-empty text block. After turn 1
of any agentic conversation, the last user message is a tool_result, so the
breakpoint was silently dropped and the cacheable region collapsed back to
system+tools. Per-turn history was never cached.

Anthropic's docs explicitly list tool_result as a cacheable block type
(https://docs.claude.com/en/docs/build-with-claude/prompt-caching). Accepting
both text and tool_result keeps the breakpoint moving forward as the
conversation grows.
2026-05-14 10:07:11 +08:00
..
channels chore(release): v0.15.11 [skip ci] 2026-05-14 09:51:46 +08:00
cli chore(release): v0.15.11 [skip ci] 2026-05-14 09:51:46 +08:00
core fix(anthropic): allow cache_control on tool_result blocks so the per-turn breakpoint advances (#4121) 2026-05-14 10:07:11 +08:00
sdk-java fix(sdk-java): pass custom env to CLI process (#3543) 2026-04-24 10:37:52 +08:00
sdk-python doc[sdk-python] Expand Python SDK usage documentation (#3995) 2026-05-12 15:27:00 +08:00
sdk-typescript feat(cli,sdk): qwen serve daemon (Stage 1) (#3889) 2026-05-13 14:47:47 +08:00
vscode-ide-companion chore(release): v0.15.11 [skip ci] 2026-05-14 09:51:46 +08:00
web-templates chore(release): v0.15.11 [skip ci] 2026-05-14 09:51:46 +08:00
webui chore(release): v0.15.11 [skip ci] 2026-05-14 09:51:46 +08:00
zed-extension chore(deps): upgrade ink 6.2.3 → 7.0.2 + bump Node engine to 22 (#3860) 2026-05-11 17:29:50 +08:00