Skip to main content

TOKEN_SAVER_TOML

Constant TOKEN_SAVER_TOML 

Source
pub const TOKEN_SAVER_TOML: &str = r#"# built-in preset: token-saver — the reduction spine over the minimal core.
schema_version = 1
extends = "pi-core"                     # smallest surface = cheapest surface; every knob below overrides it

[core.tools]
schema_tier = "minimal"                 # TR-8/T5 schema tiering (config.rs:219-225)
# C9 (catalog §5 conflict 9): a GLOBAL minimal tier is a footgun for models trained on exact
# schemas. Per-tool override survives the global — pin any load-bearing tool back:
[core.tools.edit_file]
schema_tier = "full"                    # exact-string edit is the least forgiving schema; keep it verbatim

[core.compaction]
enabled = true
reserve_tokens = 24576                  # trigger earlier than pi's 16384 — spend the summary, save the window
keep_recent_tokens = 10000              # aggressive: half of pi's keep budget (recall traded — see caveats)
summarize = true                        # SpanSummary side-call (reduce.rs:274-289) → small_model below (D-9)

[capabilities.reduction]                # module 23 — ALL genuinely-optional passes on (≡ CLI reduce=true, userconfig.rs:33-38)
enabled = true
# NOTE (S7): no `truncation` key here — A7 ToolOutputTruncated (reduce.rs:95-103) is always-on core
# plumbing (§1.13), never a `[capabilities.reduction]` toggle, in token-saver same as every other preset.
stale_reads = true                      # A8 FileReadElided (reduce.rs:104-111)
diff_reads = true                       # TR-3 FileReadDiffed (reduce.rs:202-217)
duplicates = true                       # TR-2 DuplicateOutput (reduce.rs:228-234)
supersede = true                        # TR-6 Superseded (reduce/supersede.rs)
tool_input_elision = true               # TR-10 ToolInputElided (reduce.rs:148-169)
normalize_output = true                 # T30 OutputNormalized (reduce/normalize.rs)
image_redaction = true                  # A9 ImageRedacted (reduce.rs:112-116) — ON here, off everywhere else
span_summaries = true                   # TR-7 (reduce/summarize.rs; D-9)
handoff = true                          # reduce/handoff.rs — smallest-faithful-context model handoff

[capabilities.deferred_tools]           # module 24 — the FLAGSHIP lever (SPEC.md B6)
enabled = true
core = ["read_file", "bash", "edit_file", "write_file"]  # builtins stay eager; everything else behind tool_search

[capabilities.cache]                    # module 25 — the C2 referee
enabled = true
plan = "imported_prefix"                # CachePlan::ImportedPrefix (config.rs:88-96)
warnings = true                         # cache_warnings (config.rs:227-239): every prefix-churning feature must answer to this

[capabilities.model_catalog]            # module 26 — D-9 consumer
enabled = true
small_model = "anthropic/claude-haiku-4-5"  # compaction summaries + span summaries route here, not the main model
"#;
Expand description

token-saver — design §4.5.