fix(logging): reduce excessive streaming output in session history logs#2041
Merged
tanzhenxin merged 1 commit intomainfrom Mar 2, 2026
Merged
fix(logging): reduce excessive streaming output in session history logs#2041tanzhenxin merged 1 commit intomainfrom
tanzhenxin merged 1 commit intomainfrom
Conversation
…logs Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Contributor
📋 Review SummaryThis PR addresses an issue where excessive JSON data was being logged in session history files due to 🔍 General Feedback
🎯 Specific FeedbackNo specific issues identified in this review. ✅ Highlights
|
Contributor
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Removes
JSON.stringify()calls for full response objects inLoggingContentGeneratorto reduce excessive log output in session history files.Dive Deeper
The
LoggingContentGeneratorwas stringifying entire response objects (including streaming chunks) when logging interactions for OpenAI and Gemini models. This caused session history logs to become extremely large and difficult to read, especially during streaming responses.The fix removes the stringified response parameters from
logInteraction()calls while preserving the essential metadata (model version, usage stats, user prompt ID) that is useful for debugging.Changes
JSON.stringify(response)from OpenAI logging pathJSON.stringify(responses)from Gemini logging pathReviewer Test Plan
qwen 'explain this code')~/.qwen/sessions/)Testing Matrix
Linked issues / bugs
No linked issues
🤖 Generated with Qwen Code