litellm/tests/unit/llms/anthropic/messages
paveln83 d91a02dfb3
test(responses-bridge): cover multi-turn GPT-6.2 prompt caching on OpenAI and Bedrock Mantle (#54361)
* test(responses-bridge): add multi-turn system prompt cache matrix to integration and e2e

* test(responses-bridge): run the multi-turn prompt cache e2e on Bedrock Mantle too

* test(responses-bridge): hold the prompt cache yardstick to the first prompt and cover a cached system block

* test(responses-bridge): skip the Mantle prompt cache e2e cells until stage is subscribed

* test(responses-bridge): fail the prompt cache yardstick when Responses returns no usage

* test(responses-bridge): word the prompt cache failure for chat that never reaches the bridge

* test(responses-bridge): cover Azure AI Foundry in the multi-turn system prompt matrix

* test(responses-bridge): require continued turns to cache the whole system prompt

The e2e floor is now each conversation's own system prompt, measured as
turn 1's input tokens less those of the same turn with a one-character
system prompt, for both the bridged side and the yardstick. The first
question carries 12 short notes so the tokens GPT-6.2 does not reuse at
the end of the previous request fall after the system prompt.

The unit tests that pin system placement on both bridges now also run
every case on a continued turn.

* test(responses-bridge): cite the cache tail measurement and name the yardstick route

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-11-25 11:39:57 +00:00
..
adapters fix(messages): answer 400 for a non-string user or system text block and keep count_tokens in step with inference (#54165) 2026-11-25 00:48:41 +00:00
context_management fix(messages): answer 400 for a non-string user or system text block and keep count_tokens in step with inference (#54165) 2026-11-25 00:48:41 +00:00
native fix(gateway): serve messages drop, summary and timeout settings like Python (#51236) 2026-11-25 09:26:12 +00:00
responses_adapters test(responses-bridge): cover multi-turn GPT-6.2 prompt caching on OpenAI and Bedrock Mantle (#54361) 2026-11-25 11:39:57 +00:00
__init__.py test(unit): add package markers to migrated unit test directories 2026-09-20 11:53:14 +00:00
conftest.py refactor(auth_cache): type auth cache keys and keep the cache always native (#51130) 2026-11-21 17:20:30 +09:00
test_advisor_orchestration.py fix(anthropic): a non-string advisor block id no longer answers 500 (#54167) 2026-11-24 10:21:39 -08:00
test_anthropic_native_passthrough_spend_logging.py refactor(anthropic): rename llms/anthropic/pass_through to llms/anthropic/messages (#48510) 2026-10-27 10:08:25 -07:00
test_caller_model_checks.py feat(auth): read teams, team memberships and organizations through rust repositories (#52176) 2026-11-18 22:32:05 +00:00
test_convertible_blocks.py fix(messages): answer 400 for a non-string user or system text block and keep count_tokens in step with inference (#54165) 2026-11-25 00:48:41 +00:00
test_reasoning_effort_fields.py fix(anthropic)!: keep thinking disabled, display, between_tools, and effort on /v1/messages to OpenAI (#49765) 2026-11-24 01:43:29 +00:00
test_safeguards.py fix(anthropic): log the safeguards classifier and compaction summary calls in the parent request's session (#53405) 2026-11-24 01:31:04 -08:00
test_stream_assembly.py fix(guardrails): judge and deliver the /v1/messages stream frames a client reads in tool_permission (#53673) 2026-11-23 09:37:13 -08:00