LLMGW container
This page lists the environment variables supported by the LLMGW container. Variables are grouped by area and include defaults and usage notes where applicable.
App
DEBUGWhether the app is in debug mode. Mainly affects logging and telemetry.- Default is
false.
- Default is
ENVIRONMENTDeployment environment.- Supported values:
dev,test,prd,local.
- Supported values:
SESSION_SECRET_KEYThe key used to protect FastAPI/Starlette session cookies. Should be at least 256 bits in production.ADMIN_API_KEYAdmin API key that can be used for access to the admin portal.ALLOWED_HOSTSA comma-separated list of hosts against which the incoming request’sHostheader will be checked.- Example:
["localhost", "my-test-domain.net"]
- Example:
ADMIN_PORTAL_BRAND_COLORBrand color (hex color code for primary brand color).ADMIN_PORTAL_BRAND_ICONBrand icon (base64-encoded PNG for favicon).ADMIN_PORTAL_BRAND_LOGOBrand logo (base64-encoded PNG for sidebar header).
Configuration sources
-
CONFIG_SOURCESA JSON list of configuration source definitions. Always in a format of*prefix*:*service-specific source identifier*. Allowed prefices aredir,s3andazureblob..
All sources must use the same backend, e.g.,s3:cannot be mixed withazureblob:. For Azure Blob Storage the format is<container>/<blob>; for AWS S3<bucket>/<file_path>; for local directory a filepath.Examples:
Entities
ALLOW_ANONYMOUS_ENTITIESAllow requests without a defined entity (user/project).- Default:
true(helpful when spend limits are not enforced).
- Default:
Secrets and secret stores
-
SECRET_STORESecret provider backend used to resolve the secrets.- Supported values:
env,azure_kv,aws_secrets_manager.
- Supported values:
-
APPLICATION_KEY_VAULT_URLAzure Key Vault URL used whenSECRET_STORE=azure_kv.- Example:
https://llmgw-kv.vault.azure.net/
- Example:
-
ENV_SERVICE_CACHE_EXPIRATION_SECONDSCache expiration time (seconds) for local secrets.- Default:
600
- Default:
Storage backends
-
STORAGEStorage backend used to store/load the YAML config.- Supported values:
dir,azure_blob,aws_s3.
- Supported values:
-
AZURE_BLOB_STORAGE_ACCOUNT_URLAzure Blob Storage account URL (required whenSTORAGE=azure_blob).
Database
DB_CONNECTION_STRINGThe Postgres connection string in libpq (key=value) or URL style.
OTEL
-
OTEL_SDK_DISABLEDDisable OpenTelemetry configuration.- Default:
false(OTEL enabled)
- Default:
-
OTEL_TRACES_EXPORTEROTEL Traces exporter.- Supported values:
otlp,console, ornone. - Default:
otlp.
- Supported values:
-
OTEL_METRICS_EXPORTEROTEL Metrics exporter.- Supported values:
otlp,console, ornone. - Default:
otlp.
- Supported values:
-
OTEL_LOGS_EXPORTEROTEL Logs exporter.- Supported values:
otlpornone. - Default:
otlp.
- Supported values:
-
OTEL_EXPORTER_ENDPOINTOTLP exporter endpoint. Required if any ofOTEL_*_EXPORTERisotlp.- Example:
http://<SERVICE_HOST>:4318 - Azure Container Apps:
<SERVICE_HOST>is the ACA service name (e.g.,bss-llm-gateway-dev-otel).
- Example:
-
OTEL_PERIODIC_EXPORT_INTERVAL_MILLISOTEL periodic export interval (ms).- Default:
60000
- Default:
-
DEBUG_METRICSWhen main exporter isotlp, enable additional console exporters / debug messages.- Boolean flag:
1,true,True.
- Boolean flag:
Admin portal and SSO
-
ADMIN_AUTH_ENABLEDEnable admin authentication/SSO. Warning: disabling this protection and removes SSO auth endpoints. -
ADMIN_SSO_CLIENT_IDOAuth client ID (e.g., Entra ID App ID). -
ADMIN_SSO_REDIRECT_CALLBACKURL the SSO flow redirects to after browser login. -
ADMIN_SSO_REDIRECT_SUCCESSURL the backend redirects to after successful SSO completion. -
ADMIN_SSO_AUTH_METHODOAuth client auth method:client_secret_basic(client secret) orprivate_key_jwt(client certificate). -
ADMIN_SSO_AUTH_CREDENTIALOAuth credential. Must be either an Entra ID client secret or a base64-encoded private key (forprivate_key_jwt). See How to generate Azure credentials -
ADMIN_SSO_PUBLIC_CERTBase64-encoded public certificate. Required whenADMIN_SSO_AUTH_METHOD=private_key_jwt. -
AZURE_SERVER_METADATA_URLAzure tenant OpenID Connect metadata URL. Example:https://login.microsoftonline.com/{tenant_id}/v2.0/.well-known/openid-configuration
Azure
These are only relevant when deploying on Azure.
-
AZURE_CLIENT_IDClient ID of the user-assigned managed identity used by the container. -
APPLICATIONINSIGHTS_CONNECTION_STRINGConnection string for Azure Application Insights.
Logging
-
LOG_FILEOptional path to a log file. If empty or not set, logs go to stdout only. -
STD_JSON_LOGOutput logs as JSON to stdout.- Default:
false.
- Default:
-
FILE_JSON_LOGOutput logs as JSON toLOG_FILE(requiresLOG_FILEto be set).- Default:
false.
- Default:
-
LOG_RESOURCE_USAGEPeriodically log CPU and memory usage.- Default:
false.
- Default:
-
LOG_USER_DATALog user request/response payloads. Caution: useful for debugging, but not recommended in production due to potential sensitive data exposure.- Default:
false.
- Default:
Generate private key and public certificate for SSO cert-based flow
This can be done in multiple ways. A bash instruction is shown below.
Requires openssl and base64 utils.
- Generate a private key:
- Generate a public certificate using that key:
- Turn both to b64:
- Upload the public cert file to EntraID
- Make b64 secret available via
ADMIN_SSO_AUTH_CREDENTIALvar. - Make b64 certificate available via
ADMIN_SSO_PUBLIC_CERTvar.