The Edge Gateway binary, its Helm values, and its container images use the older name
microgateway (for example ./microgateway, the microgateway.enabled Helm value, and the tykio/tyk-microgateway-ent image). These docs use “Edge Gateway” for the same component.Configuration
Tyk Edge Gateway (Edge Gateway) is configured primarily using environment variables.Configuration Precedence
The application loads configuration in the following order of precedence (highest to lowest):- Shell Environment Variables: Variables set in the OS/Shell (e.g.,
export PORT=9090) always override everything else. .envFile: Variables loaded from the file specified by the-envflag.- Note: Before the application loads a variable from the file, it checks the environment for that variable. This keeps the shell variables.
Command Line Flags
You can specify a.env file using the -env flag when starting the binary:
Supported Formats
- Main Configuration: Only the
.envformat (key=value pairs) is supported via the-envflag. - Plugin Configuration: Supports JSON and YAML files for plugin definitions, specified via the
PLUGINS_CONFIG_PATHenvironment variable.
Environment Variable Type Mapping
When configuring Tyk components using environment variables, it’s important to understand how different data types are represented. The type of each variable is based on its definition in the Go source code. This section provides a guide on how to format values for common data types.For complex types like
map[string]interface{}, the value should be a valid JSON string. For []string and map[string]string, ensure there are no spaces around the commas unless they are part of the value itself.Variables
PORT
ENV: PORTType:
integerDefault:
8080The port for the server to listen on.
HOST
ENV: HOSTType:
stringDefault:
0.0.0.0The host for the server to bind to.
TLS_ENABLED
ENV: TLS_ENABLEDType:
booleanDefault:
falseEnable TLS.
TLS_CERT_PATH
ENV: TLS_CERT_PATHType:
stringThe path to the TLS certificate file.
TLS_KEY_PATH
ENV: TLS_KEY_PATHType:
stringThe path to the TLS key file.
READ_TIMEOUT
ENV: READ_TIMEOUTType:
stringDefault:
300sThe read timeout for the server.
WRITE_TIMEOUT
ENV: WRITE_TIMEOUTType:
stringDefault:
300sThe write timeout for the server.
IDLE_TIMEOUT
ENV: IDLE_TIMEOUTType:
stringDefault:
120sThe idle timeout for the server.
SHUTDOWN_TIMEOUT
ENV: SHUTDOWN_TIMEOUTType:
stringDefault:
30sThe shutdown timeout for the server.
DATABASE_TYPE
ENV: DATABASE_TYPEType:
stringDefault:
sqliteThe type of database to use (
sqlite or postgres).
DATABASE_DSN
ENV: DATABASE_DSNType:
stringDefault:
file:./data/microgateway.db?mode=rwcThe database connection string. For a SQLite file, from v2.3.0, the Edge Gateway adds
_journal_mode=WAL, _busy_timeout=5000, _synchronous=NORMAL, and _txlock=immediate when the string does not set them, and removes cache=shared. On a network file system, set _journal_mode=DELETE.
DB_MAX_OPEN_CONNS
ENV: DB_MAX_OPEN_CONNSType:
integerDefault:
25The maximum number of open database connections.
DB_MAX_IDLE_CONNS
ENV: DB_MAX_IDLE_CONNSType:
integerDefault:
25The maximum number of idle database connections.
DB_CONN_MAX_LIFETIME
ENV: DB_CONN_MAX_LIFETIMEType:
stringDefault:
5mThe maximum lifetime of a database connection.
DB_AUTO_MIGRATE
ENV: DB_AUTO_MIGRATEType:
booleanDefault:
trueEnable automatic database migrations.
DB_LOG_LEVEL
ENV: DB_LOG_LEVELType:
stringDefault:
warnThe log level for the database.
CACHE_ENABLED
ENV: CACHE_ENABLEDType:
booleanDefault:
trueEnable caching.
CACHE_MAX_SIZE
ENV: CACHE_MAX_SIZEType:
integerDefault:
1000The maximum size of the cache.
CACHE_TTL
ENV: CACHE_TTLType:
stringDefault:
1hThe time-to-live for cache entries.
CACHE_CLEANUP_INTERVAL
ENV: CACHE_CLEANUP_INTERVALType:
stringDefault:
10mThe cleanup interval for the cache.
CACHE_PERSIST_TO_DB
ENV: CACHE_PERSIST_TO_DBType:
booleanDefault:
falsePersist the cache to the database.
GATEWAY_TIMEOUT
ENV: GATEWAY_TIMEOUTType:
stringDefault:
30sThe timeout for the gateway.
GATEWAY_MAX_REQUEST_SIZE
ENV: GATEWAY_MAX_REQUEST_SIZEType:
integerDefault:
10485760The maximum request size for the gateway.
GATEWAY_MAX_RESPONSE_SIZE
ENV: GATEWAY_MAX_RESPONSE_SIZEType:
integerDefault:
52428800The maximum response size for the gateway.
GATEWAY_ENABLE_FILTERS
ENV: GATEWAY_ENABLE_FILTERSType:
booleanDefault:
trueEnable filters in the gateway.
GATEWAY_ENABLE_ANALYTICS
ENV: GATEWAY_ENABLE_ANALYTICSType:
booleanDefault:
trueEnable analytics in the gateway.
ANALYTICS_ENABLED
ENV: ANALYTICS_ENABLEDType:
booleanDefault:
trueEnable analytics.
ANALYTICS_BUFFER_SIZE
ENV: ANALYTICS_BUFFER_SIZEType:
integerDefault:
1000The buffer size for analytics.
ANALYTICS_FLUSH_INTERVAL
ENV: ANALYTICS_FLUSH_INTERVALType:
stringDefault:
10sThe flush interval for analytics.
ANALYTICS_RETENTION_DAYS
ENV: ANALYTICS_RETENTION_DAYSType:
integerDefault:
7 when the analytics pulse is on, otherwise 90The retention period for analytics in days. The Edge Gateway deletes older analytics rows in small batches.
ANALYTICS_REALTIME
ENV: ANALYTICS_REALTIMEType:
booleanDefault:
falseEnable real-time analytics.
ANALYTICS_STORE_REQUESTS
ENV: ANALYTICS_STORE_REQUESTSType:
booleanDefault:
falseStores the request body of each proxied LLM request in the analytics of the Edge Gateway. The Edge Gateway truncates a body to
ANALYTICS_MAX_BODY_SIZE bytes (default 4096). When this setting is off, the analytics pulse sends no request bodies to AI Studio.
ANALYTICS_STORE_RESPONSES
ENV: ANALYTICS_STORE_RESPONSESType:
booleanDefault:
falseStores the response body of each proxied LLM request in the analytics of the Edge Gateway. The Edge Gateway truncates a body to
ANALYTICS_MAX_BODY_SIZE bytes (default 4096). When this setting is off, the analytics pulse sends no response bodies to AI Studio.
JWT_SECRET
ENV: JWT_SECRETType:
stringDefault:
change-me-in-productionThe secret key for JWTs.
ENCRYPTION_KEY
ENV: ENCRYPTION_KEYType:
stringDefault:
change-me-in-productionThe encryption key. Change the default value in production. From v2.3.0, a standalone Edge Gateway uses this key to hash its stored API tokens. An Edge Gateway in edge mode uses it to encrypt its stored configuration snapshot. If you change the key, all API tokens stop working, and the Edge Gateway cannot read the stored snapshot.
BCRYPT_COST
ENV: BCRYPT_COSTType:
integerDefault:
10The cost factor for bcrypt.
TOKEN_LENGTH
ENV: TOKEN_LENGTHType:
integerDefault:
32The length of generated tokens.
SESSION_TIMEOUT
ENV: SESSION_TIMEOUTType:
stringDefault:
24hThe timeout for sessions.
ENABLE_IP_WHITELIST
ENV: ENABLE_IP_WHITELISTType:
booleanDefault:
falseEnable IP whitelisting.
LOG_LEVEL
ENV: LOG_LEVELType:
stringDefault:
infoThe log level.
LOG_FORMAT
ENV: LOG_FORMATType:
stringDefault:
textThe log format (
json or text).
ENABLE_METRICS
ENV: ENABLE_METRICSType:
booleanDefault:
trueEnable metrics. The Edge Gateway serves
/metrics only when you also set METRICS_AUTH_TOKEN or METRICS_ALLOW_UNAUTHENTICATED.
METRICS_PATH
ENV: METRICS_PATHType:
stringDefault:
/metricsThe path for metrics.
ENABLE_TRACING
ENV: ENABLE_TRACINGType:
booleanDefault:
falseEnable tracing.
TRACING_ENDPOINT
ENV: TRACING_ENDPOINTType:
stringThe endpoint for tracing.
ENABLE_PROFILING
ENV: ENABLE_PROFILINGType:
booleanDefault:
falseEnable profiling.
GATEWAY_MODE
ENV: GATEWAY_MODEType:
stringDefault:
standaloneThe gateway mode (
standalone or edge). The value control is deprecated: register Edge Gateways with AI Studio. In Enterprise builds, a gateway in control mode serves only the default namespace.
CONTROL_ENDPOINT
ENV: CONTROL_ENDPOINTType:
stringThe gRPC endpoint of the control plane. To give the Edge Gateway more than one control plane, use
CONTROL_ENDPOINTS. Do not set both variables.
EDGE_ID
ENV: EDGE_IDType:
stringA unique ID for the edge gateway.
EDGE_NAMESPACE
ENV: EDGE_NAMESPACEType:
stringThe namespace for the edge gateway.
EDGE_RECONNECT_INTERVAL
ENV: EDGE_RECONNECT_INTERVALType:
stringDefault:
5sThe interval to wait before reconnecting to the control plane.
EDGE_HEARTBEAT_INTERVAL
ENV: EDGE_HEARTBEAT_INTERVALType:
stringDefault:
30sThe interval for sending heartbeats to the control plane.
EDGE_SYNC_TIMEOUT
ENV: EDGE_SYNC_TIMEOUTType:
stringDefault:
10sThe timeout for syncing configuration from the control plane.
EDGE_AUTH_TOKEN
ENV: EDGE_AUTH_TOKENType:
stringThe authentication token for connecting to the control plane.
EDGE_TLS_ENABLED
ENV: EDGE_TLS_ENABLEDType:
booleanDefault:
trueEnable TLS for the connection to the control plane.
EDGE_TLS_CERT_PATH
ENV: EDGE_TLS_CERT_PATHType:
stringThe path to the client TLS certificate file.
EDGE_TLS_KEY_PATH
ENV: EDGE_TLS_KEY_PATHType:
stringThe path to the client TLS key file.
EDGE_TLS_CA_PATH
ENV: EDGE_TLS_CA_PATHType:
stringThe path to the CA certificate file for verifying the control plane’s certificate. The Edge Gateway loads this file and uses it instead of the system root certificates.
EDGE_SKIP_TLS_VERIFY
ENV: EDGE_SKIP_TLS_VERIFYType:
booleanDefault:
falseSkip TLS certificate verification.
EDGE_ALLOW_INSECURE
ENV: EDGE_ALLOW_INSECUREType:
booleanDefault:
falseAllow insecure connections to the control plane.
GATEWAY_UNIFIED_ROUTER_PATH
ENV: GATEWAY_UNIFIED_ROUTER_PATHType:
stringDefault:
/v1The base path of the Main Ingress on the Edge Gateway. Set it to the same value as
UNIFIED_ROUTER_PATH on AI Studio.
GATEWAY_UNIFIED_ROUTER_DISABLED
ENV: GATEWAY_UNIFIED_ROUTER_DISABLEDType:
booleanDefault:
falseTurns off the Main Ingress on the Edge Gateway.
GATEWAY_SERVER_TIMING
ENV: GATEWAY_SERVER_TIMINGType:
booleanDefault:
falseAdds a
Server-Timing header to LLM responses. The header splits the latency into gateway time and upstream time.
METRICS_AUTH_TOKEN
ENV: METRICS_AUTH_TOKENType:
stringThe bearer token that a scraper must send to read
/metrics. If you do not set this variable or METRICS_ALLOW_UNAUTHENTICATED, the Edge Gateway does not serve /metrics.
METRICS_ALLOW_UNAUTHENTICATED
ENV: METRICS_ALLOW_UNAUTHENTICATEDType:
booleanDefault:
falseServes
/metrics without a token, for example for scrapes inside a cluster. Use it only where a firewall or network policy limits access to the endpoint.
OCI_PLUGINS_MAX_PLUGIN_SIZE
ENV: OCI_PLUGINS_MAX_PLUGIN_SIZEType:
stringDefault:
512MBThe maximum size of one plugin layer that the Edge Gateway downloads from an OCI registry.
EDGE_TOKEN_CACHE_TTL
ENV: EDGE_TOKEN_CACHE_TTLType:
durationDefault:
5mHow long the Edge Gateway keeps the result of an App key validation from AI Studio. From v2.3.0, AI Studio tells connected Edge Gateways about each change to an App key, and they drop the cached result. An Edge Gateway that is not connected uses the cached result until it expires.
EDGE_TOKEN_CACHE_STALE_GRACE
ENV: EDGE_TOKEN_CACHE_STALE_GRACEType:
durationDefault:
0Lets the Edge Gateway use a token validation that just expired while AI Studio is not reachable.
0 refuses the token (fails closed).
EDGE_TLS_SERVER_NAME
ENV: EDGE_TLS_SERVER_NAMEType:
stringThe server name to verify on the AI Studio certificate.
ANALYTICS_WRITER_QUEUE_SIZE
ENV: ANALYTICS_WRITER_QUEUE_SIZEType:
integerDefault:
50000The size of the analytics writer queue.
ANALYTICS_WRITER_BATCH_SIZE
ENV: ANALYTICS_WRITER_BATCH_SIZEType:
integerDefault:
500The number of analytics records in each write batch.
ANALYTICS_WRITER_FLUSH_INTERVAL
ENV: ANALYTICS_WRITER_FLUSH_INTERVALType:
durationDefault:
100msHow often the analytics writer flushes a batch.
OVERLOAD_SHEDDING_ENABLED
ENV: OVERLOAD_SHEDDING_ENABLEDType:
booleanDefault:
trueRejects new requests with
503 when memory use is near the limit, instead of running out of memory.
OVERLOAD_MEMORY_LIMIT
ENV: OVERLOAD_MEMORY_LIMITType:
stringThe memory limit for load shedding. When not set, the Edge Gateway uses
GOMEMLIMIT or the container memory limit.
OVERLOAD_MEMORY_THRESHOLD
ENV: OVERLOAD_MEMORY_THRESHOLDType:
floatDefault:
0.85The fraction of the memory limit at which load shedding starts.
MAX_INFLIGHT_REQUESTS
ENV: MAX_INFLIGHT_REQUESTSType:
integerDefault:
0The maximum number of concurrent proxy requests.
0 turns off the limit.
PROFILING_ADDR
ENV: PROFILING_ADDRType:
stringDefault:
127.0.0.1:6060The address where the Edge Gateway serves pprof when
ENABLE_PROFILING is true.
GOGC
ENV: GOGCType:
integerThe Go garbage collector setting. When not set, the Edge Gateway uses an adaptive value that starts at
400.
GOMEMLIMIT
ENV: GOMEMLIMITType:
stringThe Go soft memory limit. When not set, the Edge Gateway sets it to 90% of the container memory limit.
CONTROL_ENDPOINTS
ENV: CONTROL_ENDPOINTSType:
stringAn ordered, comma-separated list of control planes (
host:port). Put the control plane of the Edge Gateway’s own region first. When the connection fails, the Edge Gateway tries the other endpoints in list order. All endpoints must be replicas of one AI Studio deployment. Do not set both CONTROL_ENDPOINTS and CONTROL_ENDPOINT: the Edge Gateway does not start. For more information, see Active-active deployment. Available from v2.3.0.
EDGE_CONTROL_FAILBACK_INTERVAL
ENV: EDGE_CONTROL_FAILBACK_INTERVALType:
durationDefault:
0When the Edge Gateway is not connected to the first endpoint of
CONTROL_ENDPOINTS, it tries that endpoint at this interval, for example 5m. 0 turns this off: the Edge Gateway stays on its current control plane until the connection ends. Available from v2.3.0.
EDGE_START_FROM_LAST_KNOWN_GOOD
ENV: EDGE_START_FROM_LAST_KNOWN_GOODType:
booleanDefault:
falseWhen no control plane answers at startup, the Edge Gateway starts from the configuration snapshot that it applied last. The snapshot is in the database of the Edge Gateway, encrypted with
ENCRYPTION_KEY. The Edge Gateway can then serve LLMs, Apps, and filters that an administrator removed after the snapshot, until it connects again. Available from v2.3.0.
EDGE_STARTUP_CONTROL_TIMEOUT
ENV: EDGE_STARTUP_CONTROL_TIMEOUTType:
durationDefault:
30sHow long the Edge Gateway tries its control endpoints at startup before it uses the stored snapshot. Applies when
EDGE_START_FROM_LAST_KNOWN_GOOD is true. Available from v2.3.0.
EDGE_LAST_KNOWN_GOOD_MAX_AGE
ENV: EDGE_LAST_KNOWN_GOOD_MAX_AGEType:
durationDefault:
72hThe maximum time since the last contact with a control plane for a start from the stored snapshot. When this time is longer, the Edge Gateway does not start.
0 sets no limit. Available from v2.3.0.
EDGE_CREDENTIAL_SYNC
ENV: EDGE_CREDENTIAL_SYNCType:
stringDefault:
on_demandHow the Edge Gateway validates App keys:
on_demand: the Edge Gateway asks the control plane about a key that it has not seen, and caches the answer.full: the Edge Gateway keeps keyed hashes of the App keys of its namespace in its database. It validates keys from that list, also when no control plane is available. It asks the control plane about a key that is not on the list.fullneeds Enterprise Edition on the Edge Gateway and on AI Studio v2.3.0 or later. A Community Edition Edge Gateway logs a warning and useson_demand.
EDGE_CREDENTIAL_SYNC_MAX_AGE
ENV: EDGE_CREDENTIAL_SYNC_MAX_AGEType:
durationDefault:
24hHow long the Edge Gateway trusts the synced key list after the last successful sync. After this time, it validates keys on demand until a sync succeeds.
0 sets no limit. Enterprise Edition only. Available from v2.3.0.
CONTROL_PAYLOAD_RETENTION_HOURS
ENV: CONTROL_PAYLOAD_RETENTION_HOURSType:
integerDefault:
24How long, in hours, the Edge Gateway keeps the payloads that plugins send to AI Studio. The Edge Gateway deletes older payloads, sent or not. It also stops trying to send a payload after this time.
GATEWAY_PUBLIC_URL
ENV: GATEWAY_PUBLIC_URLType:
stringThe absolute base URL at which clients reach the Edge Gateway. Native API operations use it in the URLs they return, for example the
results_url of an Anthropic batch. When not set, these URLs are relative paths. Available from v2.3.0.
PLUGINS_ALLOWED_SOURCES
ENV: PLUGINS_ALLOWED_SOURCESType:
stringA comma-separated list of the plugin deployment types that the Edge Gateway accepts:
oci, file, and grpc. When not set, the Edge Gateway accepts all types. The Edge Gateway applies this list to the plugins that AI Studio sends. It does not load a plugin of a type that is not in the list. An unknown type stops startup. For more information, see Plugin security. Available from v2.3.0.
OCI_PLUGINS_ALLOWED_REGISTRIES
ENV: OCI_PLUGINS_ALLOWED_REGISTRIESType:
stringA comma-separated list of OCI registry hosts. When set, the Edge Gateway refuses an
oci:// plugin from any other registry. When not set, the Edge Gateway accepts all registries.
PLUGIN_COMMAND_ALLOWLIST
ENV: PLUGIN_COMMAND_ALLOWLISTType:
stringA comma-separated list of substrings for plugin commands. The list is advisory. The Edge Gateway logs a warning for a plugin command that does not contain one of the substrings, but it accepts the command. Entries are plain substrings, not wildcards.
PLUGIN_BLOCK_INTERNAL_URLS
ENV: PLUGIN_BLOCK_INTERNAL_URLSType:
booleanDefault:
falseDeprecated. When
true, the Edge Gateway refuses a plugin command that contains an internal address anywhere, for example in a host:port argument. When false, the Edge Gateway logs a warning for such a command. From v2.3.0, the Edge Gateway refuses internal plugin hosts without this setting. Refer to Internal Registries and Hosts.
OCI_PLUGINS_REQUIRE_SIGNATURE
ENV: OCI_PLUGINS_REQUIRE_SIGNATUREType:
booleanDefault:
trueRequires a valid signature on OCI plugins. The Edge Gateway does not load an unsigned plugin, or a plugin that has a signature from a key that you did not configure. An invalid value stops startup. Enterprise Edition only.
OCI_PLUGINS_PUBKEY_*
ENV: OCI_PLUGINS_PUBKEY_*Type:
stringPublic keys for OCI plugin signatures.
OCI_PLUGINS_PUBKEY_<N> and OCI_PLUGINS_PUBKEY_<NAME> hold a PEM key. OCI_PLUGINS_PUBKEY_FILE_<NAME> holds the path to a PEM file. When a plugin command does not name a key with ?pubkey=, the Edge Gateway accepts the plugin if one of the configured keys verifies it. Configure the same keys on AI Studio and on each Edge Gateway. Enterprise Edition only.
OCI_PLUGINS_TLOG_POLICY
ENV: OCI_PLUGINS_TLOG_POLICYType:
stringDefault:
requiredSets whether an OCI plugin signature needs a transparency log (Rekor) entry.
required needs an entry. optional checks an entry when the signature has one. disabled checks the signature against the key only. An invalid value stops startup. Enterprise Edition only. Available from v2.3.0.
OCI_PLUGINS_TRUSTED_ROOT_FILE
ENV: OCI_PLUGINS_TRUSTED_ROOT_FILEType:
stringThe path to a Sigstore
trusted_root.json file for a private Sigstore deployment. When not set, the Edge Gateway uses its built-in Sigstore trusted root. Enterprise Edition only. Available from v2.3.0.
LLM_UPSTREAM_BLOCK_INTERNAL
ENV: LLM_UPSTREAM_BLOCK_INTERNALType:
booleanDefault:
trueRefuses outbound connections to internal and reserved IP addresses, by IP address or by a hostname that resolves to one. For the addresses and the covered connections, refer to Outbound Network Policy. Set the same value on AI Studio and on each Edge Gateway. A value that is not a boolean stops startup. From v2.3.0, the default is
true.
LLM_UPSTREAM_ALLOWED_HOSTS
ENV: LLM_UPSTREAM_ALLOWED_HOSTSType:
stringA comma-separated allow list of upstream hostnames. An entry that starts with
. matches the domain and all its subdomains. When not set, the Edge Gateway allows all hosts.
LLM_UPSTREAM_ALLOWED_INTERNAL_HOSTS
ENV: LLM_UPSTREAM_ALLOWED_INTERNAL_HOSTSType:
stringA comma-separated list of internal hostnames that the Edge Gateway allows when
LLM_UPSTREAM_BLOCK_INTERNAL is true. For example, .svc.cluster.local allows all Kubernetes Services. Name internal plugin registries here too.
AI_STUDIO_VERTEX_ADC
ENV: AI_STUDIO_VERTEX_ADCType:
booleanDefault:
falseLets a Gemini Platform (Vertex) LLM with an empty API key use the Google credentials of this edge (Application Default Credentials). Each edge then needs its own GCP identity with access to Vertex AI. A Workload Identity Federation credential (
external_account) also needs this setting. The name and the behavior are the same as on AI Studio. Refer to AI_STUDIO_VERTEX_ADC. Available from v2.3.0.
ALLOW_INTERNAL_NETWORK_ACCESS
ENV: ALLOW_INTERNAL_NETWORK_ACCESSType:
booleanDefault:
falseTurns off all internal address checks. Use it for development only. The Edge Gateway logs a warning at startup. Plugins do not get this variable unless you add it to
PLUGIN_ENV_PASSTHROUGH.
TYK_AI_LICENSE
ENV: TYK_AI_LICENSEType:
stringThe license key of an Enterprise Edge Gateway. An Enterprise Edge Gateway with a missing, expired, or invalid license stops before it opens its database. From v2.3.0, the Edge Gateway does not start with a license issued for v2.2 or earlier. A
-migrate run also needs the license.
PLUGIN_ENV_PASSTHROUGH
ENV: PLUGIN_ENV_PASSTHROUGHType:
stringA comma-separated list of host environment variables to pass to plugins. Plugins get only a built-in list of process, locale, TLS, proxy, and Go runtime variables, plus the variables in this list. An entry that ends in
* matches a prefix. An entry that starts with * matches a suffix. Available from v2.3.0.
PLUGIN_GRPC_MAX_MSG_BYTES
ENV: PLUGIN_GRPC_MAX_MSG_BYTESType:
integerDefault:
67108864The largest message in bytes between the Edge Gateway and its plugins (64 MiB). A plugin that you build with an SDK earlier than v2.3.0 keeps a limit of 4 MiB. Available from v2.3.0.
DB_LOG_SQL_PARAMS
ENV: DB_LOG_SQL_PARAMSType:
booleanDefault:
falseAdds the values of SQL parameters to SQL log lines. The values can contain credentials, so use this setting for local debugging only. Available from v2.3.0.
NATIVE_API_*
ENV: NATIVE_API_*Type:
integer or durationThe limits and timings of native API operations, such as Anthropic Message Batches:
NATIVE_API_MAX_BODY_BYTES, NATIVE_API_MAX_CONCURRENT_CREATES, NATIVE_API_MAX_FILTERED_ITEMS, NATIVE_API_MAX_GUARDRAIL_CALLS, NATIVE_API_MAX_IN_PROGRESS_PER_APP, NATIVE_API_RECONCILE_INTERVAL, NATIVE_API_RECONCILE_BATCH, NATIVE_API_RECONCILE_WORKERS, NATIVE_API_POLL_INTERVAL, and NATIVE_API_POLL_MAX_BACKOFF. The names, defaults, and meanings are the same as on AI Studio. For more information, see the AI Studio environment variables. Available from v2.3.0.
FILTER_*
ENV: FILTER_*Type:
duration, integer, or booleanThe filter script limits:
FILTER_SCRIPT_TIMEOUT, FILTER_SCRIPT_MAX_ALLOCS, FILTER_SCRIPT_ALLOW_OS, FILTER_HTTP_TIMEOUT, FILTER_HTTP_MAX_RESPONSE_BYTES, and FILTER_LLM_TIMEOUT. The Edge Gateway reads them from its own environment. The names, defaults, and meanings are the same as on AI Studio. For more information, see the AI Studio environment variables. Enterprise Edition only.
GUARDRAIL_*
ENV: GUARDRAIL_*Type:
integer, duration, or stringThe guardrail cache, scan, and shadow settings. The names, defaults, and meanings are the same as on AI Studio. For more information, see the AI Studio environment variables. Enterprise Edition only. Available from v2.3.0.
GODEBUG
ENV: GODEBUGType:
stringGo runtime settings. A FIPS build of the Edge Gateway starts in FIPS 140-3 mode.
GODEBUG=fips140=off turns off FIPS mode. GODEBUG=fips140=only refuses all algorithms that FIPS does not approve, for tests. Refer to FIPS 140-3 Compliance. Available from v2.3.0.
AGENT_TRACING_ENABLED
ENV: AGENT_TRACING_ENABLEDType:
booleanDefault:
falseTurns on capture for Agent Call Tracing on the Edge Gateway. The Edge Gateway sends the captured events to AI Studio. AI Studio sets all other tracing settings. Refer to Agent Call Tracing. Enterprise Edition only. Available from v2.3.0.
AGENT_TRACING_QUEUE_MAX_EVENTS
ENV: AGENT_TRACING_QUEUE_MAX_EVENTSType:
integerDefault:
10000The maximum number of events in the in-memory capture queue. Enterprise Edition only. Available from v2.3.0.
AGENT_TRACING_QUEUE_MAX_BYTES
ENV: AGENT_TRACING_QUEUE_MAX_BYTESType:
integerDefault:
67108864The maximum size in bytes of the in-memory capture queue (64 MiB). Enterprise Edition only. Available from v2.3.0.
AGENT_TRACING_MAX_STREAM_BUFFER_BYTES
ENV: AGENT_TRACING_MAX_STREAM_BUFFER_BYTESType:
integerDefault:
1048576The maximum size in bytes of the buffer for one streamed response that tracing captures (1 MiB). Enterprise Edition only. Available from v2.3.0.
AGENT_TRACING_FLUSH_INTERVAL
ENV: AGENT_TRACING_FLUSH_INTERVALType:
durationDefault:
10sHow often the Edge Gateway sends captured events to AI Studio. Enterprise Edition only. Available from v2.3.0.
AGENT_TRACING_FLUSH_MAX_EVENTS
ENV: AGENT_TRACING_FLUSH_MAX_EVENTSType:
integerDefault:
500The maximum number of events in one flush. Enterprise Edition only. Available from v2.3.0.
AGENT_TRACING_CHUNK_MAX_BYTES
ENV: AGENT_TRACING_CHUNK_MAX_BYTESType:
integerDefault:
4194304The maximum size in bytes of the captured events in one pulse (4 MiB). A value above 8 MiB uses the default. Enterprise Edition only. Available from v2.3.0.
AGENT_TRACING_KEEP_LIVE_SPAN
ENV: AGENT_TRACING_KEEP_LIVE_SPANType:
booleanDefault:
falseKeeps the OpenTelemetry span of the Edge Gateway for captured calls while AI Studio exports the assembled spans. Use it when the OpenTelemetry collector of the Edge Gateway is not the export target of AI Studio. With a shared collector, each call appears two times. Enterprise Edition only. Available from v2.3.0.
AGENT_TRACING_BAGGAGE_ALLOWLIST
ENV: AGENT_TRACING_BAGGAGE_ALLOWLISTType:
stringDefault:
session.idA comma-separated list of the W3C
baggage keys that the Edge Gateway forwards to LLM and tool upstreams. The Edge Gateway removes all other keys. none forwards no baggage. This setting applies in all editions, also when tracing is off. Available from v2.3.0.
AGENT_TRACING_COMPAT_HEADERS
ENV: AGENT_TRACING_COMPAT_HEADERSType:
stringDefault:
helicone,portkey,openrouter,bifrost,agent_router,cloudflare,agentcore,mcp_sessionA comma-separated list of the header families of other gateways that tracing reads as declared context.
none sets an empty list. Enterprise Edition only. Available from v2.3.0.
AGENT_TRACING_HARNESS_SESSION_HEADERS
ENV: AGENT_TRACING_HARNESS_SESSION_HEADERSType:
stringDefault:
claude_code,codex_cli,opencodeA comma-separated list of the coding tools whose session headers tracing reads. Other entries are header names that tracing reads as a session ID.
none sets an empty list. Enterprise Edition only. Available from v2.3.0.
AGENT_TRACING_PROPAGATE_LLM_PROVIDERS
ENV: AGENT_TRACING_PROPAGATE_LLM_PROVIDERSType:
booleanDefault:
trueSends trace context to LLM providers. Enterprise Edition only. Available from v2.3.0.
AGENT_TRACING_PROPAGATE_HTTP_UPSTREAMS
ENV: AGENT_TRACING_PROPAGATE_HTTP_UPSTREAMSType:
booleanDefault:
trueSends trace context to HTTP upstreams, such as tools. Enterprise Edition only. Available from v2.3.0.
AGENT_TRACING_PROPAGATE_MCP
ENV: AGENT_TRACING_PROPAGATE_MCPType:
booleanDefault:
trueSends trace context to MCP servers. Enterprise Edition only. Available from v2.3.0.
AGENT_TRACING_OPENAI_CLIENT_REQUEST_ID
ENV: AGENT_TRACING_OPENAI_CLIENT_REQUEST_IDType:
booleanDefault:
trueSends the span ID to OpenAI upstreams in the
X-Client-Request-Id header. Enterprise Edition only. Available from v2.3.0.