litellm/tests/integration/messages_endpoint
yucheng-berri ce63fa7e07
fix(guardrails): keep /v1/messages tools the guardrail left unchanged exactly as sent (#53290)
* fix(guardrails): send /v1/messages tools a guardrail left alone as the caller sent them

* fix(guardrails): send /v1/messages tools in the order the guardrail returned them

A guardrail that reordered or renamed tools had its order ignored: tools were
rebuilt in the request's order and a renamed tool was appended last, after the
tool carrying the cache_control breakpoint. Matching a rewritten tool back to a
request position also rescanned the open positions once per tool.

The tools now follow the guardrail's list. A tool it left alone is sent as the
caller sent it, any other is converted in place, with one lookup per tool.
Tools the guardrail is never shown go first, as before this branch.

* test(guardrails): measure write-back time growth instead of counting field reads

* fix(guardrails): read the tools a guardrail returns once so a one-shot iterable is not lost

* test(guardrails): drop the write-back timing test, unit tests must not depend on execution speed
2026-11-24 13:03:14 -08:00
..
chat_bridge fix(anthropic)!: send /v1/messages PDF documents to OpenAI-shaped providers as file parts (#47166) 2026-10-29 08:06:12 -07:00
providers fix(anthropic): log 0 output tokens when an error frame follows message_start (#53914) 2026-11-23 15:10:46 -08:00
responses_bridge fix(responses): send bridged system prompts too long for instructions as input (#52964) 2026-11-20 11:56:47 -08:00
safeguards fix(databricks): use the native Anthropic route for Claude /v1/messages (#46091) 2026-10-18 02:44:38 +00:00
test_anthropic_messages_caller_tools_wire.py fix(guardrails): keep /v1/messages tools the guardrail left unchanged exactly as sent (#53290) 2026-11-24 13:03:14 -08:00
test_beta_gated_fields_wire.py feat(anthropic): pick the beta allowlist row per deployment and surface input_transformations (#49689) 2026-11-03 01:55:26 +00:00
test_finished_requests_freed_wire.py fix(router): free streamed Responses API requests without waiting for a full gc (#52215) 2026-11-17 15:55:39 -08:00
test_guardrail_block_stream.py fix(proxy): stream a guardrail block on /v1/messages as Anthropic events (#49010) 2026-10-29 05:32:55 -07:00
test_guardrail_long_tool_names_wire.py refactor(anthropic): rename llms/anthropic/pass_through to llms/anthropic/messages (#48510) 2026-10-27 10:08:25 -07:00
test_guardrail_rewrite_keeps_turn_fields_wire.py fix(guardrails): keep tool_result is_error and system row output_config through /v1/messages guardrail rewrites (#52828) 2026-11-19 17:26:35 -08:00
test_message_threads_wire.py feat(anthropic): forward message threads on native /v1/messages (#50976) 2026-11-10 18:33:54 -08:00
test_messages_additional_drop_params_wire.py fix(anthropic-messages): apply additional_drop_params before the unsupported param checks (#50753) 2026-11-10 01:35:35 +00:00
test_tool_result_text_wire.py feat(mistral): add native upstream token counting support (#50652) (#50653) 2026-11-14 03:19:57 -05:00