Repository navigation
Conversation
…3/14) `atom/entrypoints/grpc/atom_grpc.proto` defines `atom.grpc.v1.AtomEngine`, ATOM's own gRPC service: token ids in, token ids out. It imports engine_v1 for `SamplingParams` and `TokenIds`, so a Session carries engine_v1 messages unchanged. `PrepareStructuredOutput` takes a chat's `StructuredOutput` with the request's sampling, stop ids and kv_transfer_params, and answers with the engine_v1 `SamplingParams` fields the HTTP chat route derives from them. `python -m atom.entrypoints.grpc.generate` writes the committed `atom_grpc_pb2.py`, `atom_grpc_pb2_grpc.py` and `engine_v1_pb2.py` with grpcio-tools 1.78.0; ruff and black skip them, and `tests/test_grpc_proto.py` fails when one differs from what it writes. `pyproject.toml` declares `grpcio>=1.78.0` and `protobuf>=6.31.1,<7`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 21, 2026
Closed
Closed
Collaborator
Author
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 3/14 of the stack proposed in #3657. No blocking issues.
Why
ATOM served HTTP only: a router that renders and tokenizes chats itself had no ATOM service to send token ids to, and the EngineCore wire protocol (engine_v1) had no Python binding.
What changed
atom/entrypoints/grpc/atom_grpc.protodefinesatom.grpc.v1.AtomEngine: Generate, Abort, GetModelInfo, GetServerInfo, HealthCheck, the Session (engine_v1 messages both ways) and PrepareStructuredOutput. It imports engine_v1 forSamplingParamsandTokenIds.PrepareStructuredOutputtakes a chat'sStructuredOutputwith the request's sampling, stop ids and kv_transfer_params, and answers the engine_v1SamplingParamsfields the HTTP chat route derives from them.python -m atom.entrypoints.grpc.generatewrites the committedatom_grpc_pb2.py,atom_grpc_pb2_grpc.pyandengine_v1_pb2.pywith grpcio-tools 1.78.0; ruff and black skip them.pyproject.tomldeclaresgrpcio>=1.78.0andprotobuf>=6.31.1,<7, the floors the modules check at import and the versions the Docker image installs.Review focus
StructuredOutput: message-declared tools ride apart from the top-level tools, which the chat route reads differently.pyproject.toml.Testing
tests/test_grpc_proto.pychecks that the committed modules are byte-identical to whatgenerate.pywrites, and the service's RPCs and message shapes.jasen/atom-grpc-03-proto@ 53dd007:tests/test_grpc_proto.py5 passed, the committed modules byte-identical togenerate.py's output under grpcio-tools 1.78.0. ruff, black clean.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. Bottom to top:1 and 2 stand alone; 6 to 13 need only part 3 of the Python side; 14 changes both sides of the Session.
Evidence
At 53dd007, with grpcio-tools 1.78.0 and protobuf 6.33.6:
pytest tests/test_grpc_proto.py5 passed; ruff check and black --check (26.10.1) clean on the changed files, the three protoc modules excluded from both.AtomEngine's RPCs: Generate, Abort, GetModelInfo, GetServerInfo, HealthCheck, Session, PrepareStructuredOutput.
🤖 Generated with Claude Code