litellm/litellm-rust/crates/llms/src
yujonglee 323d3956d6
feat(rust): one typed decline from core up to each host (#47772)
* feat(rust): one typed decline from core up to each host

Rust core says it cannot serve a request with one Decline that travels
unchanged through llms and inference up to the host. The Python bridge
raises RustBridgeDeclined for it in route_failure before the public
exception mapping, so dispatch falls back to legacy Python instead of
failing the call, and the gateway answers 501. Every route collapses
errors after the send with Error::after_send, which keeps a provider
answer and a response fault as they are and nests anything else as the
source of an invalid response, so a billed call can never read as a
decline. Response-side cases that used to decline are now
ErrorDetail::Unhandled response faults.

The rust-error skill documents declined() as the first question both
boundaries ask, and the Python suites pin that a native decline reaches
the dispatcher before any provider IO.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(rust): keep post-provider hook failures terminal

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-28 09:22:11 -07:00
..
anthropic feat(rust): one typed decline from core up to each host (#47772) 2026-10-28 09:22:11 -07:00
aws_textract refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
azure_ai refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
base_llm feat(rust): one typed decline from core up to each host (#47772) 2026-10-28 09:22:11 -07:00
bedrock feat(rust): one typed decline from core up to each host (#47772) 2026-10-28 09:22:11 -07:00
bedrock_mantle refactor(rust): inline Messages provider resolution (#47217) 2026-10-19 09:03:44 -07:00
cohere refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
deepseek refactor(rust): inline Messages provider resolution (#47217) 2026-10-19 09:03:44 -07:00
edenai refactor(rust): inline Messages provider resolution (#47217) 2026-10-19 09:03:44 -07:00
minimax refactor(rust): inline Messages provider resolution (#47217) 2026-10-19 09:03:44 -07:00
mistral refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
openai refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
openai_like feat(rust): one typed decline from core up to each host (#47772) 2026-10-28 09:22:11 -07:00
openrouter refactor(rust): inline Messages provider resolution (#47217) 2026-10-19 09:03:44 -07:00
reducto refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
tencent refactor(rust): inline Messages provider resolution (#47217) 2026-10-19 09:03:44 -07:00
vertex_ai refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
error.rs feat(rust): one typed decline from core up to each host (#47772) 2026-10-28 09:22:11 -07:00
lib.rs refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00