ai-transcoder sandbox: requirements for resubmission

Đang mở
#1,499 3 bình luận 1 reaction 2 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@phlax đang làm issue này rồi.

Từ ngày 12/10/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

enhancement

#1470 (ai-transcoder sandbox) was approved and merged within ~1 minute with no review comments. It has been reverted. The example is not to be fixed forward from the reverted state — it needs to be resubmitted as a new PR that meets the standards of the existing sandboxes, and go through proper review.

This issue tracks what a resubmission must address.

Blockers

1. No run-sandbox.sh

No other sandbox ships an interactive wrapper script. The one in #1470 prompted for secrets, hardcoded ENVOY_VARIANT=dev, duplicated steps 1–2 of the docs, was not exercised by verify.sh or CI, and was shipped into the docs via :download:. The documented docker compose steps are the only supported entry point. Drop it entirely.

2. No hard dependency on third-party services

As submitted, the example required OpenAI, Anthropic and Vertex AI API keys plus a GCP project to do anything at all. The only precedent for a third-party dependency is single-page-app, which runs and is verified end-to-end against a local mock (myhub), and only introduces the real service as an optional, clearly-documented final step that tells the reader exactly how to obtain the credential and what to do with it. As landed, this read as a promo for external AI services rather than a demonstration of Envoy.

Required: local mock upstreams that speak the OpenAI, Anthropic and Gemini wire formats (unary JSON and SSE) with canned responses. The point of the example is Envoy's transcoding, not the model output, so mocks demonstrate it fully and make the output deterministic. This also removes the sed-rewrite of envoy.yaml in docker-compose.yaml, the API-key env plumbing, and the DFP/TLS incidental complexity.

Any real-provider step, if included at all, must be optional and last, following the SPA pattern. Not convinced it is needed.

3. verify.sh must mirror the docs

verify.sh is expected to follow the documented steps more or less 1-2-1. The submitted one bore little resemblance to example.rst, and in CI every provider test was skipped (no keys), so the only thing verified was the local 404 path and a zero-valued transcoder.failed stat on a proxy that never transcoded anything. With mocks, every step can and must be asserted.

4. example.rst must follow sandbox docs conventions

The submitted rst was 417 lines, 8 steps, SDK code samples, a list-table, a "Limitations" section, hardcoded dates/timestamps in sample output, and :lines: ranges into envoy.yaml that silently drift. Rewrite to the shape and length of existing examples, with reproducible output.

Notes

The submission relies on envoyproxy/envoy:dev and the alpha ai_protocol_manager APIs (envoyproxy/envoy#47682, envoyproxy/envoy#47916). Depending on unreleased Envoy is not in itself a blocker — the example will work once Envoy is released — though providing a sandbox for alpha code is not ideal.

Process

  • Resubmit as a new PR, not a re-land of the reverted commit.
  • Needs actual review before merge.
Ngôn ngữ chính
Shell
Star
75
Fork
39
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
31

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của envoyproxy/examples

Tất cả issue của envoyproxy/examples

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.