litellm/litellm-rust/crates
Yujong Lee 8893c75eb3
Some checks failed
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-wheel (push) Has been cancelled
feat(gateway): forward declined and unserved requests to Python
The gateway acts on the core decline. A replay layer records each native
request before its handler runs. When the error response carries a Decline
it forwards the recording to Python as the client sent it, or keeps the
501 when the gateway runs standalone. Paths and methods with no native
route go to Python through the merged router's fallbacks, before
authentication. The 501 stubs for embeddings and completions and the
gateway's own Unsupported variant are gone, since a matched stub would
never reach Python.

LITELLM_PYTHON_UPSTREAM picks the Fallback at startup. Forward uses its
own hyper client to the loopback proxy, strips hop-by-hop headers, adds
x-litellm-gateway-declined with the reason and appends the client address
to X-Forwarded-For. An upstream that is not an http origin is rejected
with InvalidUpstream, which keeps the URI parse failure as its source.
Error responses attach the decline in one place, so the messages handler
builds its Anthropic envelope through Error::anthropic_response instead of
a tuple that dropped it.

Forwarding is a gateway concern, so the dispatch module lives in the
gateway crate and replays declines for every mounted router. The replay
layer is installed only when a Python upstream is set, so a standalone
gateway does not buffer request bodies. Tests run the gateway and a
stand-in Python on real listeners through litellm_gateway::serve, which
main.rs uses too. The rust-error skill says where an unserved path and a
forwarded decline go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 14:56:57 -07:00
..
auth refactor(rust): prepare inference and auth foundations for the gateway (#43287) 2026-09-25 23:12:48 -07:00
auth-aws refactor(rust-error): fix the remaining sweep findings in gateway, llms, auth and cache crates 2026-10-23 14:38:14 -07:00
auth-azure refactor(rust-error): fix the remaining sweep findings in gateway, llms, auth and cache crates 2026-10-23 14:38:14 -07:00
auth-gcp refactor(rust-error): fix the remaining sweep findings in gateway, llms, auth and cache crates 2026-10-23 14:38:14 -07:00
auth-types refactor(rust-error): fix the remaining sweep findings in gateway, llms, auth and cache crates 2026-10-23 14:38:14 -07:00
cache refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
cache-azure-blob refactor(rust-error): fix the remaining sweep findings in gateway, llms, auth and cache crates 2026-10-23 14:38:14 -07:00
cache-disk refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
cache-gcs refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
cache-memory refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
cache-qdrant-semantic refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
cache-redis refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
cache-redis-semantic refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
cache-response refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
cache-s3 refactor(rust-error): fix the remaining sweep findings in gateway, llms, auth and cache crates 2026-10-23 14:38:14 -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-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
callbacks-legacy-python refactor(rust-error): fix the remaining sweep findings on the Python side 2026-10-23 14:39:05 -07:00
config refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
core-utils feat(rust): one typed decline from core up to each host 2026-10-23 14:51:44 -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 refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -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
error refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
framer refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
gateway feat(gateway): forward declined and unserved requests to Python 2026-10-23 14:56:57 -07:00
gateway-auth refactor(rust-error): keep causes as sources in llms and the gateway crates 2026-10-23 12:59:21 -07:00
gateway-inference feat(gateway): forward declined and unserved requests to Python 2026-10-23 14:56:57 -07:00
gateway-management refactor(rust-error): keep causes as sources in llms and the gateway crates 2026-10-23 12:59:21 -07:00
gateway-mcp refactor(rust-error): fix the remaining sweep findings in gateway, llms, auth and cache crates 2026-10-23 14:38:14 -07:00
gateway-ui fix(rust-error): carry OCR provider headers as a HeaderMap and keep outages off the caller 2026-10-23 14:20:08 -07:00
host refactor(rust-error): keep causes as sources in llms and the gateway crates 2026-10-23 12:59:21 -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-error): fix the remaining sweep findings on the Python side 2026-10-23 14:39:05 -07:00
http refactor(rust-error): fix the remaining sweep findings in gateway, llms, auth and cache crates 2026-10-23 14:38:14 -07:00
inference feat(rust): one typed decline from core up to each host 2026-10-23 14:51:44 -07:00
inference-chat feat(rust): one typed decline from core up to each host 2026-10-23 14:51:44 -07:00
inference-messages feat(rust): one typed decline from core up to each host 2026-10-23 14:51:44 -07:00
inference-ocr refactor(rust-error): fix the remaining sweep findings in gateway, llms, auth and cache crates 2026-10-23 14:38:14 -07:00
inference-responses feat(rust): one typed decline from core up to each host 2026-10-23 14:51:44 -07:00
inference-testing feat(rust): settle EdenAI Messages reported cost (#45698) 2026-10-12 17:39:08 -07:00
inference-transcription feat(rust): one typed decline from core up to each host 2026-10-23 14:51:44 -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 feat(rust): one typed decline from core up to each host 2026-10-23 14:51:44 -07:00
llms-types fix(databricks): use the native Anthropic route for Claude /v1/messages (#46091) 2026-10-18 02:44:38 +00:00
model-catalog refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
python-bridge feat(rust): one typed decline from core up to each host 2026-10-23 14:51:44 -07:00
python-compat refactor(rust-error): fix the remaining sweep findings in gateway, llms, auth and cache crates 2026-10-23 14:38:14 -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 refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
secrets-aws refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
secrets-azure refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
secrets-cyberark refactor(rust-error): fix the remaining sweep findings on the Python side 2026-10-23 14:39:05 -07:00
secrets-google refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
secrets-hashicorp refactor(rust-error): fix the remaining sweep findings on the Python side 2026-10-23 14:39:05 -07:00
secrets-types refactor(rust-error): map bridge and gateway-inference errors once and render them with Report 2026-10-23 14:05:20 -07:00
spend-clickhouse refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
storage-clickhouse refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
testkit refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
token-counter refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
token-counter-fast refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
token-counter-huggingface refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates 2026-10-23 12:33:59 -07:00
token-counter-tiktoken refactor(rust-error): fix the remaining sweep findings in gateway, llms, auth and cache crates 2026-10-23 14:38:14 -07:00
tracing feat(rust): add structured route lifecycle tracing (#43466) 2026-09-27 19:18:58 -07:00