Skip to content

fix(smolagents): adds reasoning_content #1642

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 5 commits into
base: main
Choose a base branch
from

Conversation

bruffridge
Copy link

@bruffridge bruffridge commented May 19, 2025

resolves: #1641
CC: @albertvillanova , @nate-mar

If reasoning_content is present (it should be if a reasoning LiteLLM model is called), add it to the output message.

Screenshot 2025-05-19 at 4 39 57 PM

@bruffridge bruffridge requested a review from a team as a code owner May 19, 2025 20:58
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label May 19, 2025
Copy link
Contributor

github-actions bot commented May 19, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@bruffridge
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request May 19, 2025
@bruffridge bruffridge changed the title feat: adds reasoning_content to smolagents instrumentation fix(smolagents): adds reasoning_content May 19, 2025
@axiomofjoy
Copy link
Contributor

@bruffridge Can you add a code snippet to the examples directory I can run to verify that this appears as expected in the Phoenix UI? A unit test would also be helpful, I can help there if needed.

@axiomofjoy axiomofjoy self-requested a review May 19, 2025 21:21
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels May 19, 2025
@bruffridge
Copy link
Author

bruffridge commented May 19, 2025

I added an example.

@axiomofjoy
Copy link
Contributor

I added an example. If you have trouble connecting to anthropic, I can add a different thinking model such as o3 to the example file.

Thanks @bruffridge! Will take a look.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels May 20, 2025
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels May 20, 2025
added anthropic api key which is needed for the reasoning_content example.
@bruffridge
Copy link
Author

I added a unit test. I didn't run it though, so you should check to see if I missed anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

[feature request] Show reasoning_content returned by LiteLLM model calls issued by smolagents in the UI.
2 participants