Repository navigation
Conversation
This branch has not been deployed
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.
When refusal fallback serves a stream with a reported usage.iterations breakdown, _HopReader replaces that breakdown with one aggregate fallback_message entry. A server-tool loop can consequently lose its sampling/compaction records, per-iteration token values, cache TTL details and reported models.
Retain the reported records and their order, and relabel only the final message/fallback_message sampling entry. When no sampling entry is reported, retain the other records and append the existing aggregate completion entry. The shared reader covers sync and async beta streaming. Aggregate usage, stream framing and fallback request construction retain their current behavior. The change adds no public name, parameter or option.
Initial validation at d151df2:
Tests use synthetic transport responses and the bundled loopback mock fixture. Existing opt-in live-provider tests remain disabled, and external provider/service-billing behavior was not validated. Normal remote CI remains in force.
Coordinated sibling ports:
These ports correct the same serving-hop projection in the SDKs' existing language-specific middleware; each includes its own runtime changelog note. The implementation and regressions were developed with substantial AI assistance.
Validation after merging current main b4b7916 (SDK 1.13.0), published at 754b710: