docs(caching): document the semantic cache embedding deadline - #976
Merged
mateo-berri merged 1 commit intoAug 21, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 6c67a2f. Configure here.
mateo-berri
deleted the
litellm_lit5879_semantic_cache_embedding_deadline
branch
August 21, 2026 00:25
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.
TLDR
Documents the deadline that BerriAI/litellm#37742 puts on the semantic cache's prompt embedding call.
That embedding runs inline before every request, so an embedding endpoint that is unreachable or hanging used to park the whole request for minutes. It is now capped at 5 seconds, tunable per cache with
semantic_cache_embedding_timeoutor globally withSEMANTIC_CACHE_EMBEDDING_TIMEOUT_SECONDSChanges
A short section in
docs/proxy/caching.mdexplaining what happens when the deadline fires (cache miss,x-litellm-semantic-similarity: 0.0, request continues to the model) and how to raise it, plus the two semanticcache_paramsin the supported-params block and a row in the environment variable reference tableNote on ordering
litellm's
code-qualityanddocumentationjobs check out this repo's default branch, so BerriAI/litellm#37742 stays red onSEMANTIC_CACHE_EMBEDDING_TIMEOUT_SECONDSuntil this mergesNote
Low Risk
Documentation-only; no runtime or security behavior changes.
Overview
Documents the 5-second deadline on the inline prompt-embedding call used by semantic caches. If the embedding endpoint hangs, the lookup is dropped as a miss (
x-litellm-semantic-similarity: 0.0) and the request continues to the model.Shows how to raise the deadline with
semantic_cache_embedding_timeoutundercache_paramsorSEMANTIC_CACHE_EMBEDDING_TIMEOUT_SECONDS, lists those params in the supportedcache_paramsblock, and adds the env var to the config settings table.Reviewed by Cursor Bugbot for commit 6c67a2f. Bugbot is set up for automated code reviews on this repo. Configure here.