Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,24 @@ The existing `orchestrator:provider_budget` event exposes each preflight's
attempt, result, estimate, allowance, and requested context budget to mounted
observability consumers.

### Provider-count measured compaction

When both sides advertise the optional measured contracts —
`context.measured_request_view` and
`request_budget:provider_count` — the loop lets Context compact against the
provider's native input count. Context returns the exact `ChatRequest` it
counted, and the loop sends that same object after committing the selected
retention transaction. This path is additive: contexts and providers without
both capabilities keep the legacy request-budget preflight and estimate-based
retention behavior.

For non-streaming foreground responses, the optional
`context.foreground_usage` capability records only normalized successful
response usage. A counted streaming request records its selected provider count.
If a pre-chunk overflow requires a stream retry, that reading is marked stale
rather than attributed to the replacement request. Streams without a provider
count do not invent usage; an already-owned reading is marked stale.

### Provider-reported overflow recovery

A provider may optionally expose synchronous `recover_context_overflow` to
Expand Down
Loading
Loading