Skip to content

feat: Add reasoning content for openai model provider #187

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

xiehust
Copy link
Contributor

@xiehust xiehust commented Jun 6, 2025

Description

[Provide a detailed description of the changes in this PR]
Add reasoning content output for OpenAI model provider.
Now agent can output reasoningText when use 'DeepSeek-R1' via OpenAI model provider

async for event in agent.stream_async(query):
      if 'reasoningText' in event:
          print(event['reasoningText'],end="",flush=True)
      if "data" in event:
          # Only stream text chunks to the client
          print(event['data'],end="",flush=True)

Related Issues

[Link to related issues using #issue-number format]

Documentation PR

[Link to related associated PR in the agent-docs repo]

Type of Change

  • New feature

Testing

[How have you tested the change?]
YES

  • hatch fmt --linter
  • hatch fmt --formatter
  • hatch test --all
  • Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli

Checklist

  • I have read the CONTRIBUTING document
  • I have added tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@xiehust xiehust requested a review from a team as a code owner June 6, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant