Problem
The OpenCode content-filter proxy uses requests.iter_lines(decode_unicode=True). For text/event-stream responses without an explicit charset, Requests can decode bytes as Latin-1, turning valid UTF-8 such as check marks and accented text into mojibake. Large thinking and output slabs expose the corruption consistently.
Acceptance criteria
- Consume SSE lines as raw bytes.
- Decode each line explicitly as UTF-8.
- Preserve valid Unicode across the proxy boundary.
- Add regression coverage for literal UTF-8 SSE content.
- Verify a 200-line mixed-Unicode OpenCode response through Omnigent attached to CoDA with zero Latin-1 mojibake markers.
Problem
The OpenCode content-filter proxy uses requests.iter_lines(decode_unicode=True). For text/event-stream responses without an explicit charset, Requests can decode bytes as Latin-1, turning valid UTF-8 such as check marks and accented text into mojibake. Large thinking and output slabs expose the corruption consistently.
Acceptance criteria