fix(chat): preserve completion semantics in JSON-to-SSE fallback - #3779
fix(chat): preserve completion semantics in JSON-to-SSE fallback#3779Ingwannu wants to merge 1 commit into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
리뷰 · 우선순위 72 / 80이 PR은 변경 표면은 작습니다. 라인 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
|
Landed via #3803 at |
Carry lidge-jun#3779 and cover incomplete terminal precedence and bounded serialization. Co-authored-by: Ingwannu <ingwannu@users.noreply.github.com>
Delivered — superseded by merged work
Verified in
devat5759d9ea2f1e7281cdc01eb9628f2e0a123fb59c: #3803 (ac4a7659fd).Original contribution: fix(chat): preserve completion semantics in JSON-to-SSE fallback, by @Ingwannu.
JSON-to-stream tools, reasoning, usage and finish-reason preservation, extended across both fallback paths.
The original PR is closed as superseded; its contribution remains credited in the landed history.
Attribution strengthened by #3811, merged as
cf9f662190c4c6770697c45c870941509cc98f9c. See CREDITS.md for the source-to-landing attribution record.Summary
Closes #3770.
stop.devatbd1cda99c.Verification
Using Bun 1.4.0, fresh temporary HOME/OPENCODEX_HOME/CODEX_HOME directories, and a local synthetic upstream only:
length).bun test ./tests/responses/chat-json-sse-fallback.test.ts ./tests/test-layout.test.ts ./tests/test-layout-tooling.test.ts: 24 pass, 0 fail, 629 assertions. Seven handler cases also cover ordinary text, empty output, cancellation, single upstream dispatch, one terminal marker, usage, and budget release.bun node_modules/typescript/bin/tsc --noEmit: passed.bun scripts/privacy-scan.ts: passed.bun node_modules/astro/bin/astro.mjs build: 425 pages built successfully. Existing chunk-size and missing 404-content warnings remain.git diff --check: passed.Checklist
@lidge-jun 쉽게 요약하면, 스트리밍을 요청했는데 내부 응답이 JSON으로 돌아오는 경우에만 도구 호출과 추론 내용이 빠지고 종료 사유가 무조건 정상 종료로 바뀌던 문제입니다. 기존 변환 결과를 그대로 전달하게 고쳤고, 실제 HTTP 핸들러 테스트로 수정 전 실패와 수정 후 통과를 확인했습니다. #3767과는 분리했습니다. 아직 전체·플랫폼 검증 전이라 Draft로 두며, 병합하지 않았습니다.