Repository navigation
build: add Dockerfile + render blueprint for rust ai-gateway - #31154
Conversation
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Greptile SummaryThis PR adds deploy artifacts for the Rust AI Gateway realtime WebSocket proxy: a multi-stage Dockerfile (cargo-chef dependency caching,
Confidence Score: 5/5Infrastructure-only change adding Docker and Render deploy artifacts; no production code paths are modified. All files are new additions with no existing behavior altered. The Dockerfile multi-stage build is correctly structured with cargo-chef, non-root runtime user, and matching feature flags across cook and build steps. Render blueprint paths and secret handling are correct. No credentials are baked into any file. No files require special attention; the render.yaml and README are worth a quick glance to confirm the auto-deploy trigger setting matches your intended deployment policy.
|
| Filename | Overview |
|---|---|
| litellm-rust/crates/ai-gateway/Dockerfile | Well-structured multi-stage build: chef→planner→builder (cargo-chef with --locked and matching --features python-config in both cook and build) + python:3.11-slim-bookworm runtime with CA certs, non-root appuser, and litellm installed from source. |
| litellm-rust/crates/ai-gateway/Dockerfile.dockerignore | Correctly uses BuildKit's Dockerfile-specific dockerignore convention; allowlist strategy re-includes only litellm/, litellm-rust/, and packaging metadata while pruning target/, pycache, node_modules, and tests. |
| litellm-rust/crates/ai-gateway/render.yaml | Render blueprint with correct repo-root dockerContext and dockerfilePath; secrets marked sync: false. autoDeployTrigger: off is absent — deploys will fire automatically on every commit despite documentation stating manual-only. |
| litellm-rust/crates/ai-gateway/config.yaml | Sample config using gpt-realtime (confirmed valid GA model alias) and os.environ/OPENAI_API_KEY secret reference; no inlined secrets. |
| litellm-rust/crates/ai-gateway/README.md | Comprehensive deployment guide; the deploy section still references the deprecated autoDeploy field name rather than the current autoDeployTrigger. |
Reviews (11): Last reviewed commit: "ci: re-trigger flaky otel fake-openai-en..." | Re-trigger Greptile
Greptile SummaryThis PR adds the container and cloud-deployment artifacts for the Rust realtime WebSocket AI gateway: a multi-stage Dockerfile and a Render blueprint. The Dockerfile itself is well-structured, but the
Confidence Score: 3/5The Dockerfile builds correctly in isolation, but the Render blueprint has wrong path values that will prevent any deployment from completing — the service will never start on Render as written. The
|
| Filename | Overview |
|---|---|
| litellm-rust/crates/ai-gateway/render.yaml | Render blueprint for the Rust AI gateway; dockerfilePath and dockerContext are both wrong relative to the repository root, which will cause the Render build to fail to locate the Dockerfile and pass the wrong Docker build context. |
| litellm-rust/crates/ai-gateway/Dockerfile | Multi-stage Rust build with a slim Debian runtime; structurally correct, but lacks a non-root USER directive and has no dependency-caching layer separation, which will slow rebuilds. |
Reviews (2): Last reviewed commit: "build: add render blueprint for rust ai-..." | Re-trigger Greptile
f268174 to
138d221
Compare
138d221 to
47c63dd
Compare
|
@greptile review |
|
@greptile review |
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 1 · PR risk: 0/10 |
|
@greptile review |
1 similar comment
|
@greptile review |
|
@greptile review |
|
@greptile review |
1 similar comment
|
@greptile review |
Relevant issues
Adds the deploy artifacts for the Rust ai-gateway (realtime WebSocket proxy) so it can be built as a container and run on Render. Stacks on
litellm_rust_realtime_ai_gatewaysince the Rust code only lives there.Pre-Submission checklist
Type
🚄 Infrastructure
Changes
litellm-rust/crates/ai-gateway/Dockerfile— multi-stage build. Rust builder compiles onlylitellm-ai-gatewaywith--release --lockedand default features (nopython-config, so libpython is never linked). Runtime isdebian:bookworm-slimwith CA certs,HOST=0.0.0.0, and the binary as entrypoint. Build context is thelitellm-rust/workspace root so the workspaceCargo.lockis used.litellm-rust/crates/ai-gateway/render.yaml— Render blueprint for a single-instance Docker web service. Health check on/health/readiness, non-secret env vars (OPENAI_REALTIME_MODEL,HOST) inline, secrets (LITELLM_MASTER_KEY,OPENAI_API_KEY) markedsync: false.No secrets in either file. Image builds clean locally from the
litellm-rust/context; the gateway serveswss://.../v1/realtimeover Render's TLS endpoint.