Conversation
Preserves the completion precedence and regression identified by alanhuangyoo in OpenHands#4772. Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Preserve absent LiteLLM fields, response replay metadata, and subscription config behavior. Cover stream output reconstruction without callbacks. Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Contributor
|
📁 PR Artifacts Notice This PR contains a |
2 tasks
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.
HUMAN:
AGENT:
Why
Keep provider shape variation at typed LLM boundaries and correct the case where
a streaming wrapper's stale
completed_response=Noneerases a yielded completion.Summary
sync/async generators, optional Transformers, counting fallbacks, and output reconstruction.
core conversion. LiteLLM declares these fields but deletes them when absent.
(98 → 84), without dependency, persisted-schema, routing, or telemetry changes.
Issue Number
Fixes #4976. Completion precedence follows alanhuangyoo's closed, unmerged #4772;
the new regression matrix builds on that report and credits it in the commit.
How to Test
Local results: 6,432 SDK tests passed (9 skipped, 19 deselected, 12 xfailed);
1,073 LLM/checker tests passed, including the no-callback reconstruction cases. Whole-repository
pre-commit/Pyright checks passed. The stream regression matrix first reproduced
six failures before the fix, then passed all 15 cases.
Beyond unit tests, all six loopback HTTP/SSE cases passed through the actual SDK
and LiteLLM parsers (sync/async Responses, non-streaming and streaming; sync/async
Chat Completions streaming). Final output, callback text, stable item IDs, and
empty-output reconstruction were asserted. This is local integration evidence,
not a live-provider test.
Token counting passed without Transformers and with real Transformers 5.17.0
loading a local tokenizer (exact count: 2); no model downloads or PyTorch required.
See .pr/verification.md for complete commands and environmental limitations.
The first broad test/build overlap exhausted local disk space; the separate SDK
rerun passed.
make build-serversucceeded when run separately, producing themacOS arm64 server executable with all three new private modules included. The
binary's
--helpworked and its loopback/healthendpoint returned HTTP 200.Video/Screenshots
No UI changes. Reproducible transport and tokenizer smoke scripts, with results,
are under
.pr/.Design Doc
Before/after interfaces and compatibility decisions
Type
Notes
Companion documentation: OpenHands/docs#825.
The human author must complete the reserved
HUMAN:section before this draftis marked ready for review.