fix(search): reserve interactive embeddings from their own admission lane - #7726
Merged
Merged
Conversation
…lane A search embeds its query through the same per-credential admission bucket as bulk indexing, so during a crawl one short interactive request competed with hundreds of batches for the bucket's refill. Non-checkpointed callers now reserve from a separate lane under the same identity; the provider cooldown and quota gates stay shared, so a provider 429 or an exhausted balance still pauses every caller. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JBacX6HGVhPMUySuMfANwn
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
|
Every caller reserves from the credential's aggregate buckets, and the bulk lane additionally reserves from a bucket capped at 90% of that budget. The aggregate can no longer exceed the configured budget, and interactive callers always find headroom instead of a queue behind a crawl's batches. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JBacX6HGVhPMUySuMfANwn
Collaborator
Author
|
@greptile review |
…vation At the smallest supported budgets the 90% share floored below a single request or token cost and locked the bulk lane. The bucket now holds at least the reservation it is asked for, while the refill rate keeps the share. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JBacX6HGVhPMUySuMfANwn
A single bulk flag now selects the shorter admission wait and the capped lane, the lane cap is a pure function of configuration, and a bulk batch larger than that cap is rejected up front instead of resizing a shared bucket. Tests use the shared env mock. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Collaborator
Author
|
@greptile review |
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.
Summary
Type of Change
Testing
vitestonlib/embeddings,lib/core/rate-limiter,lib/knowledge/embeddings: 342 passing; type-check and lint passChecklist
🤖 Generated with Claude Code