Repository navigation
Conversation
Each ATOM instance gets one Session, shared by its ranks and opened by its first request. Outputs are split by seq_id into one stream per request that carries what a Generate call sends, so `AtomStream` turns it into token chunks; a dropped request sends Abort, a broken Session fails its requests and the next request opens a new one, a Ready of another protocol version is refused, and seq ids stay below 2^24. Nothing routes requests over it until `--atom-grpc-session`. A non-streaming request's ids are kept from its StreamBatch entries for its Complete, since a Completions item carries none, and each Session runs on a connection, thread and runtime of its own, off the router's runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…c-session) With `--atom-grpc-session`, both gRPC routers send ATOM requests over each instance's Session instead of a Generate call per request: the single path and each relay and chunked leg go through `AtomCalls::start`. A chat first calls `PrepareStructuredOutput` and copies its four derived fields into the request's sampling. Without the flag nothing changes. `atom/mesh/README.md` describes ATOM gRPC workers and the flag. This branch carries the Session link's commit, which it builds on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 21, 2026
Jasen2201
marked this pull request as ready for review
November 22, 2026 12:21
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…omesh Session routing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 23, 2026
mod.rs, stream.rs and session_test.rs under engine/atom keep this branch's version: it already holds the Session link's change to them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jasen2201
changed the base branch from
jasen/atom-grpc-f-mesh-chat-render
to
jasen/atom-grpc-g-mesh-session-link
November 23, 2026 07:59
…lds at their defaults GetServerInfoResponse now also carries kv_event_sources_json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on routing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on routing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…late admission, per-call Qwen arguments, conservative cut-off close) into Session routing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rker's removal into Session routing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uctured output's fixes into routing over the Session Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…outes over the Session Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--atom-grpc-session sits beside main's --atom-pd-concurrent and the kv-storage options in the CLI and router config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Part H of the 8 PRs proposed in #3657 (regrouped by function). No blocking issues.
Based on G; it needs F and G, and at runtime the Session RPC that C serves.
Why
atomesh sent each request to an ATOM worker on a Generate call of its own. A relay request opened one call on P and another on D, where a Session carries every request to an instance on one call.
What changed
--atom-grpc-sessionsetsRouterConfig.atom_grpc_sessionviaRouterConfigBuilder::atom_grpc_session, which embedders can call too.AtomCalls::startis the one per-request call for the single path and each relay and chunked leg: a Generate call, or the instance's Session with the flag.dp_session_idanddp_parent_session_id.atom/mesh/README.mddescribes ATOM gRPC workers and the flag.Review focus
Testing
Over an in-process Session stub, a chat runs after ATOM prepares its structured output and carries its session ids. Relay runs D once P completes, chunked runs both legs at once, and a removed instance's Session is released.
jasen/atom-grpc-h-mesh-session-routing@ e1041c8: all tests pass, with and withoutatom-engine(Evidence); gRPC Python: 115 passed. cargo fmt clean; clippy adds no warning.GPU results
On DeepSeek-V4.1-Flash 6P16D, AgentX at 1,228 concurrent sessions, TTFT over gRPC is at parity with HTTP: it is bound by the prefill queue. No request failed.
GPU numbers
DeepSeek-V4.1-Flash, 6P16D (P TP2 DP2, D TP4 DP4, shared Mooncake Store), AgentX C1228 for 900 s, two runs per configuration, mean of the two. atomesh's prompt encoding came from
ROCm/ATOM#3596(fastokens) and its V4.1 chat render fromROCm/ATOM#3597, neither part of this stack; the stack's code was the integration branch at this stack's part 14.HTTP's two TTFT means were 0.34 s apart, more than either gRPC difference. GSM8K (lm_eval, 1,319 questions, 1P1D, twice each): gRPC 0.930 and 0.929, HTTP 0.927 and 0.930. Prompt token parity between atomesh's render and ATOM's HTTP chat: 59 of 59 (21 GSM8K, 38 AgentX and tool-call prompts).
Follow-ups
none
Stack
ATOM serves
atom.grpc.v1.AtomEnginebeside its HTTP server (token ids in, token ids out, ATOM's P/D flow unchanged), and atomesh routes to ATOM gRPC workers over a Generate call per request or one Session per instance. One linear stack, merged bottom to top: A, B, C, D, E, F, G, H; each PR's base is the one before it.Evidence
In
atom/mesh(rustc and clippy 1.100.0), at e1041c8:cargo fmt --checkpasses, andcargo clippy --all-targets, with and withoutatom-engine, warns on none of the lines this PR adds.The integration branch's end-to-end tests, not part of this stack, ran against the whole stack on CPU instances with a stub model runner, with atomesh built from it (single, P/D relay and chunked, DP P/D, 22 DP ranks, structured output, stops, refusals, Session): 290 passed and 2 failed. One is a timing case reading an atomesh debug event this stack does not carry; the other, a P/D client-cancel case, passed 4 of 4 on a rerun.
🤖 Generated with Claude Code