Skip to content

release: v0.9.2 - #1396

Merged
ding113 merged 1 commit into
mainfrom
dev
Aug 4, 2026
Merged

release: v0.9.2#1396
ding113 merged 1 commit into
mainfrom
dev

Conversation

@ding113

@ding113 ding113 commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Release v0.9.2

Verification

Review

  • This release PR is intentionally left open for human review.

Greptile Summary

Adds DeepSeek reasoning-stream support to the OpenAI-compatible stream gate.

  • Treats non-empty choices[].delta.reasoning_content values as usable stream content.
  • Adds classifier, content-gate, and forwarder integration coverage for early commitment without provider failover.

Confidence Score: 5/5

The PR appears safe to merge with focused coverage of the new DeepSeek reasoning-stream behavior.

Non-empty reasoning deltas now follow the established OpenAI-chat content path, while empty deltas remain neutral and integration tests confirm that valid reasoning output avoids erroneous failover.

Important Files Changed

Filename Overview
src/app/v1/_lib/proxy/stream-gate/frame-classifier.ts Adds the DeepSeek reasoning_content delta path to the existing OpenAI-chat content classification rules while preserving empty-value handling.
tests/unit/proxy/stream-gate-content-gate.test.ts Verifies reasoning deltas commit before the stream gate reaches its default event cap.
tests/unit/proxy/stream-gate-forwarder-integration.test.ts Verifies DeepSeek reasoning output remains on the selected provider rather than triggering replay-owner failover.
tests/unit/proxy/stream-gate-frame-classifier.test.ts Covers non-empty and empty reasoning_content classification behavior.

Reviews (1): Last reviewed commit: "fix(proxy): recognize DeepSeek reasoning..." | Re-trigger Greptile

Context used:

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ba75565c-e0b5-4ba7-8b0b-655a09f2e027

📥 Commits

Reviewing files that changed from the base of the PR and between 12293ea and cbb23d2.

📒 Files selected for processing (4)
  • src/app/v1/_lib/proxy/stream-gate/frame-classifier.ts
  • tests/unit/proxy/stream-gate-content-gate.test.ts
  • tests/unit/proxy/stream-gate-forwarder-integration.test.ts
  • tests/unit/proxy/stream-gate-frame-classifier.test.ts

📝 Walkthrough

Walkthrough

本次变更将非空 reasoning_content 增量识别为 OpenAI Chat 有效内容,并新增分类器、内容网关和转发器测试。

Changes

reasoning_content 流处理

Layer / File(s) Summary
内容分类规则与单元测试
src/app/v1/_lib/proxy/stream-gate/frame-classifier.ts, tests/unit/proxy/stream-gate-frame-classifier.test.ts
分类器将非空 delta.reasoning_content 判定为 content,将空值判定为 neutral
网关提交与完整转发测试
tests/unit/proxy/stream-gate-content-gate.test.ts, tests/unit/proxy/stream-gate-forwarder-integration.test.ts
测试验证首个推理帧触发提交,后续 65 个推理帧完整转发,且不触发供应商切换或失败记录。

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 标题明确说明这是 v0.9.2 发布变更,与拉取请求的主要目标一致。
Description check ✅ Passed 描述说明了 v0.9.2 发布内容及 DeepSeek 推理流修复,与变更内容相关。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ding113
ding113 merged commit 4b634e1 into main Aug 4, 2026
18 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Claude Code Hub Roadmap Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🧪 测试结果

测试类型 状态
代码质量
单元测试
集成测试
API 测试

总体结果: ✅ 所有测试通过

// chunk 无事件名;delta 携带 content/reasoning/tool_calls/refusal/audio 即内容
anyPaths: [
"choices.#.delta.content",
"choices.#.delta.reasoning_content",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[HIGH] [LOGIC-BUG] reasoning_content is only supported on the live-stream gate, so fake-streaming requests still reject or drop DeepSeek reasoning-only output.

Why this is a problem: This line makes the normal SSE gate treat choices[].delta.reasoning_content as deliverable content, but the OpenAI-chat fake-streaming path still ignores the same field in both validateOpenAIChatCompletion() and emitOpenAIChatStream(). For a fake-streaming-eligible OpenAI request, tryFakeStreamingPath() rewrites the upstream call to non-stream, so a DeepSeek response whose payload is only message.reasoning_content will still fail validation with no_deliverable_content, and the stream emitter would omit the reasoning text even if validation were relaxed. That means the PR fixes the direct streaming path but leaves the fake-streaming path broken for the same provider behavior.

Suggested fix:

const typed = message as {
  content?: unknown;
  reasoning_content?: unknown;
  tool_calls?: unknown;
  function_call?: unknown;
};

if (isNonEmptyString(typed.reasoning_content)) return true;

if (typeof message.reasoning_content === "string") {
  delta.reasoning_content = message.reasoning_content;
}

Also add a fake-streaming regression test that covers a reasoning-only OpenAI-chat completion.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

The stream-gate change is small, but the new reasoning_content support is only wired into the live SSE gate. The fake-streaming OpenAI-chat path still treats reasoning-only DeepSeek completions as empty and can drop that output, so the fix is incomplete for fake-streaming-eligible requests.

PR Size: S

  • Lines changed: 60
  • Files changed: 4

Issues Found

Category Critical High Medium Low
Logic/Bugs 0 1 0 0
Security 0 0 0 0
Error Handling 0 0 0 0
Types 0 0 0 0
Comments/Docs 0 0 0 0
Tests 0 0 0 0
Simplification 0 0 0 0

Critical Issues (Must Fix)

None.

High Priority Issues (Should Fix)

  • src/app/v1/_lib/proxy/stream-gate/frame-classifier.ts:103 adds reasoning_content to the live stream classifier, but fake-streaming still ignores message.reasoning_content, so reasoning-only OpenAI-chat completions can still be rejected or emitted without their reasoning payload.

Review Coverage

  • Logic and correctness
  • Security (OWASP Top 10)
  • Error handling
  • Type safety
  • Documentation accuracy
  • Test coverage
  • Code clarity

Automated review by Codex AI

@github-actions github-actions Bot added the size/S Small PR (< 200 lines) label Aug 4, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Complete

  • Applied the size/S label to PR #1396 and submitted the review summary on GitHub.
  • Posted 1 high-priority inline comment on src/app/v1/_lib/proxy/stream-gate/frame-classifier.ts:103.
  • Main finding: the new reasoning_content support is wired into the live SSE gate, but the fake-streaming OpenAI-chat path still ignores message.reasoning_content, so fake-streaming-eligible DeepSeek requests can still reject or drop reasoning-only output.
  • I did not find additional high-confidence issues in the modified lines.

If you want, I can also prepare the concrete code patch for the fake-streaming validator/emitter gap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Small PR (< 200 lines)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant