You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dfa18d5
Browse filesBrowse the repository at this point in the historyBrowse files
feat(mesh): charge non-streaming single-worker prefill, release on the KV event
A non-streaming single-worker request charged no prefill, so agentic saw a
worker prefilling a long prompt as idle until the response ended.
- The planner charges a single-worker prompt whether or not it streams.
- KvEventMonitor::watch_prefill registers a non-streaming request's charge on
the selected rank's lane, keyed by the prefix hash of the prompt's last full
block; called on HTTP, ext-proc and gRPC.
- The index writer releases one watch per stored block, oldest first, and
skips charges the first byte already released; a released lane drops its
watches and the sweep prunes watches whose guard is gone. Registration holds
the subscription's map entry, so a lane cannot be released and reused
mid-register.
- The first byte stays the fallback: cached repeats, sub-block prompts and
workers without a KV event subscription (gRPC single workers today).
- docs/agentic_cost.md and the mesh_worker_prefill_tokens help no longer list
an uncharged single-worker path.
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments