Skip to content

fix(models): preserve LiteLLM reasoning fragments#5657

Open
he-yufeng wants to merge 1 commit into
google:mainfrom
he-yufeng:fix/litellm-reasoning-fragment-join
Open

fix(models): preserve LiteLLM reasoning fragments#5657
he-yufeng wants to merge 1 commit into
google:mainfrom
he-yufeng:fix/litellm-reasoning-fragment-join

Conversation

@he-yufeng
Copy link
Copy Markdown

Summary

  • concatenate LiteLLM reasoning fragments without inserting synthetic newlines
  • preserve the previous single-fragment behavior
  • add regression coverage for multi-fragment reasoning text

Fixes #5645

To verify

  • uv run --extra test python -m pytest tests\unittests\models\test_litellm.py -q
  • uv run --extra dev pyink --check src\google\adk\models\lite_llm.py tests\unittests\models\test_litellm.py
  • uv run python -m py_compile src\google\adk\models\lite_llm.py tests\unittests\models\test_litellm.py
  • git diff --check

@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 11, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@rohityan rohityan self-assigned this May 12, 2026
@rohityan
Copy link
Copy Markdown
Collaborator

Hi @he-yufeng , Thank you for your contribution! It appears you haven't yet signed the Contributor License Agreement (CLA). Please visit https://cla.developers.google.com/ to complete the signing process. Once the CLA is signed, we'll be able to proceed with the review of your PR. Thank you!

@rohityan rohityan added models [Component] Issues related to model support request clarification [Status] The maintainer need clarification or more information from the author labels May 12, 2026
@he-yufeng he-yufeng force-pushed the fix/litellm-reasoning-fragment-join branch from f106bb2 to 9e0a0b9 Compare May 12, 2026 06:18
@he-yufeng
Copy link
Copy Markdown
Author

Thanks for the reminder. The CLA has been signed, and I rebased the branch onto the latest main. The cla/google and header-check checks are now passing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

models [Component] Issues related to model support request clarification [Status] The maintainer need clarification or more information from the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: reasoning deltas combined with newlines in litellm

2 participants