fix: remove YuyayStreamFilter so pichay can receive yuyay-response blocks
This commit is contained in:
parent
59cce5c6d2
commit
fa1f27bad5
1 changed files with 1 additions and 10 deletions
|
|
@ -2035,7 +2035,6 @@ def create_app(
|
|||
stream_error = False
|
||||
sse_buffer = bytearray()
|
||||
usage: dict[str, Any] = {}
|
||||
yuyay_filter = YuyayStreamFilter()
|
||||
try:
|
||||
with client.stream(
|
||||
"POST", upstream_path, json=outgoing_body, headers=headers
|
||||
|
|
@ -2049,7 +2048,6 @@ def create_app(
|
|||
for chunk in resp.iter_bytes():
|
||||
bytes_out += len(chunk)
|
||||
chunk_count += 1
|
||||
# Inspect raw chunk for metrics (before filtering)
|
||||
_inspect_sse_chunk(
|
||||
chunk,
|
||||
buffer=sse_buffer,
|
||||
|
|
@ -2059,14 +2057,7 @@ def create_app(
|
|||
provider=provider,
|
||||
usage_accumulator=usage,
|
||||
)
|
||||
# Filter yuyay protocol tags before forwarding
|
||||
filtered = yuyay_filter.feed(chunk)
|
||||
if filtered:
|
||||
yield filtered
|
||||
# Flush any remaining buffered bytes
|
||||
tail = yuyay_filter.flush()
|
||||
if tail:
|
||||
yield tail
|
||||
yield chunk
|
||||
except Exception as e:
|
||||
stream_error = True
|
||||
emit_event(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue