litellm - ✅(Solved) Fix [Feature]: add reasoning field parsing for reasoning content in playground [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#24857Fetched 2026-04-08 01:59:07
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
cross-referenced ×1labeled ×1

Fix Action

Fixed

PR fix notes

PR #24870: feat(ui): support vllm reasoning field in playground streaming

Description (problem / solution / changelog)

Relevant issues

Fixes #24857

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/test_litellm/ directory, Adding at least 1 test is a hard requirement - see details (UI tests added under ui/litellm-dashboard for this dashboard-only change)
  • My PR passes all unit tests on make test-unit (local UI test execution is blocked by Node version mismatch in this environment: Node 18 vs required Node >=20)
  • My PR's scope is as isolated as possible, it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Type

🐛 Bug Fix
✅ Test

Changes

  • Added support for new vLLM streaming reasoning field in Playground chat streaming parser:
    • Continues handling legacy delta.reasoning_content
    • Adds handling for new delta.reasoning
    • Supports reasoning as string, object (text/content), and array entries
  • Updated first-token timing logic to trigger when either normal content or reasoning delta arrives (including new reasoning field)
  • Added focused UI tests for the new parsing behavior:
    • verifies reasoning from reasoning string
    • verifies reasoning from structured reasoning array
  • Scope is limited to dashboard playground streaming behavior:
    • ui/litellm-dashboard/src/components/playground/llm_calls/chat_completion.tsx
    • ui/litellm-dashboard/src/components/playground/llm_calls/chat_completion.test.tsx

Changed files

  • ui/litellm-dashboard/src/components/playground/llm_calls/chat_completion.test.tsx (modified, +114/-0)
  • ui/litellm-dashboard/src/components/playground/llm_calls/chat_completion.tsx (modified, +41/-4)
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

The Feature

In newest versions of vllm the reasoning_content field has been replaced by reasoning field. https://github.com/vllm-project/vllm/issues/12468 In the playground it does not show the reasoning part when using new version of vllm for models inference The changes in streaming response shown in this issue https://github.com/vllm-project/vllm/issues/36730

Motivation, pitch

See the reasoning content in playground to check that model is working correctly. Some qwen3.5 models has very long reasoning part

What part of LiteLLM is this about?

UI Dashboard

LiteLLM is hiring a founding backend engineer, are you interested in joining us and shipping to all our users?

No

Twitter / LinkedIn details

No response

extent analysis

TL;DR

Update the playground to handle the new reasoning field instead of the deprecated reasoning_content field to display the reasoning part for models inference.

Guidance

  • Review the changes made in issue #12468 to understand the replacement of reasoning_content with reasoning and adjust the playground accordingly.
  • Check the streaming response changes in issue #36730 to ensure compatibility with the updated reasoning field.
  • Verify that the UI Dashboard is updated to handle the new field and display the reasoning part correctly for models inference.
  • Test the updated playground with qwen3.5 models that have long reasoning parts to ensure it works as expected.

Notes

The solution assumes that the playground is using an outdated reference to the reasoning_content field, which is no longer supported in the newest versions of vllm.

Recommendation

Apply workaround: Update the playground to use the new reasoning field, as the reasoning_content field is deprecated and no longer supported.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING