9router/open-sse/translator/formats
decolua 7e5f5a8813 fix(claude): re-anchor passthrough cache breakpoints with 1h TTL
Passthrough kept the client's own cache_control markers, which point at
pre-normalization offsets. Once normalize/dedupe reshaped system and tools,
the breakpoints landed mid-array and the tail was re-cached every request.

- Pin the last system block and last tool at ttl 1h (was the client's 5m)
- Anchor the last assistant turn at 5m, falling back to the final message
  so a first turn still gets a breakpoint
- Fold mid-conversation system messages into the neighbouring user turn
  instead of hoisting them into body.system, where the volatile token
  counters invalidated the prefix on every request
- Run the anchoring after every token saver, at the final body

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 16:08:30 +07:00
..
claude.js fix(claude): re-anchor passthrough cache breakpoints with 1h TTL 2026-08-14 16:08:30 +07:00
gemini.js fix(translator): drop JSON Schema keywords Gemini has no field for 2026-08-05 10:42:54 +07:00
maxTokens.js fix(claude): reconcile max_tokens vs thinking budget and lift per-model ceiling (#2381) 2026-07-05 17:38:16 +07:00
openai.js fix(alicode): preserve cache_control for DashScope providers (#2069) 2026-06-29 15:29:49 +07:00
responsesApi.js refactor(open-sse): translator DRY + schema enums, bug fixes, dead code cleanup 2026-06-14 18:49:38 +07:00