Skip to content

fix: handle empty reasoning_content from non-standard APIs#330

Merged
SonyLeo merged 1 commit intoopentiny:developfrom
gene9831:fix/empty-reasoning-content-compat
Apr 24, 2026
Merged

fix: handle empty reasoning_content from non-standard APIs#330
SonyLeo merged 1 commit intoopentiny:developfrom
gene9831:fix/empty-reasoning-content-compat

Conversation

@gene9831
Copy link
Copy Markdown
Collaborator

Some non-standard APIs may return an empty string for reasoning_content even when the model does not support deep reasoning. This change improves compatibility by tolerating that response shape.

非标准 API 中,不支持深度思考,仍然可能返回空字符串的 reasoning_content 。导致渲染了没有内容的“思考过程”
修改前:
image
修改后:
image

Some non-standard APIs may return an empty string for
`reasoning_content` even when the model does not support
deep reasoning. This change improves compatibility by
tolerating that response shape.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

Warning

Rate limit exceeded

@gene9831 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 56 minutes and 7 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 56 minutes and 7 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b8294f7b-d2dd-4cb5-b81f-ae0e0ec98f4d

📥 Commits

Reviewing files that changed from the base of the PR and between 6a8bf29 and 8fe48f6.

📒 Files selected for processing (1)
  • packages/components/src/bubble/renderers/defaultRenderers.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

✅ Preview build completed successfully!

Click the image above to preview.
Preview will be automatically removed when this PR is closed.

@github-actions
Copy link
Copy Markdown
Contributor

@gene9831
Copy link
Copy Markdown
Collaborator Author

gene9831 commented Apr 23, 2026

@coderabbitai you can review now

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

The PR description images show the bug clearly:

  • Before: The chat UI renders an empty "已思考 ∨" (thinking process) section with a blank bullet point, even when reasoning_content is an empty string.
  • After: The empty thinking section is suppressed entirely, and only the actual answer is displayed.

Sure, I'll kick off a new review now!

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

The two PR description images illustrate the bug and the fix clearly:

  • Before (first image): The chat response shows "已思考 ∨" (Already thought) with an empty bullet point beneath it — a spurious, empty "thinking process" section — followed by the actual answer "二进制中1+1的结果是10。"
  • After (second image): The chat response shows only the answer "二进制中1+1的结果是10。" cleanly, with no empty reasoning block rendered.

I'll kick off a review of the changes now!

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@SonyLeo SonyLeo merged commit c5359e3 into opentiny:develop Apr 24, 2026
4 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🧹 Preview Cleaned Up

The preview deployment has been removed.

@gene9831 gene9831 deleted the fix/empty-reasoning-content-compat branch April 24, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants