Repository navigation
Keep indexed embedding responses paired with their input texts - #784
Merged
Merged
Conversation
Signed-off-by: dada-yan <BinjunYann@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
This was referenced Sep 19, 2026
Merged
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.
Maya-Kid's #767, rebased onto
devafter #764 moved the streaming buffer, plus one fix from the review.Their change.
LlmClient::embedscatters response entries by theirindexwhen the response carries one, with errors for a missing, out-of-range or duplicate index and for an unfilled slot, and keeps the positional path untouched for responses that carry none. Callers zip these vectors against input texts and only check the count, so a reordered batch would store a vector against the wrong text with nothing to notice it.The fix on top. The index-presence probe was
item.get("index").is_some(), which is true for"index": null—getreturnsSome(Value::Null)— and thenas_u64()fails and the whole call errors. Three response shapes that work today became hard failures: a null index, a string index, a float index. The probe now reads the value rather than the key, so anything that is not a number falls back to position, which is what their own comment said the goal was.A test covers all three shapes and fails on the old predicate:
The English comment was rewritten in Chinese, which is the language for comments in this repository.
Their branch could not be updated from here (no permission on the fork's branch), so this carries their commit with authorship intact and #767 closes with it.
30
utopia-llmtests pass, fmt clean.🤖 Generated with Claude Code