Skip to content

Conversation

@xingyaoww
Copy link
Contributor

Add documentation for the new LLM streaming capability that allows real-time, token-by-token display of LLM responses.

This PR corresponds to OpenHands/software-agent-sdk#1270 which implements the streaming functionality.

Changes

  • Added sdk/guides/llm-streaming.mdx - Complete guide for using LLM streaming
  • Covers:
    • Enabling streaming on LLM instances
    • Creating token callbacks
    • Understanding stream chunks
    • Use cases and performance considerations

Related PR

Documentation

The new guide documents the example at examples/01_standalone_sdk/29_llm_streaming.py which demonstrates:

  • Configuring LLM with streaming enabled
  • Implementing token callbacks for real-time display
  • Processing streaming chunks as they arrive

@xingyaoww can click here to continue refining the PR

Document the new LLM streaming capability that allows
token-by-token display of responses in real-time.

Co-authored-by: openhands <openhands@all-hands.dev>
@xingyaoww xingyaoww requested a review from enyst as a code owner November 26, 2025 03:44
xingyaoww pushed a commit to OpenHands/software-agent-sdk that referenced this pull request Nov 26, 2025
- Export LLMStreamChunk from streaming module for public API
- Fix test expectations for streaming error messages
- Skip Responses API streaming tests (out of scope for this PR)
- Pass metadata to LLM completion calls in agent utils
- Update error message clarity for streaming requirements

All tests now passing (1262 passed, 2 skipped).
Pre-commit checks passing on all modified files.

Related documentation: OpenHands/docs#132

Co-authored-by: openhands <openhands@all-hands.dev>
Removed sections on understanding stream chunks, use cases, advanced callbacks, and performance considerations to streamline the guide.
@xingyaoww
Copy link
Contributor Author

@OpenHands review diff from main and add the newly added doc to docs.json under LLM features

@openhands-ai
Copy link

openhands-ai bot commented Nov 26, 2025

I'm on it! xingyaoww can track my progress at all-hands.dev

@openhands-ai
Copy link

openhands-ai bot commented Nov 26, 2025

Summary

I've successfully reviewed the diff from main and updated the documentation configuration as requested. Here's what was done:

Changes Made

1. Reviewed the PR Changes

  • The PR adds a new documentation file: sdk/guides/llm-streaming.mdx
  • This guide documents the LLM streaming feature that enables real-time, token-by-token display of LLM responses
  • The guide includes a complete example (examples/01_standalone_sdk/29_llm_streaming.py), usage instructions, and explanations

2. Updated docs.json

  • Added "sdk/guides/llm-streaming" to the LLM Features group in the navigation structure
  • Positioned it after "llm-reasoning" and before "llm-image-input" for logical ordering
  • This ensures the new streaming guide appears in the documentation sidebar under SDK > Guides > LLM Features

3. Committed and Pushed

  • Committed the change with message: "Add llm-streaming guide to docs.json under LLM Features"
  • Pushed to branch xw/completions-streaming to update PR Document LLM streaming feature #132

The change is minimal and focused - just one line added to register the new documentation page in the navigation config. PR #132 is now updated and ready for review.

View full conversation

@ryanhoangt ryanhoangt merged commit 9345839 into main Dec 1, 2025
2 checks passed
@ryanhoangt ryanhoangt deleted the xw/completions-streaming branch December 1, 2025 14:42
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.

5 participants