Skip to content

fix(lemonade): surface reasoning in stream and non-stream chat#5586

Open
nehaaprasaad wants to merge 2 commits into
Mintplex-Labs:masterfrom
nehaaprasaad:fix/lemon-provi-res-outpt
Open

fix(lemonade): surface reasoning in stream and non-stream chat#5586
nehaaprasaad wants to merge 2 commits into
Mintplex-Labs:masterfrom
nehaaprasaad:fix/lemon-provi-res-outpt

Conversation

@nehaaprasaad
Copy link
Copy Markdown

@nehaaprasaad nehaaprasaad commented May 7, 2026

Pull Request Type

  • 🐛 (Bug fix)

Relevant Issues

resolves #5585

Description

Lemonade used the default stream handler, which only forwarded delta.content, so reasoning models never showed chain-of-thought. Added a Lemonade handleStream that emits for reasoning_content / reasoning deltas (matching other providers) and merged the same fields into non-streaming responses via #parseReasoningFromResponse. File: server/utils/AiProviders/lemonade/index.js.

Visuals (if applicable)

N/A (backend only).

Additional Information

Close reasoning block on finish_reason when the model stops after reasoning and before any answer tokens, so stored text matches the UI.

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Lemonade Provider Does Not Present Reasoning Output

3 participants