mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
* fix(decisions): accept OpenAI input_json content parts on /v1/decisions User messages on the OpenAI-format /v1/decisions route can now carry input_json parts whose data is an object or an array of objects. OpenAI and Azure deployments forward them unchanged. Providers without JSON input answer 400 naming input_json, or drop the part under drop_params. An input_json part takes no prompt_cache_breakpoint, matching OpenAI. * fix(router): send Decisions input_json to deployments that take JSON in a mixed group * test(decisions): match input_json test answers to the asked question * fix(decisions): catch tuple input_json in the router filter and mark it in latest-turn spend logs * fix(router): keep JSON-only Decisions calls off deployments that would drop all input under drop_params * fix(router): skip Decisions deployments whose drop would leave no input under drop_params * fix(decisions): run text guardrails on input_json data and count only kept image types * fix(decisions): redact input_json keys, scan it in LLM Shield and Cisco, count only surely kept images hide_secrets now checks each input_json value with its key in front and rewrites secrets found in keys too. LLM Shield scans the strings in input_json data, and Cisco AI Defense scans the data as JSON text and falls back to on_flagged_action in redact mode, since it cannot write redacted text back into JSON The drop_params check that skips a deployment the drop would leave with no input now counts an image as kept only when it is well formed and its media type is known to be one the deployment takes * fix(guardrails): keep colliding input_json keys apart and let LLM Shield mask keys and numbers hide-secrets now gives a key that redacts to an existing name a numbered suffix, so two secret keys in one object no longer collapse into one value. LLM Shield now sends input_json keys and numbers to the shield too, writes a number back only when the shield changed it, and renames keys after every value write so no value lands under an old key * fix(guardrails): block Cisco redact verdicts on input_json in every mode and resume colliding key suffixes * fix(guardrails): refuse Cisco redaction of input_json even when the request carries a messages field --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_call.py | ||
| test_main.py | ||