Skip to content

feat(ui): proxy POST /v1/email/init (streamed provisioning) through the backend sidecar router #2054

Description

@itomek

Problem

#1888 added a GET /v1/email/init proxy to the Agent UI backend's sidecar router so consumers on the recommended entry point can confirm their LEMONADE_BASE_URL wiring. The provisioning verb — POST /v1/email/init, which streams model-pull progress — is still not proxied: the integration guide has to tell consumers to call it "directly on the sidecar", which is inconsistent with the backend being the single recommended /v1/email surface.

Outcome

POST /v1/email/init works through the backend proxy with the sidecar's streamed progress passed through, and the integration guide's migration note drops the sidecar-direct caveat.

Acceptance criteria

  • POST /v1/email/init on the backend forwards to the sidecar and streams the provisioning output through (chunked/SSE-style passthrough, not buffered-to-completion).
  • Status codes and the terminal "re-run GET /v1/email/init" guidance pass through unchanged.
  • docs/guides/email-integration.mdx migration note updated (remove "(the GAIA backend proxies only the readiness GET...)").
  • Unit tests mirror the existing sidecar-router proxy tests, including a streaming passthrough assertion.

Scope & expectations

How to verify

HTTP API surface — curl -N -X POST http://127.0.0.1:4200/v1/email/init through the backend against a fresh Lemonade, showing streamed progress lines and the terminal guidance, plus the proxy unit-test output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions