fix: remove YuyayStreamFilter so pichay can receive yuyay-response blocks

This commit is contained in:
Joey Yakimowich-Payne 2026-03-13 12:40:18 -06:00
commit fa1f27bad5

View file

@ -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(