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.
Procedência
- Digest do conteúdo
- sha256:2eec2baa709a6b97b2c3595976ecbbe2c831708a05bc63c6f0ebc0c50f7ed48e
- Publicado
- 2026-11-10T10:12:19Z
- Identidade de assinatura
- https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main
Assinatura
- Oficialapplication/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
Referência nesta versão
oci://hub.aggrega.ai/component/core/gateway/litellm:1.0.0Parâmetros do desenvolvedor
Valores que o desenvolvedor define no Aggregate.
| Nome | Tipo | Padrão | Obrigatório | Descrição |
|---|---|---|---|---|
| models | array | — | não | 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. |
| model | string | — | não | 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 | — | — | não | 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_enabled | boolean | false | não | 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. |
Dimensionamento do operador
Dimensionamento de infraestrutura que o operador ajusta por ambiente.
Estende LiteLLMGuardSchemas#/schemas/RequestGuardInfra
| Nome | Tipo | Padrão | Obrigatório | Descrição |
|---|---|---|---|---|
| port | integer (min 1024, max 65535) | 4000 | não | Proxy port callers connect to. Most operators should omit this and let the Recipe assign the default (4000). |
| external_base_url | string | — | não | 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_version | string | v1.103.1 | não | 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_version | string | — | não | 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. |
| compute | object | — | não | — |
| overrides | object (open) | — | não | Provider-specific overrides. Accepts any nested structure. Each Recipe documents which keys it reads. |
Contrato de saída
Valores que este componente publica para os consumidores pela topologia uses.
| Nome | Tipo | Padrão | Obrigatório | Descrição |
|---|---|---|---|---|
| host | string | — | sim | 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. |
| port | integer | — | sim | 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. |
| endpoint | string | — | sim | 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. |
| model | string | — | sim | 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. |
| protocol | string | — | não | URL scheme to reach `host` and `port` over, for a consumer composing its own address rather than reading `endpoint`. |
| metrics_endpoint | string | — | não | 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. |
Sockets uses
Os sockets de dependência pelos quais este componente se conecta. O destino de cada conexão ligada por um socket deve satisfazer o seletor de rótulos dele, e cada conexão pode carregar um acoplamento nos slots que o socket declara. Cada conexão que o Aggregate ou a Release liga pelo socket deve preencher os slots obrigatórios.
pii_analyzer
- Seletor
- security.aggrega.ai/text-anonymization=analyzer
- Injeção
- —
Este socket não declara slots de acoplamento, então uma conexão por ele não carrega nenhum acoplamento.
pii_anonymizer
- Seletor
- security.aggrega.ai/text-anonymization=anonymizer
- Injeção
- —
Este socket não declara slots de acoplamento, então uma conexão por ele não carrega nenhum acoplamento.
cache_store
- Seletor
- datastore.aggrega.ai/engine=kv
- Injeção
- —
Slots que cada conexão por este socket pode preencher
| Slot | Seletor | Obrigatório | Injeção | Sensível | Descrição |
|---|---|---|---|---|---|
| credential | feature.aggrega.ai/kind=secret | não | env | sim | 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_ca | feature.aggrega.ai/kind=secret | não | file | sim | 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
- Seletor
- dataplane.aggrega.ai/prompt-guard=classifier
- Injeção
- —
Este socket não declara slots de acoplamento, então uma conexão por ele não carrega nenhum acoplamento.
models
- Seletor
- component.aggrega.ai/category=ai-model
- Injeção
- —
Slots que cada conexão por este socket pode preencher
| Slot | Seletor | Obrigatório | Injeção | Sensível | Descrição |
|---|---|---|---|---|---|
| credential | feature.aggrega.ai/kind=secret | não | env | sim | 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. |
Slots de acoplamento
Pontos de vinculação nomeados nos quais uma Feature se acopla a este componente. O seletor de um slot restringe qual Feature pode preenchê-lo, e sua lista inject indica como o material da Feature pode ser entregue. Um slot obrigatório deve estar vinculado em cada instância, por um acoplamento na instância ou em um escopo acima dela, e um slot sensível é declarado para lidar com material secreto. Uma Feature também pode se acoplar com um nome que nenhum slot declara.
| Slot | Seletor | Obrigatório | Injeção | Sensível | Descrição |
|---|---|---|---|---|---|
| api_key | feature.aggrega.ai/kind=secret | não | env | sim | 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_key | feature.aggrega.ai/kind=secret | não | env | sim | 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_url | feature.aggrega.ai/kind=secret | não | env | sim | 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. |
Lista de permissões de autoinjeção
env
Relações
Arestas tipadas de e para outras entidades publicadas. Uma referência sem destino publicado é exibida como uma aresta quebrada em vez de um link.
Usa
- usausa o socket «pii_analyzer»
security.aggrega.ai/text-anonymization=analyzer
Não declara slots de acoplamento.
- usausa o socket «pii_anonymizer»
security.aggrega.ai/text-anonymization=anonymizer
Não declara slots de acoplamento.
- usausa o socket «cache_store»
datastore.aggrega.ai/engine=kv
Slots de acoplamento: credential, server_ca
- usausa o socket «guard»
dataplane.aggrega.ai/prompt-guard=classifier
Não declara slots de acoplamento.
- usausa o socket «models»
component.aggrega.ai/category=ai-model
Slots de acoplamento: credential
core/ai-model/ai21 v1.0.0 →core/ai-model/anthropic v1.0.0 →core/ai-model/azure-managed v1.0.0 →core/ai-model/azure-openai v1.0.0 →core/ai-model/azure-openai-embedding v1.0.0 →core/ai-model/bedrock v1.0.0 →core/ai-model/bedrock-embedding v1.0.0 →core/ai-model/cohere v1.0.0 →core/ai-model/databricks v1.0.0 →core/ai-model/docker-model-runner v1.0.0 →core/ai-model/gemini v1.0.0 →core/ai-model/huggingface v1.0.0 →core/ai-model/litellm v1.0.0 →core/ai-model/mistral v1.0.0 →core/ai-model/nemoguard-content-safety v1.0.0 →core/ai-model/nvidia-api v1.0.0 →core/ai-model/nvidia-nim v1.0.0 →core/ai-model/nvidia-nim-operator v1.0.0 →core/ai-model/ollama v1.0.0 →core/ai-model/openai v1.0.0 →core/ai-model/openai-compatible v1.0.0 →core/ai-model/openai-embedding v1.0.0 →core/ai-model/replicate v1.0.0 →core/ai-model/sagemaker v1.0.0 →core/ai-model/tei v1.0.0 →core/ai-model/tgi v1.0.0 →core/ai-model/vertex-ai v1.0.0 →core/ai-model/vertex-ai-embedding v1.0.0 →core/ai-model/vllm v1.0.0 → - $refestende o esquema (infra)
LiteLLMGuardSchemas#/schemas/RequestGuardInfra
Usado por
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «model»
usa o socket «target_model»
usa o socket «extraction_model»
usa o socket «embedding_model»
usa o socket «upstream»
usa o socket «forward_target»
usa o socket «scrape_target»
usa o socket «store»
aplica-se a
aplica-se a
aplica-se a
aplica-se a
aplica-se a
aplica-se a
aplica-se a
aplica-se a
aplica-se a
aplica-se a
aplica-se a
aplica-se a
aplica-se a
aplica-se a
aplica-se a
aplica-se a
aplica-se a
aplica-se a
aplica-se a
implementa
implementa
implementa