Repository navigation
Replies: 3 comments 1 reply
|
Hi! I think this would benefit from an explicit contract defining what a forked session inherits and what must be transmitted to the model on its first turn. The important distinction is between preserving the complete logical conversation history and serializing all inherited history again in the first request. If the provider supports reusable context or cached prefixes, those capabilities could potentially reduce repeated transmission. Otherwise, a request-size budget and clear diagnostics would still be useful. I would add tests comparing the parent and forked sessions for prompt consistency, inherited tool state, and request size. The optimization should preserve model-visible context rather than silently removing conversation history. |
|
The full upload is deliberate in Your 7.5 MB field fits the default 8 MiB upload limit. To stop sending it to your proxy, turn off Settings → General → Upload Session Log when using the official model API. This disables the metadata contribution while preserving the conversation inputs. Re-enabling resumes the pending log, including events recorded while disabled. You can also lower the plugin's The release's upload documentation distinguishes this metadata from model input. The adapter does not insert |
|
Understood — if the full re-upload is deliberate and covered by a test, then the "7.5 MB first request" is by design and we will treat it as expected cost rather than a regression. That leaves the second half of our report as the actionable bit: the |
Uh oh!
There was an error while loading. Please reload this page.
Seeded (forked) session: first request re-uploads the entire inherited log — 7.5 MB body, and a shifted system prompt
Environment: DSH Desktop 0.2.0-rc.2 (web), Windows 11, provider
deepseek-official/deepseek-flash.Related: #9927 (session-log upload keyed to provider, not endpoint), and the proxy-side counterpart I filed at ranxianglei/billion-context#5519.
What I measured
I forked a long-running session (parent
session-da4469c3, 113 messages, already folded by the proxy) and sent a single "1" in the fork. Both requests were captured as outgoing bodies (proxy-sidediagnostics.dumpBody).dsh_session_logsystemmessagestoolsSo the 14× body inflation is entirely
dsh_session_log: on the fork's first turn the uploader appears to send the whole inherited transcript, then falls back to the usual ~10 KB tail on subsequent turns.Two questions
Is the full re-upload intended? For a seeded session the log uploader has no prior state for the new session id, so it starts from zero. That is defensible for fidelity, but it costs 7.5 MB per fork on the wire. Would an incremental/opt-in mode be acceptable (e.g. only upload when the endpoint is the official one and the session is not a fork, or send a compact manifest)?
System prompt differs between parent and fork (667 chars). The parent carries a state note in the system prompt (
Generation boundary: this conversation's message-ref ledger was reset mid-conversation …); the fork, whose refs legitimately start at m00001, does not. Content-wise that is correct, but it means the wire prefix of a fork can never hash-match its parent, which is exactly the condition a prompt-cache-aware proxy needs. Would you consider keeping state-dependent notes out of the system prompt (tail attachment / separate field), or is "fork = new prefix" the intended contract?Why it matters here
The proxy prices a fork at full input the first turn (0.4% cache hit) before recovering to ~90% on later turns. Part of that is the proxy's own breakpoint inheritance (filed separately as #5519); part is this upstream prefix drift. Worth documenting either way: if forks are meant to be prefix-compatible, one of the two layers needs to change.
Repro
diagnostics.dumpBody: trueon the proxy (or any request-logging gateway).dsh_session_logsize andsystembetween the parent's last turn and the fork's first turn.All reactions