Skip to content

fix(openai): always include content field in streaming responses#8955

Open
localai-bot wants to merge 1 commit intomudler:masterfrom
localai-bot:task_8546_fix_openai_content_fix
Open

fix(openai): always include content field in streaming responses#8955
localai-bot wants to merge 1 commit intomudler:masterfrom
localai-bot:task_8546_fix_openai_content_fix

Conversation

@localai-bot
Copy link
Contributor

This fixes issue #8546 where agentic coding tools (VS Code with Kilo Code, Roo Code, Zed) show empty chat responses. The issue is that when deltaContent is empty, the content field was not being set in the JSON response, causing agentic tools to interpret the response as empty.

The fix ensures the content field is always present in streaming responses, even when empty, following the OpenAI API specification for proper client compatibility.

Related:

This fixes issue mudler#8546 where agentic coding tools (VS Code with Kilo Code,
Roo Code, Zed) show empty chat responses. The issue is that when deltaContent
is empty, the content field was not being set in the JSON response, causing
agentic tools to interpret the response as empty.

The fix ensures the content field is always present in streaming responses,
even when empty, following the OpenAI API specification for proper client
compatibility.

Signed-off-by: LocalAI Bot <localai-bot@example.com>
@netlify
Copy link

netlify bot commented Mar 11, 2026

Deploy Preview for localai ready!

Name Link
🔨 Latest commit 4a0e6dc
🔍 Latest deploy log https://app.netlify.com/projects/localai/deploys/69b153407821f600080467e2
😎 Deploy Preview https://deploy-preview-8955--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mudler mudler self-requested a review March 11, 2026 22:06
@mudler mudler self-assigned this Mar 11, 2026
@mudler mudler removed their request for review March 11, 2026 22:06
@localai-bot localai-bot moved this to In review in LocalAI Agent team Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants