Skip to content

[None][feat] Add vendored openengine protos and generated gRPC stubs - #17019

Closed
tanmayv25 wants to merge 1 commit into
NVIDIA:mainfrom
tanmayv25:user/tanmayv25/openengine-grpc-support
Closed

[None][feat] Add vendored openengine protos and generated gRPC stubs#17019
tanmayv25 wants to merge 1 commit into
NVIDIA:mainfrom
tanmayv25:user/tanmayv25/openengine-grpc-support

Conversation

@tanmayv25

@tanmayv25 tanmayv25 commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

First implementation step for openengine gRPC protocol support in trtllm-serve. Part of RFC #17016.

This vendors the openengine v1 .proto contract and commits the generated Python/gRPC stubs. It adds no new external pip dependency — the stubs need only the grpcio/protobuf runtimes, which are already pulled in transitively via smg-grpc-proto.

Draft: protos + stubs only. The servicer, proto↔TensorRT-LLM converters, and serve.py wiring land in follow-up PRs so each stays reviewable.

What's included

  • Vendored protos under tensorrt_llm/grpc/openengine/proto/openengine/v1/, pinned to openengine commit b8d052f (recorded in PIN.md).
  • Committed generated stubs (*_pb2.py, *_pb2_grpc.py, *.pyi), flat in the package, with cross-imports rewritten to package-relative.
  • generate_stubs.sh to regenerate the stubs from the vendored protos (grpcio-tools==1.64.1; gencode targets Protobuf Python 5.26.1).
  • .pre-commit-config.yaml: exclude the vendored protos and generated stubs from formatters/linters — the stubs stay byte-identical to generate_stubs.sh output, and the vendored .proto/LICENSE are left untouched.

Design (per RFC #17016)

  • Alongside SMG, not replacing it — selected later via --grpc-protocol.
  • Copy-the-proto, not buf — self-contained, hermetic, no build-time codegen.
  • Token-IDs-only contract, matching the existing gRPC server.

Not in this PR (follow-ups)

  • OpenEngineInferenceServicer + OpenEngineControlServicer.
  • openengine → SamplingParams / stopping / response / guided-decoding converters.
  • --grpc-protocol {smg,openengine} wiring in serve.py.
  • Unit tests + api_stability reference update.

Test

  • Generated stubs import and cross-imports resolve.
  • No runtime behavior change: nothing imports this package yet.

@tanmayv25
tanmayv25 force-pushed the user/tanmayv25/openengine-grpc-support branch 2 times, most recently from 71f206f to b4bef7c Compare July 29, 2026 23:33
First step toward openengine gRPC protocol support (see RFC NVIDIA#17016).

Vendors the openengine v1 .proto contract from ai-dynamo/openengine at a
pinned commit and commits the generated Python/gRPC stubs. No external pip
package is added; the stubs need only the grpcio/protobuf runtimes already
used for gRPC serving.

- Vendored protos under proto/openengine/v1/ (pinned commit recorded in PIN.md)
- Committed *_pb2 / *_pb2_grpc / *.pyi stubs (grpcio-tools 1.64.1, gencode 5.26)
- generate_stubs.sh regenerates the stubs from the vendored protos
- Exclude the vendored protos and generated stubs from formatters/linters

Servicer, converters, and serve.py wiring follow in later changes.

Signed-off-by: tanmayv25 <tanmay2592@gmail.com>
@tanmayv25
tanmayv25 force-pushed the user/tanmayv25/openengine-grpc-support branch from b4bef7c to 5e70244 Compare July 30, 2026 17:39
@tanmayv25

Copy link
Copy Markdown
Collaborator Author

Instead of copying proto, will go via buf route.

@tanmayv25 tanmayv25 closed this Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant