Skip to content
Back to skills

Rust Gateway

ASecurity

Add or change an HTTP route, extractor, response envelope, stream or router mount in the litellm-rust gateway crates (crates/gateway and crates/gateway-*). Use when adding an endpoint, parsing a request body, choosing an error envelope for an API surface, relaying SSE, or writing a router-level test

  • 64,529 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added November 10, 2026
ai-agentspythonrustgotestingapi

Works with

  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned November 17, 2026

npx -y skills add BerriAI/litellm --skill rust-gateway --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rust Gateway?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rust Gateway
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/berriai-rust-gateway/badge)](https://www.skillsdirectory.com/skills/berriai-rust-gateway)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rust-gateway
description: Add or change an HTTP route, extractor, response envelope, stream or router mount in the litellm-rust gateway crates (crates/gateway and crates/gateway-*). Use when adding an endpoint, parsing a request body, choosing an error envelope for an API surface, relaying SSE, or writing a router-level test
metadata:
  internal: true
---

# Rust gateway

`crates/gateway` mounts endpoint routers and serves the listener. `crates/gateway-inference` owns the inference endpoints and `gateway-auth` is the inbound authentication middleware. `gateway-forward` is the reverse proxy that relays every request to the Python proxy and has no routes of its own. A crate's `AGENTS.md`, where it has one, says what belongs in it. Read the reference for the part you are touching

- [surfaces](references/surfaces.md)
  - Each API surface mirrors the envelope the Python proxy returns there, so the shapes differ on purpose
  - The error type string is derived from the status and provider bodies pass through bounded
- [requests](references/requests.md)
  - Extractors reject with the crate's `Error`, handlers take the body as a `Result` when the error needs the request id
  - Every alias of a path is registered together, a known but unserved path goes to one handler
  - Streams relay through `litellm_host_http::Sse`, with the error frame rendered by the crate's `Error`
- [testing](references/testing.md)
  - Build the router through `tests/support` and drive it with `oneshot`, assert the fields the surface promises

How an error is classified before it reaches a response is the [`rust-error`](../rust-error/SKILL.md) skill, in particular its [gateway](../rust-error/references/gateway.md) page. Axum's own conventions are in its [docs](https://docs.rs/axum/latest/axum/)

Files in this skill

  • SKILL.md1.8 KB
  • references/requests.md2.6 KB
  • references/surfaces.md2.4 KB
  • references/testing.md1.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.