-
Couldn't load subscription status.
- Fork 1.6k
chore: fix deepseek_model.py stream mode #3326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this PR didn't fixed the issue calling deepseek reasoner model with stream=True and GET_REASONING_CONTENT=True
|
updated cc @Wendong-Fan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove model specific logic added to ChatAgent
| # Handle reasoning content streaming (for DeepSeek reasoner) | ||
| if ( | ||
| hasattr(delta, 'reasoning_content') | ||
| and delta.reasoning_content | ||
| ): | ||
| content_accumulator.add_reasoning_content( | ||
| delta.reasoning_content | ||
| ) | ||
| # Yield partial response with reasoning content | ||
| partial_response = ( | ||
| self._create_streaming_response_with_accumulator( | ||
| content_accumulator, | ||
| "", # No regular content yet | ||
| step_token_usage, | ||
| getattr(chunk, 'id', ''), | ||
| tool_call_records.copy(), | ||
| reasoning_delta=delta.reasoning_content, | ||
| ) | ||
| ) | ||
| yield partial_response |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this part of code added to ChatAgent? it's not a good design to add model specific logic in ChatAgent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this logic applies to all reasoning models,The comment about deepseek was not deleted before, has been deleted now.
Description
Describe your changes in detail (optional if the linked issue already contains a detailed description of the changes).
Checklist
Go over all the following points, and put an
xin all the boxes that apply.Fixes #issue-numberin the PR description (required)pyproject.tomlanduv lockIf you are unsure about any of these, don't hesitate to ask. We are here to help!