Repository navigation
Keep captured chat logprobs in stream order - #350
Closed
jonathan308 wants to merge 1 commit into
Closed
jonathan308 wants to merge 1 commit into
jonathan308 wants to merge 1 commit into
Conversation
This was referenced Oct 23, 2026
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.
Captured logprobs can reach an out-of-band queue before their text is consumed, causing metadata for future tokens to appear on an earlier chat frame. This adds a typed metadata event to the ordered server stream and makes the canonical chat encoder consume metadata with content. Collected JSON keeps captured entries in order; absent metadata fields stay omitted.
Depends on #346. The provider companion supplies these events from the real engine bridge. Native capture support is unchanged. Reasoning/tool source spans remain unclassified, so their metadata can carry to the next visible content; trailing entries without content are omitted from streaming. The existing pending window remains bounded to the freshest 4096 entries.
Before
After
Validation: actual 362-source Common, 35-source Server and 875-source ProviderCore modules/objects compile. The combined focused executable passes 26 tests in six suites across ten final repeats, including seven strict multi-token local/distributed HTTP parity cases, producer-ahead ordering, parser holdback/flush, cancellation/error, terminal capture, bounded pending state, bridge ordering and warmup accounting. Test engines are fabricated; these results do not qualify model capture. SDK strict formatting, test organization and fork coverage pass. Full-package CI and live model tests remain separate gates.
Independent correctness/refactor review is clear after fixing warmup metadata counting. All 59 provider/SDK postimages and 72 evidence hashes were verified; the SDK publication adds only reviewed changelog/fork documentation. No further cleanup was warranted.