litellm/tests/unit/llms/anthropic/messages
izzybn a8688005dc
fix(anthropic): a non-string advisor block id no longer answers 500 (#54167)
* fix(anthropic): match advisor blocks only by string id so a list id no longer 500s

* fix(anthropic): drop advisor blocks with a non-string id under drop_params

Without drop_params the blocks reach the provider as sent, so it answers its own 400

* fix(anthropic): drop every unpaired advisor block under drop_params

* fix(anthropic): read advisor ids as strings in the stale tool search filter and keep object advice text

* fix(anthropic): return copies from the advisor history strip instead of editing the caller's messages

* refactor(anthropic): read message fields through the typed helpers in the advisor history strip

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-11-24 10:21:39 -08:00
..
adapters fix(llms): treat chat-latest and gpt-chat-latest as gpt-5 family models (#51151) 2026-11-24 04:02:51 -08:00
context_management refactor(auth_cache): type auth cache keys and keep the cache always native (#51130) 2026-11-21 17:20:30 +09:00
native fix(anthropic): a non-string advisor block id no longer answers 500 (#54167) 2026-11-24 10:21:39 -08:00
responses_adapters fix(openai): drop or refuse an o-series reasoning_effort level the model map turns off (#54066) 2026-11-24 06:42:03 -08: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(token_counter): count an Anthropic fallback block as zero on every count route (#54006) 2026-11-24 03:32:34 -08: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