chore: remove orphaned stream helpers

transcodeStream, transcodeStreamWithUsage, forwardSSEWithUsage and
forceStreamBody have no callers since the package refactor; the live
paths use the request-aware TranscodeStream/ForwardStream and
prepareAnonymousBody directly. Also fix the stale comment reference.
This commit is contained in:
sk-dev-ai committed 2026-10-04 19:56:41 +05:30
1 parent 79a208a467
commit 51639af3ef
3 files changed
+1 -32

No files matched your search

-13
View File
@@ -41,15 +41,6 @@ type bridgeStreamEvent struct {
Usage *Usage
}
func transcodeStream(w http.ResponseWriter, reader io.Reader, from, to Protocol, model string) error {
_, _, err := transcodeStreamWithUsage(w, reader, from, to, model)
return err
}
func transcodeStreamWithUsage(w http.ResponseWriter, reader io.Reader, from, to Protocol, model string) (Usage, bool, error) {
return TranscodeStream(context.Background(), w, reader, from, to, model)
}
// TranscodeStream is the request-aware form used by the
// gateway. A cancelled client must not receive a synthetic upstream error
// after its connection has gone away.
@@ -158,10 +149,6 @@ func (writer *sseFlushWriter) Write(data []byte) (int, error) {
return n, err
}
func forwardSSEWithUsage(w http.ResponseWriter, reader io.Reader, protocol Protocol, model string) (Usage, bool, error) {
return ForwardStream(context.Background(), w, reader, protocol, model)
}
func ForwardStream(ctx context.Context, w http.ResponseWriter, reader io.Reader, protocol Protocol, model string) (Usage, bool, error) {
flusher, ok := w.(http.Flusher)
if !ok {