Files
anyllm-proxy/crates/optimizer/fixtures/samples/longchat.jsonl
whit3rabbitandClaude Opus 4.8 d155bfd148 feat: RTK tool-output compression and opt-in prompt optimizer
RTK (anyllm_rtk crate): command-aware filtering of tool-result text
(test/build/git/log output) via a catalog of 55 declarative filters ported
from OmniRoute (MIT). IO-free, deterministic, prompt-cache safe (cache_control
blocks preserved byte-for-byte). Wired into the Anthropic passthrough (stream +
non-stream) and OpenAI-translate paths, gated per-model via RTK_MODELS.
RTK_COMPRESS env / admin toggle, rtk_compress/rtk_models runtime config.

Optimizer (anyllm_optimize_* crates): opt-in Frozen-Frontier Extractive
Compression of long client-sent conversation history for OpenAI Chat
Completions, the Anthropic translate path, and the Anthropic passthrough path
(client history only, never proxy tool-loop turns). OPTIMIZER_MODE=off|shadow|
live env / admin toggle; live places a cache_control breakpoint at the frontier
over raw bytes. Optional LLMLingua-2 ONNX scorer behind the optimizer-onnx
feature (model fetched on demand, never bundled). New optimizer_* metrics
counters and GET/POST /admin/api/optimizer/model endpoints.

Both features expose runtime config + Settings UI controls and fail open on any
error. Adds workspace members, CI lint/test for the optimizer-onnx feature, and
gitignore rules for downloaded ONNX artifacts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-12 19:55:33 -05:00

2 lines
4.1 KiB
JSON

{"messages": [{"role": "user", "content": "Turn 0: The transition from the Roman Republic to the Empire unfolded over many decades and was shaped by ambitious generals, social unrest, and the gradual erosion of traditional senatorial authority across the provinces."}, {"role": "assistant", "content": "Turn 0: That is a rich topic, and historians often point to the concentration of military and financial power in individual commanders as the decisive structural cause behind the eventual collapse of republican institutions."}, {"role": "user", "content": "Turn 1: The transition from the Roman Republic to the Empire unfolded over many decades and was shaped by ambitious generals, social unrest, and the gradual erosion of traditional senatorial authority across the provinces."}, {"role": "assistant", "content": "Turn 1: That is a rich topic, and historians often point to the concentration of military and financial power in individual commanders as the decisive structural cause behind the eventual collapse of republican institutions."}, {"role": "user", "content": "Turn 2: The transition from the Roman Republic to the Empire unfolded over many decades and was shaped by ambitious generals, social unrest, and the gradual erosion of traditional senatorial authority across the provinces."}, {"role": "assistant", "content": "Turn 2: That is a rich topic, and historians often point to the concentration of military and financial power in individual commanders as the decisive structural cause behind the eventual collapse of republican institutions."}, {"role": "user", "content": "Turn 3: The transition from the Roman Republic to the Empire unfolded over many decades and was shaped by ambitious generals, social unrest, and the gradual erosion of traditional senatorial authority across the provinces."}, {"role": "assistant", "content": "Turn 3: That is a rich topic, and historians often point to the concentration of military and financial power in individual commanders as the decisive structural cause behind the eventual collapse of republican institutions."}, {"role": "user", "content": "Turn 4: The transition from the Roman Republic to the Empire unfolded over many decades and was shaped by ambitious generals, social unrest, and the gradual erosion of traditional senatorial authority across the provinces."}, {"role": "assistant", "content": "Turn 4: That is a rich topic, and historians often point to the concentration of military and financial power in individual commanders as the decisive structural cause behind the eventual collapse of republican institutions."}, {"role": "user", "content": "Turn 5: The transition from the Roman Republic to the Empire unfolded over many decades and was shaped by ambitious generals, social unrest, and the gradual erosion of traditional senatorial authority across the provinces."}, {"role": "assistant", "content": "Turn 5: That is a rich topic, and historians often point to the concentration of military and financial power in individual commanders as the decisive structural cause behind the eventual collapse of republican institutions."}, {"role": "user", "content": "Turn 6: The transition from the Roman Republic to the Empire unfolded over many decades and was shaped by ambitious generals, social unrest, and the gradual erosion of traditional senatorial authority across the provinces."}, {"role": "assistant", "content": "Turn 6: That is a rich topic, and historians often point to the concentration of military and financial power in individual commanders as the decisive structural cause behind the eventual collapse of republican institutions."}, {"role": "user", "content": "Turn 7: The transition from the Roman Republic to the Empire unfolded over many decades and was shaped by ambitious generals, social unrest, and the gradual erosion of traditional senatorial authority across the provinces."}, {"role": "assistant", "content": "Turn 7: That is a rich topic, and historians often point to the concentration of military and financial power in individual commanders as the decisive structural cause behind the eventual collapse of republican institutions."}, {"role": "user", "content": "Summarize the single most important cause in one short sentence."}]}