Repository navigation
Conversation
… Responses (11/14) For a chat served by ATOM gRPC workers, atomesh sends ATOM the chat's structured-output input with the request: tools, tool_choice and response_format as the client sent them, each message's own tools in `message_tools_json`, the merged template kwargs the prompt was rendered with (`merged_template_kwargs`), and whether the rendered prompt ends in one of the worker's reasoning markers. SGLang and vLLM requests are unchanged. For a model with an ATOM gRPC worker, the gRPC routers answer 400 `unsupported_media` to a chat or `/generate` carrying image, video, audio or embedding input, before preparing it, since ATOM receives only the rendered token ids; the regular gRPC router answers 501 `unsupported_api` to `/v1/responses` for such a model, and `/v1/messages` keeps its 501. SGLang and vLLM workers serve media and Responses as before. atomesh records how long a gRPC request's chat template and encode take, as `mesh_prepare_stage_seconds` by stage, beside the HTTP ingress's own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 21, 2026
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 11/14 of the stack proposed in #3657. No blocking issues.
Why
A chat sent through atomesh to an ATOM gRPC worker reached ATOM without its structured-output input, so a Kimi-K3 chat that must call a tool decoded without its required channel. A chat carrying an image was served as plain text, since ATOM receives only the rendered token ids.
What changed
prepare_chatfills the payload's newStructuredOutput: tools,tool_choiceandresponse_formatas sent, and each message's own tools apart. It adds the merged template kwargs the prompt was rendered with (merged_template_kwargs).prompt_opens_reasoningsays whether the rendered prompt ends in one of the worker's reasoning markers. SGLang and vLLM requests are unchanged.unsupported_mediato a chat or/generatecarrying image, video, audio or embedding input, before preparing it.unsupported_apito/v1/responsesfor such a model. SGLang and vLLM workers serve media and Responses as before.mesh_prepare_stage_secondstimes the template and encode stages.Review focus
tool_choicenarrows them.Testing
An ATOM chat carries its fields as sent, its kwargs and its reasoning opening; a plain chat carries none, and a chat to an SGLang or vLLM worker none. ATOM workers and an ATOM pair get no media, Responses or Messages request; SGLang and vLLM keep serving them.
jasen/atom-grpc-11-mesh-chat-fields@ fabd2e6: withatom-engine, 1401 lib and 303 integration tests passed. cargo fmt clean; clippy adds no warning of this PR's code.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
In
atom/mesh(rustc and clippy 1.100.0), at fabd2e6:Clippy against main cccc96a (warnings matched by message and file):
Against the PR below (part 10):
🤖 Generated with Claude Code