-
Notifications
You must be signed in to change notification settings - Fork 876
Reasoning response support #907
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
Comments
I've used some pretty tricky ways to implement reasoning in the pydantic-ai-bedrock package: ai-zerolab/pydantic-ai-bedrock#15 Based on this practice, I think we need to add a ReasoningPart, and then the Model will implement the object transformation based on that. On top of that, we need to think about how the Agent is returned, perhaps using the |
I would like to request support for Claude's Extended thinking. |
Maybe openrouter's reasoning tokens should also be added: https://openrouter.ai/docs/use-cases/reasoning-tokens for people who use Claude 3.7 through it for example. At the moment no reasoning is shown. |
Link to relevant slack conversation: |
Any news on this? |
I want to use pydantic-ai at work but not being able to use reasoning models is one of the things holding me back. |
Any update on this ? |
Hi, I’d like to express interest in supporting extended reasoning models, and contribute a few observations. Looking at PR #1142, I noticed that the current implementation returns the summary field from OpenAI as the reasoning part. However, OpenAI’s responses API also supports an optional encrypted_content field (reference, docs), which is useful for including full reasoning traces in follow-up interactions. This is especially recommended when using tool calling (docs). To support this, I suggest either:
It’s worth noting that encrypted_content is provider-dependent and may not be interoperable - for example, it can’t be mapped to Anthropic’s redacted_thinking. Still, a unified abstraction might help represent these different formats consistently. Happy to help further if there’s interest! |
See:
No idea yet how this should look, but we should try to support it.
The text was updated successfully, but these errors were encountered: