Цю сторінку перекладено машинно. Читати англійський оригінал.

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.

Походження

ОфіційнийПідписано ідентичністю підписувача, яку цей каталог визнає офіційним видавцем.
Дайджест вмісту
sha256:2eec2baa709a6b97b2c3595976ecbbe2c831708a05bc63c6f0ebc0c50f7ed48e
Опубліковано
2026-11-10T10:12:19Z
Ідентичність підписувача
https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

Підпис

  • Офіційнийapplication/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

Посилання на цю версію

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

Параметри розробника

Значення, які розробник задає в сутності Aggregate.

НазваТипТипове значенняОбов’язковеОпис
modelsarray—ніThe 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—ніThe 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——ніWhat 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_enabledbooleanfalseніHas 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.

Розміри, задані оператором

Розміри інфраструктури, які оператор налаштовує для кожного середовища.

Розширює LiteLLMGuardSchemas#/schemas/RequestGuardInfra

НазваТипТипове значенняОбов’язковеОпис
portinteger (min 1024, max 65535)4000ніProxy port callers connect to. Most operators should omit this and let the Recipe assign the default (4000).
external_base_urlstring—ніExternally 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.1ніGateway 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—ніVersion 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—ні—
overridesobject (open)—ніProvider-specific overrides. Accepts any nested structure. Each Recipe documents which keys it reads.

Вихідний контракт

Значення, які цей компонент публікує для споживачів через топологію uses.

НазваТипТипове значенняОбов’язковеОпис
hoststring—такIn-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—такTCP 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—такFull 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—такThe 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—ніURL scheme to reach `host` and `port` over, for a consumer composing its own address rather than reading `endpoint`.
metrics_endpointstring—ніThe 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

Сокети залежностей, через які під’єднується цей компонент. Ціль кожного з’єднання, прокладеного через сокет, має задовольняти його селектор міток, а кожне з’єднання може нести приєднання в слотах, які оголошує сокет. Обов’язковий слот має заповнити кожне з’єднання, яке сутність Aggregate або сутність Release прокладає через сокет.

pii_analyzer

Селектор
security.aggrega.ai/text-anonymization=analyzer
Ін’єкція
—

Цей сокет не оголошує слотів приєднання, тому з’єднання через нього не несе жодного приєднання.

pii_anonymizer

Селектор
security.aggrega.ai/text-anonymization=anonymizer
Ін’єкція
—

Цей сокет не оголошує слотів приєднання, тому з’єднання через нього не несе жодного приєднання.

cache_store

Селектор
datastore.aggrega.ai/engine=kv
Ін’єкція
—

Слоти, які може заповнити кожне з’єднання через цей сокет

СлотСелекторОбов’язковеІн’єкціяЧутливийОпис
credentialfeature.aggrega.ai/kind=secretніenvтакOptional 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=secretніfileтакOptional 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

Селектор
dataplane.aggrega.ai/prompt-guard=classifier
Ін’єкція
—

Цей сокет не оголошує слотів приєднання, тому з’єднання через нього не несе жодного приєднання.

models

Селектор
component.aggrega.ai/category=ai-model
Ін’єкція
—

Слоти, які може заповнити кожне з’єднання через цей сокет

СлотСелекторОбов’язковеІн’єкціяЧутливийОпис
credentialfeature.aggrega.ai/kind=secretніenvтакOptional 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.

Слоти приєднання

Іменовані точки прив’язки, у яких сутність Feature приєднується до цього компонента. Селектор слота обмежує, яка сутність Feature може його заповнити, а його список inject визначає, як можна доставити матеріал сутності Feature. Обов’язковий слот має бути прив’язаний у кожному екземплярі, приєднанням в екземплярі або в області вище за нього, а чутливий слот оголошено для роботи з секретним матеріалом. Сутність Feature також може приєднатися під назвою, яку не оголошує жоден слот.

СлотСелекторОбов’язковеІн’єкціяЧутливийОпис
api_keyfeature.aggrega.ai/kind=secretніenvтакOptional 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=secretніenvтакOptional 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=secretніenvтакOptional 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.

Список дозволених самоін’єкцій

env

Зв’язки

Типізовані ребра до інших опублікованих сутностей і від них. Відсилання без опублікованої цілі відображається як розірване ребро, а не як посилання.

Використовує

Використовується в

Довідка про поняття Component →

Каталог Aggrega — відкритий індекс компонентів, функцій, рецептів і плагінів, які їх рендерять.

Створено на основі спільної дизайн-системи Aggrega.

Конфіденційність