Expand description
Cache-safe wire verbosity steer (#895 Track B).
Opt-in (proxy.verbosity_steer). When on, the proxy appends a single
constant “be concise” instruction to the last user turn of each
request. Output-shaping for non-rules-aware clients: lean-ctx already steers
verbosity through rules injection for editors that load rules, but raw API
clients (and the holdout’s treatment arm) need it on the wire.
Cache-safety, by construction:
- The steer is constant (identical bytes every turn), so it never adds per-turn entropy.
- It is appended after all existing content of the last user turn — i.e.
strictly after the last
cache_controlbreakpoint — and never modifies acache_control-anchored block. The provider’s cached prefix (everything up to the last breakpoint) stays byte-identical across turns (#448/#498); only the always-reprocessed tail grows by the constant suffix. - For array content the suffix is a new trailing text element; existing
blocks (including cache anchors) are left untouched. For plain-string
content (OpenAI prefix-cached; Anthropic strings carry no
cache_control) the suffix is concatenated. - Idempotent: if the steer is already present it is not appended again.
Constants§
- STEER
- The constant verbosity instruction. Kept short and directive; its byte stability is what makes the steer prompt-cache-safe.
Functions§
- apply_
anthropic - Append the steer to the last user message of an Anthropic
/v1/messagesbody. No-op (returns false) when there is no user turn. - apply_
google - Append the steer to the last user turn of a Gemini
generateContentbody (contents[].parts[]). - apply_
openai_ chat - Append the steer to the last user message of an OpenAI Chat Completions body. OpenAI prefix-caches automatically, so appending to the newest turn never disturbs a previously cached prefix.
- apply_
openai_ responses - Append the steer to the last user item of an OpenAI Responses body.
inputis either a plain string or an array of role/content items. - steered_
count - Total requests that received a wire verbosity steer (telemetry).