-
Notifications
You must be signed in to change notification settings - Fork 739
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
Add support model deepseek/deepseek-reasoner #1473
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
if (model_type.startswith(O1_MODEL_PREFIX)) or ("deepseek-reasoner" in model): | ||
user = f"{system}\n\n\n{user}" | ||
system = "" | ||
get_logger().info(f"Using O1 model, combining system and user prompts") | ||
get_logger().info(f"Using model {model}, combining system and user prompts") |
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.
ok, but maybe in the future it worth further refactoring - a list of models that do not have 'system' message support, as this is getting bigger
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.
That's a good point! Do you have any ideas about this? I would like to improve the code.
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.
i think that in the place where we define models, we can define an extra list of 'user-message-only' models
and use that in the handler
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.
That sounds good. I will do that in the next PR.
p.s - that's also the feedback from Qodo Merge
|
PR Type
Enhancement
Description
Added support for the
deepseek/deepseek-reasoner
model with a token limit of 64K.Updated logic to combine system and user prompts for
deepseek-reasoner
model.Improved logging to specify the model name when combining prompts.
Changes walkthrough 📝
__init__.py
Add `deepseek/deepseek-reasoner` model with token limit
pr_agent/algo/init.py
deepseek/deepseek-reasoner
model with a 64K token limit.litellm_ai_handler.py
Enhance prompt handling for `deepseek-reasoner` model
pr_agent/algo/ai_handlers/litellm_ai_handler.py
deepseek-reasoner
in logic for combining system and userprompts.