databrickslabs / databrickslabs/coding-agents-databricks-apps

fix: decode OpenCode SSE response bytes explicitly as UTF-8

Open
#97 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
40
Forks
11
Avg merge
1m
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the OpenCode content-filter proxy call that uses requests.iter_lines(decode_unicode=True), then trace how SSE lines cross the proxy boundary. Add regression coverage for literal UTF-8 SSE content and verify a 200-line mixed-Unicode response through Omnigent attached to CoDA has no Latin-1 mojibake markers.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.