Skip to content

fix(core): ignore empty reasoning_content in message extraction #36197

Closed
Gagan sherigar (Gagansherigar) wants to merge 1 commit intolangchain-ai:masterfrom
Gagansherigar:fix-empty-reasoning-content
Closed

fix(core): ignore empty reasoning_content in message extraction #36197
Gagan sherigar (Gagansherigar) wants to merge 1 commit intolangchain-ai:masterfrom
Gagansherigar:fix-empty-reasoning-content

Conversation

@Gagansherigar
Copy link
Copy Markdown

@Gagansherigar Gagan sherigar (Gagansherigar) commented Mar 24, 2026

Fixes #36194

Treat empty or whitespace-only reasoning_content as None to prevent empty reasoning blocks in output.

Treat empty or whitespace-only reasoning_content as None.
Prevents empty reasoning blocks in content output.
@github-actions github-actions Bot added core `langchain-core` package issues & PRs fix For PRs that implement a fix size: XS < 50 LOC labels Mar 24, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 24, 2026

This PR has been automatically closed because it does not link to an approved issue.

All external contributions must reference an approved issue or discussion. Please:

  1. Find or open an issue describing the change
  2. Wait for a maintainer to approve and assign you
  3. Add Fixes #<issue_number>, Closes #<issue_number>, or Resolves #<issue_number> to your PR description and the PR will be reopened automatically

Maintainers: reopen this PR or remove the missing-issue-link label to bypass this check.

@github-actions github-actions Bot closed this Mar 24, 2026
@Gagansherigar Gagan sherigar (Gagansherigar) changed the title fix(core): ignore empty reasoning_content in message extraction fix(core): ignore empty reasoning_content in message extraction Fixes #36194 Mar 24, 2026
@Gagansherigar Gagan sherigar (Gagansherigar) changed the title fix(core): ignore empty reasoning_content in message extraction Fixes #36194 fix(core): ignore empty reasoning_content in message extraction Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core `langchain-core` package issues & PRs external fix For PRs that implement a fix missing-issue-link new-contributor size: XS < 50 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_extract_reasoning_from_additional_kwargs should ignore empty strings

1 participant