litellm/litellm-rust/crates
devin-ai-integration[bot] 5b042c0db6
fix(rust): add the dangerous-tool-use beta when an anthropic /v1/messages request carries safeguards (#46102)
* fix(rust): add the dangerous-tool-use beta when an anthropic /v1/messages request carries safeguards

* test(rust): check the dangerous-tool-use beta reaches the wire with safeguards

* fix(rust): derive the dangerous-tool-use beta only for hosts with a beta map column

DeepSeek and the other hosts without a column in anthropic_beta_headers_config.json
keep forwarding safeguards and client betas as sent. Adds the wire-level audit tests.

* fix(rust): add the safeguards beta on Azure AI and Claude Platform hosts

Azure AI and Claude Platform Messages transforms now add the
dangerous-tool-use beta for a non-null safeguards field, through the
Azure AI and Anthropic beta-map columns. The safeguards wire and chaos
tests get unique file names so they do not collide with the Python
fix's tests, the Python-route test asserts the fixed behavior behind a
BUG skip, and the DeepSeek test checks that no beta is added

* fix(rust): keep Claude Platform out of the safeguards beta until a route can prove it

Claude Platform has no beta-map column and no QA account, so it goes back to sending
safeguards with no derived beta, like DeepSeek. Also release held chaos-test requests
before the thread pool waits on them, and mark the no-column test as rstest.

* fix(rust): derive the safeguards beta for Claude Platform and keep the null-cell test off Databricks

Claude Platform on AWS answers 400 to safeguards without dangerous-tool-use-2026-09-03 and 200 with it, so its Messages transform derives the beta through the Anthropic column again. The null-cell case now uses only Bedrock Converse, since Databricks support for the beta is changing in a sibling PR.

* fix(rust): drop a null safeguards key instead of sending it without its beta

Anthropic rejects any safeguards key, null included, when the
dangerous-tool-use beta is missing, so an explicit "safeguards": null on the
Rust gateway still answered 400. The shared Messages transform now drops a
null safeguards key on every host, as the proxy already drops None params
before calling Rust, so it answers 200 with no beta.

The scripted peer in the integration wire tests now rejects the key on
presence, matching the real API.

* test: cover Bedrock Mantle in the null safeguards case and match the vendor's non-list wording

The Rust null-safeguards regression test now also runs for bedrock_mantle, whose beta is keyed on the field being present. The scripted Anthropic peer answers a non-list safeguards value with the real API's "valid array" wording.

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-10-17 16:48:05 +00:00
..
auth refactor(rust): prepare inference and auth foundations for the gateway (#43287) 2026-09-25 23:12:48 -07:00
auth-aws feat(rust): one LitellmParams type for a config and a caller (#45642) 2026-10-09 16:29:45 -07:00
auth-azure refactor(rust): share anthropic types, request helpers, and streaming contracts across crates (#43426) 2026-09-27 14:53:12 -07:00
auth-gcp fix(vertex): report an unreadable credentials file as a read failure (#40173) 2026-10-15 02:03:56 -07:00
auth-types feat(rust): one LitellmParams type for a config and a caller (#45642) 2026-10-09 16:29:45 -07:00
cache refactor(rust): derive strum VariantArray and string conversions (#45434) 2026-10-08 21:24:49 +00:00
cache-azure-blob feat: improve trace ingestion and trace details (#43975) 2026-10-01 13:45:33 -07:00
cache-disk feat(rust): add litellm-db and litellm-db-testing workspace scaffolding (#43504) 2026-09-27 18:48:45 -07:00
cache-gcs feat: improve trace ingestion and trace details (#43975) 2026-10-01 13:45:33 -07:00
cache-memory refactor(rust): align the cache crates with Python and wire every native backend (#42530) 2026-09-22 13:13:02 -07:00
cache-qdrant-semantic refactor(http): hand out an owned Client and route all providers through the pool (#43245) 2026-09-25 18:31:15 -07:00
cache-redis refactor(rust): align the cache crates with Python and wire every native backend (#42530) 2026-09-22 13:13:02 -07:00
cache-redis-semantic refactor(rust): align the cache crates with Python and wire every native backend (#42530) 2026-09-22 13:13:02 -07:00
cache-response docs(agents): ban semicolons and colons in human-facing text (#45684) 2026-10-09 16:36:32 -07:00
cache-s3 feat: improve trace ingestion and trace details (#43975) 2026-10-01 13:45:33 -07:00
cache-testing refactor(rust): align the cache crates with Python and wire every native backend (#42530) 2026-09-22 13:13:02 -07:00
cache-valkey-semantic refactor(rust): align the cache crates with Python and wire every native backend (#42530) 2026-09-22 13:13:02 -07:00
callbacks-legacy-python refactor(host-python): collect host failures in a thiserror Error enum (#46361) 2026-10-14 17:19:06 -07:00
config feat(rust): one LitellmParams type for a config and a caller (#45642) 2026-10-09 16:29:45 -07:00
core-utils feat(rust): settle EdenAI Messages reported cost (#45698) 2026-10-12 17:39:08 -07:00
coroutine refactor(rust-bridge): return an unstarted Execution from native entrypoints and drive it in Python (#46299) 2026-10-14 17:50:44 -07:00
cost fix(cost_calculator): bill ultrafast prompts above 272k at the ultrafast long-context rates (#43764) 2026-09-30 07:32:16 -07:00
db feat(rust): add litellm-db and litellm-db-testing workspace scaffolding (#43504) 2026-09-27 18:48:45 -07:00
db-testing feat(rust): add litellm-db and litellm-db-testing workspace scaffolding (#43504) 2026-09-27 18:48:45 -07:00
framer refactor(rust): one stream codec shape per API format (#45996) 2026-10-13 15:30:14 -07:00
gateway test: migrate proxy security, schema migration and MCP legacy tests (#45937) 2026-10-11 16:17:24 -07:00
gateway-auth docs(agents): ban semicolons and colons in human-facing text (#45684) 2026-10-09 16:36:32 -07:00
gateway-inference fix(rust): forward Anthropic headers to DeepSeek (#46959) 2026-10-16 20:07:41 +00:00
gateway-management feat(rust): add virtual key storage contracts (#43468) 2026-09-27 19:18:59 -07:00
gateway-mcp test: migrate proxy security, schema migration and MCP legacy tests (#45937) 2026-10-11 16:17:24 -07:00
gateway-ui feat(ui): adopt the new LiteLLM logo and monogram (#43913) 2026-09-30 14:51:06 -07:00
host feat(rust): settle EdenAI Messages reported cost (#45698) 2026-10-12 17:39:08 -07:00
host-http refactor(rust): centralize host execution and compose callbacks (#43515) 2026-09-28 19:20:27 +00:00
host-native docs(agents): ban semicolons and colons in human-facing text (#45684) 2026-10-09 16:36:32 -07:00
host-python refactor(rust-bridge): return an unstarted Execution from native entrypoints and drive it in Python (#46299) 2026-10-14 17:50:44 -07:00
http fix(http): restore the 15s aiohttp keep-alive default in the Python and Rust clients (#46355) 2026-10-14 10:50:11 -07:00
inference feat(rust): settle EdenAI Messages reported cost (#45698) 2026-10-12 17:39:08 -07:00
inference-chat docs(agents): ban semicolons and colons in human-facing text (#45684) 2026-10-09 16:36:32 -07:00
inference-messages fix(rust): add the dangerous-tool-use beta when an anthropic /v1/messages request carries safeguards (#46102) 2026-10-17 16:48:05 +00:00
inference-ocr docs(agents): ban semicolons and colons in human-facing text (#45684) 2026-10-09 16:36:32 -07:00
inference-responses feat(rust): add native OpenRouter Responses (#46000) 2026-10-15 11:02:03 -07:00
inference-testing feat(rust): settle EdenAI Messages reported cost (#45698) 2026-10-12 17:39:08 -07:00
inference-transcription docs(agents): ban semicolons and colons in human-facing text (#45684) 2026-10-09 16:36:32 -07:00
litellm refactor(rust): expand logging and test coverage across gateway and Anthropic messages (#43295) 2026-09-26 08:04:19 +00:00
llms fix(rust): add the dangerous-tool-use beta when an anthropic /v1/messages request carries safeguards (#46102) 2026-10-17 16:48:05 +00:00
llms-types refactor(rust): one stream codec shape per API format (#45996) 2026-10-13 15:30:14 -07:00
model-catalog ci(cost map): remove the generated model prices JSON schema (#47064) 2026-10-17 05:46:31 +00:00
python-bridge refactor(rust-bridge): let each route host pick the body params (#46787) 2026-10-15 18:27:06 -07:00
python-compat docs(agents): ban semicolons and colons in human-facing text (#45684) 2026-10-09 16:36:32 -07:00
router refactor(rust): give Messages configs typed litellm params (#45611) 2026-10-09 16:29:45 -07:00
router-types feat(rust): one LitellmParams type for a config and a caller (#45642) 2026-10-09 16:29:45 -07:00
secrets test: move offline logging, secret manager and provider tests from legacy dirs into tests/unit (#45554) 2026-10-09 09:48:10 -07:00
secrets-aws feat: improve trace ingestion and trace details (#43975) 2026-10-01 13:45:33 -07:00
secrets-azure feat: improve trace ingestion and trace details (#43975) 2026-10-01 13:45:33 -07:00
secrets-cyberark feat: improve trace ingestion and trace details (#43975) 2026-10-01 13:45:33 -07:00
secrets-google feat: improve trace ingestion and trace details (#43975) 2026-10-01 13:45:33 -07:00
secrets-hashicorp feat: improve trace ingestion and trace details (#43975) 2026-10-01 13:45:33 -07:00
secrets-types refactor(rust): derive strum VariantArray and string conversions (#45434) 2026-10-08 21:24:49 +00:00
spend-clickhouse refactor(lens): connect LiteLLM to the independent Lens service (#45529) 2026-10-09 16:17:05 -07:00
storage-clickhouse docs(agents): ban semicolons and colons in human-facing text (#45684) 2026-10-09 16:36:32 -07:00
testkit refactor(rust): derive strum VariantArray and string conversions (#45434) 2026-10-08 21:24:49 +00:00
token-counter refactor(rust): add shared llms wire type derives (#43730) 2026-09-29 09:19:33 -07:00
token-counter-fast refactor(rust): share anthropic types, request helpers, and streaming contracts across crates (#43426) 2026-09-27 14:53:12 -07:00
token-counter-huggingface refactor(rust): share anthropic types, request helpers, and streaming contracts across crates (#43426) 2026-09-27 14:53:12 -07:00
token-counter-tiktoken refactor(rust): share anthropic types, request helpers, and streaming contracts across crates (#43426) 2026-09-27 14:53:12 -07:00
tracing feat(rust): add structured route lifecycle tracing (#43466) 2026-09-27 19:18:58 -07:00