hengyuss opened a new issue, #7384:
URL: https://github.com/apache/shenyu/issues/7384
# [Task][AI Proxy] Implement protocol-independent reactive AI Transport
Parent issue: #7351
Depends on: #7381
## Background
The AI Proxy needs a reusable transport layer that can send requests to LLM
service endpoints without understanding AI protocol semantics or
provider-specific behavior.
Transport should expose raw HTTP response information and support streaming
without coupling the network implementation to OpenAI, Spring AI, or another
provider.
## Goal
Implement `ShenyuAiTransport` using reactive HTTP communication for normal
and
streaming upstream responses.
## Responsibilities
The Transport layer is responsible for:
- establishing and reusing HTTP connections;
- sending requests and receiving responses;
- supporting normal and streaming response bodies;
- handling timeouts and connection failures;
- propagating cancellation and backpressure;
- exposing response status, headers, and raw response data;
- supporting transport-level proxy and TLS configuration.
## Boundaries
The Transport layer must not:
- parse OpenAI, Anthropic, or other AI protocol fields;
- map provider-specific request parameters;
- extract token usage or finish reason;
- serialize or deserialize protocol-specific SSE events;
- select providers;
- implement retry or fallback policy.
Transport carries the reactive byte stream. Protocol is responsible for SSE
framing and event semantics.
## Acceptance Criteria
- [ ] Transport uses only the shared upstream request and response models.
- [ ] Transport does not depend on Spring AI or provider-specific DTOs.
- [ ] Normal responses are supported.
- [ ] Streaming responses are forwarded without full buffering.
- [ ] Cancellation and backpressure propagate to the upstream request.
- [ ] Connection and response timeouts are supported.
- [ ] Upstream status, headers, and error bodies are preserved.
- [ ] Proxy and TLS settings can be applied at the transport level.
- [ ] Retry and fallback decisions remain outside Transport.
- [ ] Unit tests cover normal responses, streaming, cancellation, timeout,
upstream errors, and response metadata preservation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]