Diese Seite wurde maschinell übersetzt. Englisches Original lesen.

Component

core/gateway/litellm

An AI gateway that fronts several models behind one in-cluster, OpenAI-compatible endpoint, routing each request by the alias it asks for. Each model wired to its models socket is served under the connection's alias, with that connection's credential; values.models adds aliases typed by hand, presenting provider_key. No credential reaches the calling application. It publishes one alias as its model, so an agent's model socket takes it in place of a model. Because it holds those credentials, it forwards only the request fields the proxy declares for the route, and refuses the rest naming the field. It answers only its model routes, the model listing, its health checks and key management. Its other optional sockets take the Presidio analyzer and anonymizer, the vector-search store that core/semantic-caching keeps replies in, and the guard that core/prompt-injection-shield sends requests through; wiring one alone changes no request. On Kubernetes, reach for helm/litellm-gateway, the synthesis, where the build must fetch nothing, and helm/litellm-gateway-chart, BerriAI's chart, where its registry is reachable. On Docker Compose, compose/litellm-gateway runs it for local development, without the semantic cache. values.log_masking masks what it lists in the copies of a successful call the gateway hands to its logs, never in what the provider or the caller receives. It excludes core/data-masking. Attached, core/semantic-caching keeps end users apart only by the end user each request names, which the gateway does not verify, and core/period-budget, once spent, refuses the administrative key's model requests too.

Herkunft

OffiziellSigniert von einer Signaturidentität, die dieser Katalog als offiziellen Herausgeber anerkennt.
Inhalts-Digest
sha256:2eec2baa709a6b97b2c3595976ecbbe2c831708a05bc63c6f0ebc0c50f7ed48e
Veröffentlicht
2026-11-10T10:12:19Z
Signaturidentität
https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

Signatur

  • Offiziellapplication/vnd.dev.sigstore.bundle.v0.3+json

    https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

    sha256:89df638cc9197596682999b461cc28e61efba0c6ec93c6be82e7270e5e2fb42d

Referenz zu dieser Version

oci://hub.aggrega.ai/component/core/gateway/litellm:1.0.0

Entwicklerparameter

Werte, die der Entwickler im Aggregate festlegt.

NameTypStandardwertErforderlichBeschreibung
modelsarray—neinThe hand-typed part of the model map. Each entry publishes one alias and names the upstream target it resolves to, and presents provider_key as its credential. Optional; the gateway also serves every model wired to its models socket, and the build halts when neither gives it a model.
modelstring—neinThe alias of the model map published as this gateway's model, which a component wired to the gateway sends as the model name of its requests. It must be an alias the gateway serves, from values.models or from a connection on the models socket, and the build halts naming this value otherwise. It may be omitted only when the gateway serves one alias and an entry of values.models publishes it, which is then the one published; with several distinct aliases, or with no entry in values.models, the build halts without it.
log_masking——neinWhat to mask in the copies of each call the gateway hands to its logs, while the request it forwards and the reply it returns stay exactly as they were sent. List regular expressions under patterns, matched inside the gateway, and entity types under entities, found and replaced by the Presidio analyzer and anonymizer wired to the pii_analyzer and pii_anonymizer sockets, which listing any requires; a type the analyzer does not recognize in English halts the build, naming the ones it does. It masks each copy of a successful call the gateway hands to its logs, the request the spend logs keep and the reply each logging integration receives among them, on every call, and a caller cannot turn it off. A failed call carries no request text in any log the catalog renders: its text is withheld, matched or not, its error text leaves the gateway's own log with only its kind staying, and failed calls leave the spend logs and the daily spend totals, so beside core/audit-logging the request log keeps answered requests only. An integration configured outside the catalog can still receive a provider's own error message, and one registered ahead of the gateway's own failure callback a failed call's text as it came. Left unmasked: all the provider receives and the caller is answered; request metadata, tool definitions and headers; the gateway's debug output; and text nothing matches. A call whose copies cannot be masked, as when a recognizer cannot be reached, is still logged and counted, with every text in its copies replaced by [TEXT_WITHHELD]. Listing nothing masks nothing and adds nothing to the gateway. The build halts while it lists something and core/data-masking is attached to the gateway.
metrics_enabledbooleanfalseneinHas the gateway serve its own Prometheus metrics through its path allowlist on port 9090 of the Service its Recipe serves them on, where a GET of /metrics alone is forwarded, and publishes their address as `metrics_endpoint`; while false that key is empty. The port checks no caller, and the metrics name the hashed keys, key aliases and user emails the gateway attributes spend to, so anything that reaches the port reads them.

Dimensionierung durch den Operator

Infrastrukturdimensionierung, die der Operator pro Umgebung anpasst.

Erweitert LiteLLMGuardSchemas#/schemas/RequestGuardInfra

NameTypStandardwertErforderlichBeschreibung
portinteger (min 1024, max 65535)4000neinProxy port callers connect to. Most operators should omit this and let the Recipe assign the default (4000).
external_base_urlstring—neinExternally reachable origin of the gateway, as assembled at the ingress tier — scheme, host and, where it is not the scheme's default, port, with no path; for example https://llm.example.com. The gateway composes from this the sign-in callback address it hands an identity provider, the address of its admin console it sends a browser to after sign-in, and the gateway address it writes into every alert it sends. The product documents this setting as an origin only, so the Recipe halts the build on an address carrying a path. Omitted, the gateway composes each of those addresses from the request that arrives, which is correct for a gateway nobody signs in to from outside the cluster.
engine_versionstringv1.103.1neinGateway image tag. Selects the image tag of the proxy container on every Recipe. Each Recipe delivers code into the proxy that is proven only at the LiteLLM releases it lists, and halts the build on any other value, naming them.
source_versionstring—neinVersion of BerriAI's litellm-helm chart the chart-backed Recipe pulls, defaulting to the version that Recipe was checked against. The workload-synthesis Recipe pulls no chart and reads nothing here.
computeobject—nein—
overridesobject (open)—neinProvider-specific overrides. Accepts any nested structure. Each Recipe documents which keys it reads.

Ausgabevertrag

Werte, die diese Komponente über die uses-Topologie an Konsumenten veröffentlicht.

NameTypStandardwertErforderlichBeschreibung
hoststring—jaIn-cluster DNS name of the Service fronting the gateway. A consumer that composes its own address dials this name; one that does not reads `endpoint` instead.
portinteger—jaTCP port that Service accepts caller traffic on. It follows the port an operator set in the Release, so a consumer reads it rather than assuming a default.
endpointstring—jaFull base URL of the OpenAI-compatible API the gateway serves, with the host, the port and the API path already composed. A caller hands it to a client library as its base URL and asks for an alias the model map publishes.
modelstring—jaThe alias a consumer wired to the gateway sends as its model name: values.model, or the one alias the map publishes when that is omitted. Other aliases the map publishes are served at the same endpoint to a caller that names them itself.
protocolstring—neinURL scheme to reach `host` and `port` over, for a consumer composing its own address rather than reading `endpoint`.
metrics_endpointstring—neinThe full address Prometheus scrapes this component's metrics at — scheme, host, port and path, `http://<host>:9090/metrics`, the host being the name of the Service the Recipe serves them on. Empty while values.metrics_enabled is false.

uses-Sockets

Die Abhängigkeits-Sockets, über die sich diese Komponente verbindet. Das Ziel jeder über einen Socket verdrahteten Verbindung muss dessen Label-Selektor erfüllen, und jede Verbindung kann in den Slots, die der Socket deklariert, eine Anbindung tragen. Einen erforderlichen Slot muss jede Verbindung füllen, die das Aggregate oder das Release über den Socket verdrahtet.

pii_analyzer

Selektor
security.aggrega.ai/text-anonymization=analyzer
Injektion
—

Dieser Socket deklariert keine Anbindungs-Slots, daher trägt eine Verbindung über ihn keine Anbindung.

pii_anonymizer

Selektor
security.aggrega.ai/text-anonymization=anonymizer
Injektion
—

Dieser Socket deklariert keine Anbindungs-Slots, daher trägt eine Verbindung über ihn keine Anbindung.

cache_store

Selektor
datastore.aggrega.ai/engine=kv
Injektion
—

Slots, die jede Verbindung über diesen Socket füllen kann

SlotSelektorErforderlichInjektionSensibelBeschreibung
credentialfeature.aggrega.ai/kind=secretneinenvjaOptional password the gateway's semantic cache presents to the store this connection reaches. When attached, the Recipe delivers it as REDIS_PASSWORD, referenced from the secret that holds it, and the cache reads it inside its connection URL, unencoded: a password carrying /, ?, # or %, or a tab or a line break, breaks that URL when the gateway starts, and nothing checks it at build, so use letters and digits. Attach a credential holding the password the store itself requires. Unattached, the cache connects without a password, which suits a store with none.
server_cafeature.aggrega.ai/kind=secretneinfilejaOptional authority the gateway's semantic cache checks the store's certificate against while the store publishes protocol redis-tls, where the gateway does not already trust the authority that signs it. Its Secret holds ca.crt and sits in the gateway's namespace. The Recipe mounts the whole Secret read-only into the gateway and names its ca.crt in the cache's connection URL; the cache checks the certificate's chain against it and that the certificate names the store's published host, and, verifying strictly, refuses an authority certificate that carries no key usage extension; with a refused certificate every lookup is a miss and nothing is stored. The build halts on a server_ca publishing no Secret name, and on one wired to a store served without TLS. Fill it with core/referenced-secret.

guard

Selektor
dataplane.aggrega.ai/prompt-guard=classifier
Injektion
—

Dieser Socket deklariert keine Anbindungs-Slots, daher trägt eine Verbindung über ihn keine Anbindung.

models

Selektor
component.aggrega.ai/category=ai-model
Injektion
—

Slots, die jede Verbindung über diesen Socket füllen kann

SlotSelektorErforderlichInjektionSensibelBeschreibung
credentialfeature.aggrega.ai/kind=secretneinenvjaOptional credential the gateway presents to the model this connection reaches. When attached, the Recipe delivers it as LITELLM_MODEL_<ALIAS>_API_KEY, the connection's alias in capitals with every character other than a letter or a digit as an underscore, referenced from the secret that holds it, and the connection's entry in the routing table names that variable. Unattached, the entry presents no credential.

Anbindungs-Slots

Benannte Bindungspunkte, an denen ein Feature an diese Komponente angebunden wird. Der Selektor eines Slots schränkt ein, welches Feature ihn füllen darf, und seine inject-Liste benennt, wie das Feature sein Material liefern darf. Ein erforderlicher Slot muss auf jeder Instanz gebunden sein, durch eine Anbindung an der Instanz oder in einem darüberliegenden Geltungsbereich, und ein sensibler Slot ist für den Umgang mit geheimem Material deklariert. Ein Feature kann auch unter einem Namen angebunden werden, den kein Slot deklariert.

SlotSelektorErforderlichInjektionSensibelBeschreibung
api_keyfeature.aggrega.ai/kind=secretneinenvjaOptional administrative key guarding the gateway's own API, which LiteLLM calls its master key. When attached, the Recipe delivers it as LITELLM_MASTER_KEY, the environment variable the proxy reads at startup, so callers and the management API must present it. Unlike a server that checks one key, the gateway also accepts the keys it issues through its key-management API and keeps in its bookkeeping database: with database_url attached a caller may present such a key instead, and with none the gateway accepts this key alone. Unattached, the gateway starts with no administrative key and treats every caller as an unprivileged internal user, which suits a development Release and not a shared one.
provider_keyfeature.aggrega.ai/kind=secretneinenvjaOptional credential the gateway presents to the upstreams the hand-typed entries of values.models target. When attached, every such entry names the environment variable the Recipe delivers it under, so the gateway authenticates upstream and the calling application never holds the credential. A model wired to the models socket never presents it: its credential is the one its own connection carries. Unattached, a hand-typed entry presents no credential, so a request routed to an upstream that requires one fails at the provider. This one slot holds one credential for every hand-typed entry; upstreams that each need their own are wired to the models socket, one connection and one credential each, where their model API allows it.
database_urlfeature.aggrega.ai/kind=secretneinenvjaOptional connection string for the gateway's own bookkeeping database, which backs key management, spend tracking and request logs. When attached, the Recipe delivers it as the environment variable the proxy reads at startup, referenced from the secret that holds it, so the gateway's Deployment carries the reference and never the string. The compiler never connects to the database. Unattached, the gateway runs stateless — it serves and routes normally, and the features that need persistence are simply inactive.

Zulassungsliste für Selbstinjektion

env

Beziehungen

Typisierte Kanten zu und von anderen veröffentlichten Entitäten. Eine Referenz ohne veröffentlichtes Ziel wird als unterbrochene Kante statt als Link dargestellt.

Verwendet

Verwendet von

Konzeptreferenz zu Component →

Der Aggrega-Katalog — ein offener Index von Komponenten, Funktionen, Rezepten und den Plugins, die sie rendern.

Erstellt mit dem gemeinsamen Aggrega-Designsystem.

Datenschutz