-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Add DeepSeek thinking/tool-call guidance with reasoning_content #17639
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: main
Are you sure you want to change the base?
Add DeepSeek thinking/tool-call guidance with reasoning_content #17639
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
|
thank you ,We need it. |
| model="deepseek/deepseek-reasoner", | ||
| messages=messages, | ||
| tools=tools, | ||
| extra_body={"thinking": {"type": "enabled"}}, |
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 is this in extra body? can't we support this through the openai-compatible 'reasoning_effort' parameter or the anthropic thinking parameter? https://docs.litellm.ai/docs/reasoning_content#pass-thinking-to-anthropic-models
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.
cc: @Chesars
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.
Yes, extra_body works as a pass-through for provider-specific params, but we should support this param natively in a open-ai/anthropic format. PR #17712 adds it
| model="deepseek/deepseek-reasoner", | ||
| messages=messages, | ||
| tools=tools, | ||
| extra_body={"thinking": {"type": "enabled"}}, |
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.
| extra_body={"thinking": {"type": "enabled"}}, | |
| thinking={"type": "enabled"} |
| resp = completion( | ||
| model="deepseek/deepseek-reasoner", | ||
| messages=messages, | ||
| extra_body={"thinking": {"type": "enabled"}}, |
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.
| extra_body={"thinking": {"type": "enabled"}}, | |
| thinking={"type": "enabled"} |
Title
Add DeepSeek thinking/tool-call guidance with reasoning_content
Relevant issues
N/A (docs-only guidance for DeepSeek thinking mode)
Pre-Submission checklist
Type
📖 Documentation
Changes