fix: filter out model thinking text from transcript#136
Conversation
Native audio models output internal reasoning as part.Text with part.Thought=true. This was being shown to users as transcript (e.g. "Refining the Onboarding I've finalized..."). Now only non-thinking text is forwarded to the browser. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello @ComBba, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request improves the user experience by preventing the display of internal reasoning or "thinking" text generated by the Gemini model in the live transcript. By filtering out these internal thoughts, the user interface now presents a cleaner and more focused conversation, ensuring that only spoken content is shown to the user. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
개요
변경사항
코드 리뷰 예상 소요 시간🎯 2 (Simple) | ⏱️ ~10 minutes 시
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request correctly filters out the Gemini model's internal thinking text from the user-facing transcript by adding a !part.Thought check. This is a good fix that prevents internal reasoning from being displayed to the user or used by other tools. The related code comments have also been updated to reflect this change. I've added one suggestion to improve test coverage for this new logic to ensure it's robust against future changes.
Summary
gemini-2.5-flash-native-audio) outputpart.Thought=truefor chain-of-thought reasoning before speakingChanges
internal/live/proxy.go!part.Thoughtcheck in handleServerContentE2E Verification
Tested on deployed Cloud Run (
missless-00020-4vc):Local CI
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
릴리스 노트