Skip to content

Add support for reasoning_content from DeepSeek R1 #731

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

Closed
charlieyou opened this issue Jan 21, 2025 · 5 comments
Closed

Add support for reasoning_content from DeepSeek R1 #731

charlieyou opened this issue Jan 21, 2025 · 5 comments

Comments

@charlieyou
Copy link

charlieyou commented Jan 21, 2025

New DeepSeek reasoning model outputs reasoning_content in messages alongside the regular content. See their API docs here.

Requested feature is to be able to access this reasoning content from the Agent.run() response. According to their docs for multi-turn conversations, reasoning should not be passed back into the messages, so there will need to be consideration of that in the API.

Appreciate your work here, I'm loving the framework so far!

EDIT: OpenRouter supports this content now too, but in a diff format: https://openrouter.ai/announcements/reasoning-tokens-for-thinking-models

@samuelcolvin
Copy link
Member

Thanks, should be possible, we'll need to think about how.

@achimstruve
Copy link

achimstruve commented Jan 27, 2025

Can the DeepSeek R1 model use tools?
@samuelcolvin

@Wh1isper
Copy link
Contributor

@achimstruve According to this, not yet

@Wh1isper
Copy link
Contributor

Wh1isper commented Feb 18, 2025

I created a simple project to implement deepclaude-style-agent: https://github.com/Wh1isper/pydantic-ai-deepagent, making models such as claude can use deepseek r1's thinking as a reference for tool use. Check the example.

Hope this helps :D

@Kludex
Copy link
Member

Kludex commented Mar 17, 2025

Let's use a single issue to track reasoning/thinking.

@Kludex Kludex closed this as completed Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants