litellm/litellm-rust/crates/gateway-inference/AGENTS.md
devin-ai-integration[bot] de74f81c69
chore(rust): prune inference deps and rewrite layering docs (#44836)
* chore(rust): prune unused inference crate dependencies

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs(rust): rewrite inference layering docs for the split format crates

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs(rust): note transcription and RouteError alias exceptions in inference AGENTS.md

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Yujong Lee <yujong@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-06 07:17:27 -07:00

981 B

  • Expose a mountable Axum router; listener binding, server lifecycle, and shared inbound middleware belong to gateway
  • Own endpoint paths, request parsing, model alias resolution, and API-specific response and SSE error formats; delegate hosted call execution and HTTP body delivery to host-http
  • Delegate inference execution to the inference-<fmt> crates and provider transformations and authentication to llms and the auth crates; do not duplicate them in handlers
  • Let the inference-<fmt> crates validate inference fields and supported features, then map their errors to HTTP responses; do not add gateway checks for temporary inference limitations
  • Use injected deployments, HTTP pools, settings, and secret sources; do not load process configuration or construct independent clients in handlers
  • Test HTTP contracts here, including status codes, forwarded headers, error envelopes, and streaming behavior; keep inference and provider tests in their owning crates