-
Couldn't load subscription status.
- Fork 450
models - litellm - start and stop reasoning #947
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
Conversation
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.
Would an integ test be helpful here? Ensuring that we get back reasoning content and normal content in the stream?
afa31f7 to
40bd6ff
Compare
…nto tool-validation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Description
We need to explicitly mark the start and stop of the reasoning content stream in the litellm model provider. With these changes, users can now do the following:
The result of the above script will look something like:
{ "role": "assistant", "content": [ { "reasoningContent": { "reasoningText": { "text": "This is a very basic addition problem. Let me think through it step by step as requested.\n\n2 + 2\n\nI can think of this in several ways:\n\n1. Counting: If I have 2 objects, and I add 2 more objects, I can count them: 1, 2, 3, 4. So 2 + 2 = 4.\n\n2. Using the definition of addition: Addition means combining quantities. So if I have a quantity of 2, and I combine it with another quantity of 2, I get a total quantity of 4.\n\n3. Using basic arithmetic facts: This is one of the fundamental addition facts that 2 + 2 = 4.\n\nThe answer is 4." } } }, { "text": "I'll work through this basic addition problem step by step:\n\n**Step 1: Understand what we're adding**\n- We have the number 2\n- We're adding another 2 to it\n- This can be written as: 2 + 2\n\n**Step 2: Think about what addition means**\n- Addition means combining or putting together quantities\n- We're combining a group of 2 with another group of 2\n\n**Step 3: Count or calculate**\n- We can count: 1, 2 (first group) + 1, 2 (second group) = 1, 2, 3, 4 total\n- Or we can recall that 2 + 2 is a basic math fact\n\n**Answer: 2 + 2 = 4**" } ] }Related Issues
#523
Documentation PR
N/A
Type of Change
Bug fix
Testing
How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli
hatch run prepare: Updated the unit tests.hatch test tests_integ/models/test_model_litellm.py: Wrote new integ test.Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.