litellm/tests
mateo-berri f27f48ff0f fix(anthropic): count Converse's own tools and let a raw cachePoint stand in for a tool breakpoint
Converse adds a json_tool_call tool for response_format, or a dummy tool for
tool history, and appends the operator's tool_config cachePoint after it even
when it drops every listed tool. The cache step now counts that point whenever
Converse sends a tool in its tool config, so under drop_params a later 1h
breakpoint goes out as 5m instead of getting Claude's ttl order 400.

A raw Bedrock cachePoint with a ttl right after a tool breakpoint formed one run
with the breakpoint's cachePoint, and Bedrock rejects a run where two points set
a ttl. The raw cachePoint now stands in for that breakpoint, which is not sent,
and keeps its slot of Claude's four at the raw cachePoint's ttl, the same way a
client's cache_control on a block replaces its breakpoint. It does so only when
the breakpoint has the same ttl or none, or under drop_params, so without
drop_params a breakpoint with another ttl is still sent and gets Bedrock's 400.
The step also orders the tools Converse sends with one stable sort instead of a
scan per tool. The Converse tool checks move into a helper, since completion()
grew past what basedpyright analyzes
2026-10-18 02:06:55 +00:00
..
_support
base_sdk_tests test: extend runtime regression contracts for Messages and SDK (#46641) 2026-10-15 17:51:15 +00:00
benchmarks fix(anthropic): count Converse's own tools and let a raw cachePoint stand in for a tool breakpoint 2026-10-18 02:06:55 +00:00
code_coverage_tests fix(proxy)!: answer 400 for malformed tools on count_tokens instead of crashing (#46583) 2026-10-16 14:57:53 -07:00
documentation_tests
e2e Merge main into litellm_chat_prompt_cache_breakpoint_to_cache_control 2026-10-17 10:59:44 +00:00
e2e_harness test(e2e): event_loop_stalls perf case fails on a gateway event-loop hold over 100 ms that is not on its allowlist (#46974) 2026-10-17 06:55:53 +00:00
fixtures
harness_e2e
integration fix(anthropic): count Converse's own tools and let a raw cachePoint stand in for a tool breakpoint 2026-10-18 02:06:55 +00:00
rust-python-harness
test_litellm_rust test(rust-bridge): relocate dispatch tests before routing changes (#46926) 2026-10-16 12:29:33 -07:00
typing
unit fix(anthropic): count Converse's own tools and let a raw cachePoint stand in for a tool breakpoint 2026-10-18 02:06:55 +00:00
windows_tests
__init__.py
_fake_openai_endpoint_server.py
_flush_vcr_cache.py
_live_test_helpers.py
_master_key.py
_openai_record_replay_proxy.py
_process_helpers.py
_vcr_conftest_common.py
_vcr_redis_persister.py
_wait_helpers.py
_ws_vcr.py
AGENTS.md
capturing_transport.py
eval_swe_bench.py
fake_openai_endpoint.py
gettysburg.wav
large_text.py
openai_batch_completions.jsonl
pyrightconfig.json
README.MD
test_logging.conf
test_rust_python_harness.py
VCR_TESTING.md
white_100x100.png

In total litellm runs 1000+ tests

[02/20/2025] Update:

To make it easier to contribute and map what behavior is tested,

we've started mapping the litellm directory in tests/unit

This folder can only run mock tests.