ui-server: Gemini Live rejects binary JSON frames from the live endpoint
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- bun, typescript
- Domain
- backend-api-design, testing
Research direction
Start with packages/ui-server/src/voice/gemini-conversation.ts and the existing loopback fixture that sends JSON as text; run bun run test to locate the relevant tests. Add coverage for binary setup and representative event frames, while preserving bounds, ordering, and failure behavior. Done means the acceptance criteria pass, existing Gemini lifecycle and host tests pass, and the corrected candidate is recorded for a separately authorized recheck.
Written by the indexing model from the issue text.
Description
Out of scope
- Changing provider/model selection, weakening frame/queue limits, trusting vendor tool arguments, changing permission authority, adding paid CI, or claiming audio/device qualification.
Context
The separately authorized #961 prerequisite recheck of #2356 candidate ebb4a12def46412216a6d4acbd7cb4db89dd3bea observed a real Gemini Developer API v1beta binary JSON setupComplete frame for gemini-3.8-live on 2026-10-17. Bun 1.4.3 delivered MessageEvent.data as a Uint8Array. A passive diagnostic decoded only the top-level JSON keys; no credential, raw payload, session identifier, audio or tool execution was recorded.
The adapter message handler (socket.addEventListener("message"), packages/ui-server/src/voice/gemini-conversation.ts:132-137 on that candidate) accepts only strings and fails with Gemini Live returned an invalid or uncorrelatable frame. The provider had emitted setupComplete; this is a separate failure from #2356's invalid function parameter schema. The existing loopback fixture sends JSON as text and does not cover the actual binary transport.
Part of #54. Related qualification: #961.
Blocked by #2356
Scope
- Normalize Gemini text/binary JSON at the adapter's existing message boundary using the installed Bun WebSocket behavior.
- Enforce the existing frame bound before decoding/parsing, preserve arrival order and reject malformed/unsupported data visibly without leaking provider diagnostics.
- Exercise real loopback binary setup and representative event frames alongside text compatibility.
Acceptance criteria
- A real Bun loopback peer sending UTF-8 JSON
setupCompleteas binary completes the actual adapter handshake; show the regression failing on the current string-only guard before the fix. - Representative binary input/audio/interruption/tool frames retain their existing normalized semantics and host-owned authority. Text frames still work.
- Oversized binary frames, malformed JSON and unsupported payload types fail closed under the existing bounds without leaking credentials; no guard is removed to accept binary data.
- Decode/normalization cannot reorder concurrent messages or admit callbacks after abort/close/replacement. Test asynchronous normalization if that implementation requires it.
- Existing Gemini lifecycle, queue, correlation and host tests pass; record the corrected candidate for a separately authorized #961 live recheck.
Verification
Keyless real Bun WebSocket tests through bun run test, strict types/lint, failing-first/restored evidence and bun run check:pr --base origin/main before ready. CI remains offline. Live connectivity and device/audio qualification are separate #961 evidence, not inferred from loopback tests.
Contract impact
Expected internal transport normalization only; no shared machine schema or capability promotion. Preserve existing byte bounds and authority semantics; reassess any exported or shared-wire change.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- Avg merge
- 4h 41m
- Merged PRs (30d)
- 954
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from schlessera/brain-kit
-
agent-ready area: ui-sdk priority: p3 type: chore
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
schlessera/brain-kit#2534 ·
Maintainers usually reply within 1 day
-
agent-ready area: ci priority: p3 type: chore
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
schlessera/brain-kit#2509 ·
Maintainers usually reply within 1 day
-
agent-ready area: core priority: p3 type: fix
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
schlessera/brain-kit#2503 ·
Maintainers usually reply within 1 day
-
agent-ready area: modules priority: p2 type: fix
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
schlessera/brain-kit#2500 ·
Maintainers usually reply within 1 day
-
agent-ready area: modules priority: p3 type: fix
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
schlessera/brain-kit#2499 ·
Maintainers usually reply within 1 day
All issues in schlessera/brain-kit
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
chaitin/MonkeyCode#1437 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
carbon-design-system/carbon-ai-chat#2615 ·
Maintainers usually reply within 1 day
-
e2e-failure ready-to-code
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
redhat-developer/rhdh-plugin-export-overlays#4486 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: fileUploadMatrix.test.ts URL case does a real DNS lookup and fails offlinePossibly taken @r2jaff claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ComposioHQ/composio#5054 ·
Maintainers usually reply within 1 day