Fix generic openai thinking parsers - #6105
Open
timothycarambat wants to merge 2 commits into
Open
Conversation
…mode - Add shared `extractReasoningContent()` utility in responses.js that checks `reasoning_content`, `reasoning`, and `thinking` fields to support vLLM, DeepSeek, Ollama, and other providers - Update generic OpenAI provider to use shared utility for both streaming and non-streaming reasoning extraction - Add reasoning token capture to tooled and untooled agent paths, streaming thinking tokens live to the frontend - Emit `</think>` closing tag after stream loop for tool-call-only iterations in tooled agent path - Add `allowAnimation` prop to ThoughtChainComponent so only the actively streaming message shows the animated brain icon — older completed thought blocks show static icon - Hide copy/TTS/action buttons on thinking-only messages with no visible content via `hasVisibleContent()` guard - Skip rendering empty `<span>` when message content is only thinking tags
shatfield4
approved these changes
Aug 8, 2026
shatfield4
left a comment
Collaborator
There was a problem hiding this comment.
LGTM
I was able to test a few models using docker model runner and lemonade. Everything is working as expected and with both providers, I used a thinking model and non-thinking.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Type
Relevant Issues
resolves #6099
closes #6100
Description
Supports both async and agentic chat thinking parsers for Generic OpenAI connector. Testing with deepseek (reasoning_content) LMStudio (reasoning) and Ollama (thinking) payload responses. Falls back to
undefinedif not found or parseable.Visuals (if applicable)
Additional Information
Developer Validations
yarn lintfrom the root of the repo & committed changes