Repository navigation
docs(sdk): describe typed provider boundaries and Responses streaming - #891
Merged
neubig merged 2 commits intoOct 6, 2026
Merged
Conversation
Co-authored-by: openhands <openhands@all-hands.dev>
3 of 5 tasks
Co-authored-by: openhands <openhands@all-hands.dev>
vedjoshi1
marked this pull request as ready for review
October 5, 2026 03:50
neubig
approved these changes
Oct 6, 2026
neubig
left a comment
Member
There was a problem hiding this comment.
Approving on behalf of @neubig.
Reviewed the diff and verified every documented claim against the merged SDK code (main @ 69eb315, the squash commit of #5504):
- Example is correct and runnable. Ran the new
responses()snippet verbatim against a real model (gpt-5.5via the Responses endpoint,stream=True,on_token): it streamed output and returned anLLMResponse.ModelResponseStreamis genuinely re-exported fromopenhands.sdk.llm.streaming, so the import resolves. - Removed warning was accurate to remove.
responses()/aresponses()do acceptstream=True; the old 'chat completion endpoint only' caveat was stale. No other stale limitation text remains on the page. - Behavioral prose matches implementation: non-streaming fallback when
on_tokenisNone(llm.py:1790,2048);requires_streaming/is_subscriptiondraining without a callback (llm.py:961);LLMNoResponseErroron a stream with no completed response (llm.py:1337,_response_stream.py:57); wrappercompleted_responseprecedence and generic sync/async iterable support (_response_stream.py); optional Transformers tokenizer with LiteLLM fallback (_tokenizer.py). - Docs tests reproduce exactly as described: 35 passed, 2 errors. I confirmed the 2 errors are identical on unmodified
main(pricing fixtures 404 on a removed upstream file) — pre-existing and unrelated to this PR. - Rendering/structure: code fences balanced, both pages present in
docs.jsonnav, the new/sdk/guides/llm-streaminglink and#ready-to-run-exampleanchor both resolve. The new code block carries no file-reference metadata, so the dailysync-docs-code-blocksjob will not overwrite it.
Note: the broken-links workflow is still gated as action_required (fork PR); I could not approve it with the available token, so link validation above was done manually.
This review was produced by an AI agent (OpenHands) on behalf of @neubig.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
loading/fallback behavior in the SDK LLM architecture page.
generic iterator support, and yielded-versus-wrapper completion precedence.
Companion implementation: OpenHands/software-agent-sdk#5504
Tracking issue: OpenHands/software-agent-sdk#4976
Completion-selection behavior follows alanhuangyoo's SDK PR #4772.
Validation / limitations
uv run --with pytest --with requests --with pyyaml pytest -q tests/produced 35 passed and 2 errors. The errors were pricingfixtures fetching a removed upstream file (HTTP 404); these pages do not change
pricing documentation or tests.
server startup; detailed results are in the SDK PR.
installed SDK with a recording stand-in for the request, confirming imports,
streaming arguments, and system-before-user message order. No live model call
was made. Mintlify rendering has not been verified locally.
are ready for maintainer review; the SDK branch has been rebased and validated.