litellm/tests/test_litellm/caching
Yuneng Jiang 57a4a908d1
Some checks failed
LiteLLM Rust / rust-lint (push) Waiting to run
LiteLLM Rust / rust-test (push) Waiting to run
LiteLLM Rust / rust-wheel (push) Waiting to run
Terraform Modules / fmt, validate, test (aws) (push) Has been cancelled
Terraform Modules / fmt, validate, test (gcp) (push) Has been cancelled
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled
Merge remote-tracking branch 'origin/main' into litellm_wt_0918_be27
main landed its own fix for the same partial-embedding-cache bug (#42431's
line), so the two implementations collided in caching_handler.py and utils.py.
Took main's shape everywhere, since it is the base:

- CachingHandlerResponse.embedding_uncached_input replaces this branch's
  remaining_embedding_inputs, and wrapper_async's call_kwargs replaces
  provider_kwargs. The duplicate provider_kwargs block is gone.
- main's _combine_cached_embedding_response_with_api_result replaces this
  branch's; both splice by position, main's builds a new EmbeddingResponse.

Two things from this branch are kept because dropping them would lose a fix:

- main fills embedding_uncached_input from handle_kwargs_input_list_or_str
  (kwargs), which works only because its _process_async_embedding_cached_response
  writes the trimmed list back through kwargs["input"]. This branch removed that
  mutation, so the field now takes the subset computed explicitly from
  cached_result. Without this the full input list would go upstream on a partial
  hit, which is the bug the branch exists to fix.
- The field admits int as well, so a flat token-id input list does not fail
  pydantic validation on a partial hit.

The response-cost recompute and logging the combined response merged clean.
2026-09-22 15:23:15 -07:00
..
test_azure_blob_cache.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_caching.py fix(caching): keep embedding cache hits aligned with request inputs (#42571) 2026-09-22 17:14:44 -05:00
test_caching_handler.py Merge remote-tracking branch 'origin/main' into litellm_wt_0918_be27 2026-09-22 15:23:15 -07:00
test_check_and_fix_namespace_none_guard.py chore: litellm oss staging160626 (#30527) 2026-06-16 18:23:13 -07:00
test_disk_cache.py fix(cache): make in-memory and disk cache increments atomic (#34013) 2026-07-20 15:51:01 -07:00
test_dual_cache.py fix(budgets): page end-user cache invalidation after a budget reset 2026-09-16 12:12:18 -07:00
test_embedding_router.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_evicted_client_closer.py test(caching): align closer tests with self-healing handlers 2026-08-04 18:23:06 -07:00
test_gcs_cache.py fix: resolve Python 3.14 OCR annotations and remaining matrix failures 2026-09-02 14:35:38 -07:00
test_in_memory_cache.py refactor(mcp): reuse in-memory discovery storage 2026-09-11 17:53:51 -07:00
test_llm_caching_handler.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_llm_client_cache_e2e.py fix: don't close HTTP/SDK clients on LLMClientCache eviction (#22925) 2026-03-05 12:00:38 -08:00
test_qdrant_semantic_cache.py fix(cache-qdrant-semantic): wait for Qdrant upserts to be indexed 2026-09-21 21:47:56 +00:00
test_redis_cache.py fix(proxy): build Redis spend-log rows as tuples and pin the LTRIM window in the pipeline test 2026-09-20 09:16:50 +00:00
test_redis_cluster_cache.py fix: resolve Python 3.14 OCR annotations and remaining matrix failures 2026-09-02 14:35:38 -07:00
test_redis_cluster_node_isolation.py fix(caching): keep a node timeout from forcing a cluster-wide topology reinit on redis-py 8.x (#39349) 2026-09-03 17:31:58 -07:00
test_redis_connection_pool.py fix: resolve Python 3.14 OCR annotations and remaining matrix failures 2026-09-02 14:35:38 -07:00
test_redis_semantic_cache.py Merge pull request #40262 from BerriAI/litellm_lit_7190_inline_token_counts 2026-09-15 13:38:00 -07:00
test_s3_cache.py fix: address cross-version CI failures 2026-09-02 14:17:19 -07:00
test_valkey_semantic_cache.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00