ktx/packages
Andrey Avtomonov 49f1e2720e
fix(llm): wire prompt caching through all Anthropic call sites (#90)
* fix(llm): wire prompt caching through all Anthropic call sites

- page-triage classifier + light-extraction now put the static skill
  prompt in `system:` so the per-document caches hit instead of
  re-sending boilerplate in the user message every call.
- Description generation builders return `{ system, user }` with
  instruction text + word limit moved into the cacheable system.
- Relationship-LLM proposal framing moved to `system:`.
- `KtxMessageBuilder.wrapSimple` skips the history breakpoint for
  single-message calls (cache write that could never be reused).
- Gateway backend now sets `anthropic-beta: extended-cache-ttl-2025-04-11`
  so 1h TTLs don't silently downgrade to 5m on Gateway routes.

* fix(llm): keep wrapSimple history breakpoint so multi-step agent loops cache

Reverts the wrapSimple `messages.length > 1` guard from the prior commit.
agent-runner uses wrapSimple with a single user message, but generateText
runs a multi-step tool loop inside it — the cache marker on the first user
message is reused by every subsequent step, so it isn't waste.
The release validator (scripts/validate-llm-debug-jsonl.mjs) also requires
a `message-part` marker target in captured debug JSONL.
2026-05-14 15:36:27 +02:00
..
cli feat(cli): unify wiki and sl search output with clack-style box and score badge (#89) 2026-05-14 15:15:20 +02:00
connector-bigquery fix: clean up ktx yaml config parameters (#75) 2026-05-14 01:27:31 +02:00
connector-clickhouse ci: add codecov coverage reporting (#82) 2026-05-14 01:13:31 +02:00
connector-mysql ci: add codecov coverage reporting (#82) 2026-05-14 01:13:31 +02:00
connector-postgres ci: add codecov coverage reporting (#82) 2026-05-14 01:13:31 +02:00
connector-snowflake ci: add codecov coverage reporting (#82) 2026-05-14 01:13:31 +02:00
connector-sqlite fix: clean up ktx yaml config parameters (#75) 2026-05-14 01:27:31 +02:00
connector-sqlserver ci: add codecov coverage reporting (#82) 2026-05-14 01:13:31 +02:00
context fix(llm): wire prompt caching through all Anthropic call sites (#90) 2026-05-14 15:36:27 +02:00
llm fix(llm): wire prompt caching through all Anthropic call sites (#90) 2026-05-14 15:36:27 +02:00