Repository navigation
Bind captured logprobs to ordered provider events - #1573
Closed
jonathan308 wants to merge 2 commits into
Closed
jonathan308 wants to merge 2 commits into
jonathan308 wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 23, 2026
This branch was successfully 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 a model produces tokens faster than HTTP consumes them, the separate logprob drain can attach future-token metadata to an earlier content frame. Carry captured metadata through the same ordered events as text, and let the canonical SDK chat encoder build both JSON and SSE responses. The provider's local and coordinator relays preserve that frame without injecting a second metadata payload.
This draft follows #1572 and pins mlx-swift-lm #350. The bridge emits metadata before its text, the scheduler applies the requested alternative limit, and metadata events do not count as warmup content. Exhaustive consumers explicitly handle or ignore the additive event case. Native arithmetic and capture capability gates are unchanged.
Before
After
Validation: actual Common 362-source, Server 35-source and ProviderCore 875-source modules and whole-module objects compile. The focused executable passes 26 tests in six suites across ten final repeats, including all seven strict multi-token HTTP parity families, actual bridge ordering and warmup counting, request plumbing, parser holdback/flush, cancellation/error, terminal capture and pending bounds. Root documentation lint, impact checks and changelog check/preview pass. All production postimages match the reviewed snapshot; three documentation files preserve newer parent additions.
Independent correctness/refactor review is clear after repairing warmup counting and stale comments; all 59 provider/SDK files and 72 evidence hashes were checked. The removed side channel reduces duplicate ownership. No broader cleanup was warranted.
Limits: fabricated capable engines establish HTTP wiring, not live native capture. Unsupported native modes still reject logprobs. The existing 4096-entry pending bound and next-visible-content policy for unclassified reasoning/tool spans remain; trailing metadata without visible content is omitted from SSE. Full-package CI and Qwen full-artifact tensor validation remain open.
Need help on this PR? Tag
@codesmith-botwith what you need.