ai-transcoder sandbox: requirements for resubmission

Offen
#1,499 3 Kommentare 1 Reaktion 2 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@phlax arbeitet bereits daran.

Seit 12.10.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

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.
Vorherrschende Sprache
Shell
Sterne
75
Forks
39
Ø Merge
1 T. 9 Std.
Gemergte PRs (30 T.)
31

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus envoyproxy/examples

Alle Issues in envoyproxy/examples

Ähnliche Issues

Weitere Issues zu Shell/Bash

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.