mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-30 01:08:33 +00:00
* 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 |
||
|---|---|---|
| .. | ||
| chat_bridge | ||
| providers | ||
| responses_bridge | ||
| safeguards | ||
| test_anthropic_messages_caller_tools_wire.py | ||
| test_beta_gated_fields_wire.py | ||
| test_finished_requests_freed_wire.py | ||
| test_guardrail_block_stream.py | ||
| test_guardrail_long_tool_names_wire.py | ||
| test_guardrail_rewrite_keeps_turn_fields_wire.py | ||
| test_message_threads_wire.py | ||
| test_messages_additional_drop_params_wire.py | ||
| test_tool_result_text_wire.py | ||