Skip to content

Conversation

Orbital-Web
Copy link
Contributor

Description

Fixed answer streaming, particularly for models like claude and made it standardized with the other streamings.

Before
image

After
image
(the bullet point not being right is a claude issue)

How Has This Been Tested?

Locally, with openai and claude

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

Copy link

vercel bot commented Jun 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 11, 2025 9:30pm

@Orbital-Web Orbital-Web marked this pull request as ready for review June 11, 2025 20:17
@Orbital-Web Orbital-Web requested a review from a team as a code owner June 11, 2025 20:17
@Orbital-Web Orbital-Web changed the title fix: answer streaming fix: kg answer streaming Jun 11, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Streamlined answer streaming implementation by standardizing the mechanism across different LLM providers like Claude and OpenAI through the shared stream_llm_answer utility.

  • Removed custom token streaming and manual stream writes from backend/onyx/agents/agent_search/kb_search/nodes/d1_generate_answer.py
  • Eliminated unused reference results streaming code and unnecessary tokenizer logic
  • Removed obsolete stream handling functions from backend/onyx/agents/agent_search/kb_search/graph_utils.py in favor of the shared utility
  • Fixed visual inconsistencies in streaming output, particularly noticeable with Claude's responses (bullet point formatting remains a Claude-specific issue)

2 files reviewed, 1 comment
Edit PR Review Bot Settings | Greptile

@Orbital-Web Orbital-Web requested a review from raunakab June 11, 2025 21:07
Copy link
Contributor

@raunakab raunakab left a comment

Choose a reason for hiding this comment

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

Looks good!

@Orbital-Web Orbital-Web disabled auto-merge June 11, 2025 22:46
@Orbital-Web Orbital-Web merged commit 0870854 into main Jun 11, 2025
10 of 11 checks passed
@Orbital-Web Orbital-Web deleted the kg-answer-fix branch June 11, 2025 22:47
AnkitTukatek pushed a commit to TukaTek/onyx that referenced this pull request Sep 23, 2025
* fix: answer streaming

* fix: env vars

* fix: remove duplicate
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.

2 participants