Skip to content

Fix generic openai thinking parsers - #6105

Open
timothycarambat wants to merge 2 commits into
masterfrom
6099-generic-oai-reasoning-parsers
Open

Fix generic openai thinking parsers#6105
timothycarambat wants to merge 2 commits into
masterfrom
6099-generic-oai-reasoning-parsers

Conversation

@timothycarambat

Copy link
Copy Markdown
Member

Pull Request Type

  • ✨ feat (New feature)
  • 🐛 fix (Bug fix)
  • ♻️ refactor (Code refactoring without changing behavior)
  • 💄 style (UI style changes)
  • 🔨 chore (Build, CI, maintenance)
  • 📝 docs (Documentation updates)

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 undefined if not found or parseable.

Visuals (if applicable)

Additional Information

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated (if applicable)
  • I have tested my code functionality
  • Docker build succeeds locally

…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
@timothycarambat timothycarambat added PR: Ready for QA Indicates that a PR is ready for QA and the GH image may build the image PR:Ready-to-merge PR has been reviewed by core team and is ready to merge labels Aug 7, 2026

@shatfield4 shatfield4 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@timothycarambat timothycarambat self-assigned this Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Ready for QA Indicates that a PR is ready for QA and the GH image may build the image PR:Ready-to-merge PR has been reviewed by core team and is ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Generic OpenAI provider does not parse vLLM reasoning field

2 participants