Cloud and BYOC for Orca Agent Engine are in Private Preview — request an invite
Docs

Configuration reference

Every section and field of the configuration document for Orca AI Gateway, with defaults and the values the shipped binary supports.

The complete field reference. For how the pieces fit together, start at Configure the gateway.

Top-level parsing uses deny_unknown_fields, so an unrecognized key is a boot failure rather than a silently ignored setting.

server

FieldTypeDefaultNotes
listenstring0.0.0.0:8080Data plane bind address.
admin_listenstring127.0.0.1:9099Admin API, metrics, and health probes.
max_concurrent_requestsinteger4096Parsed but not enforced by the current CLI server. Enforce concurrency at an ingress or proxy.
request_timeout_msinteger120000Parsed but not applied as an end-to-end deadline. Use per-route strategy.timeout_ms.
tls.cert, tls.keypathunsetParsed and live-validated, but the current CLI still binds a plain TCP listener. Terminate TLS at an ingress or proxy in front of the gateway.

identity

FieldTypeDefaultNotes
scope_dimslist of string[]Tenancy dimensions. Every dimension used elsewhere must be declared here.
validators[].namestring-Unique per gateway.
validators[].kindstring-jwt or api_key.
validators[].issuers, validators[].audienceslist[]Standard JWT validation for jwt.
validators[].jwks_urlstringunsetFetch signing keys from JWKS.
validators[].static_public_key_pempathunsetVerify against a PEM key on disk.
validators[].insecure_allow_any_issuerbooleanfalsePermit an empty JWT issuer list. Emits a startup warning.
validators[].insecure_allow_any_audiencebooleanfalsePermit an empty JWT audience list. Emits a startup warning.
validators[].scope_from.jwt_claimsmap{}claim to scope_dim.
validators[].scope_from.header_mapmap{}Accepted by the config model but not wired into validators. Raw X-Orca-Scope-* headers are handled separately by the request context.
validators[].keys_filepath-Required for api_key. Contains SHA-256 key digests and principals.

api_key accepts only Authorization: Bearer <key> and rejects a configured custom header. See Identity for its key-file schema.

destinations

Keyed by destination name.

FieldTypeNotes
kindstringmcp, openai, anthropic, azure_openai, openai_compatible, bedrock, vertex, native_api_key.
base_urlstringRequired for azure_openai and static mcp; aliased as url for mcp. Other model adapters have defaults.
regionstringOptional AWS region for bedrock; defaults to us-east-1.
credentials.vaultstringRequired for every kind.
credentials.credential_idstringOptional logical credential selected through the named vault; defaults to vault name.
model_mapmapClient model id to provider-native id.
pricing.input_per_1m, pricing.output_per_1mnumberUSD per million tokens.
pricing.cache_read_per_1m, cache_write_per_1m, cache_write_1h_per_1mnumberOptional cache-token rates.
pricing.reasoning_output_per_1mnumberOptional reasoning-output rate.
pricing.per_request_usdnumberOptional fixed cost per request.
destination_resolverobjectDynamic destination lookup for the wildcard mcp destination. Only kind: http is supported.

Adapter-specific fields are passed to the adapter. azure_openai also needs base_url; vertex needs project and location; Azure deployment and api_version are optional. See Model providers.

native_api_key instead requires provider, api, base_url, a nonempty allowed_paths list, auth, and credentials.vault. Optional forward_headers, headers, and allowed_query_params have explicit allowlists. It rejects model mapping and pricing fields; see Native API-key destinations.

routes

FieldTypeDefaultNotes
namestring-Appears in metrics and spans.
match.pathstringanyExact request path.
match.modelglobanyExact, *, prefix, suffix, or contains match against model id.
match.headermap{}All entries must match.
match.scopemap{}Each pair must match the principal's scope.
match.scope_kindenumequalsAccepted but not read by the route matcher; scope matching remains exact.
idempotency_safebooleantrueWhen false, no retry and no fallback.
strategy.modeenum-fallback, loadbalance, conditional.
strategy.targets[].destinationstring-Must reference a declared destination.
strategy.targets[].weightinteger-loadbalance requires all weights summing to 100, or no weights for equal split; 0 excludes a target.
strategy.targets[].default_params, override_params, drop_params--Applied in that order.
strategy.conditions[]list-Used by conditional; each has if and target.
strategy.retry.triggerslistunsethttp_5xx / 5xx, http_429 / 429, or timeout_ms / timeout. Unset means one attempt per target.
strategy.retry.max_attempts, backoff_msinteger-Per-target retry budget.
strategy.timeout_msintegerunsetPer-attempt deadline. Set it explicitly because the server-wide timeout is not enforced.

plugins

Every plugin instance shares these fields:

FieldTypeDefaultNotes
namestring-Unique within its trait.
kindstring-See the supported kinds below.
requiredbooleantrueCarried in config. Initialization errors currently fail state construction regardless of this value.
failure_modeenumdenydeny, allow, or log_only.

Supported kinds

SlotKinds the binary wires up
rate_limitertoken_bucket_local (alias token_bucket), redis_window
cacheredis_exact; vector_semantic behind the cache-semantic feature
cost_modelseed, static_table, http_refresh, registry, layered
guardrails[]pii_regex, llm_evaluator, ext_proc
authorizers[]yaml_acl, opa_http, ext_proc, allow_all
usage_sinks[]stdout, kafka, postgres, registry
audit_sinks[]noop, stdout, file, kafka, ext_proc
trace_exporters[]otlp, signed_tape
signers[]ed25519_local

Kinds documented elsewhere but not implemented include token_bucket_redis, openai_moderation, payload_log, and the parquet_s3 / otlp usage sinks. The cedar authorizer is feature-gated and returns an error on every call even when enabled. postgres requires the usage-postgres feature, which the CLI binary enables by default. An unsupported kind fails at boot with an error listing what is available.

Cache backends can be constructed, but the request pipeline's cache lookup and store stages remain placeholders. Configuring redis_exact or vector_semantic does not currently cache responses.

registry usage sends model-usage deltas to an Agent Engine registry. It intentionally skips MCP events because the registry does not expose an MCP usage-ingestion contract. Any usage sink can add a spool object with directory, max_events (default 10000), and retry_interval_ms (default 1000) for bounded local retry. Kafka audit and usage sinks also accept serialization.format: avro with a schema_registry block; JSON is the default.

rate_limits

FieldTypeNotes
match.scopemapBoth limiter kinds match scope only. Most matching scope dimensions win; ties use config order.
qpmintegerRequests per minute.
tpmintegerTokens per minute, input plus output.
qphintegerRequests per hour.
tphintegerTokens per hour.
budget_usd_per_daynumberDeprecated daily spend cap. Use a user_daily_cost_budget policy guardrail for new configurations.
budget_usd_per_monthnumberCalendar-month spend cap. Requires destination pricing or plugins.cost_model.

spend

FieldTypeDefaultNotes
key_dimslist of string[]Verified scope dimensions in a limiter bucket. Empty uses every verified scope.<dim> attribute.
trusted_header_dimslist of string[]Explicitly permits a header-derived scope value only when no verified value exists.
request_tag_allowlistlist of string[]Client attribution-tag keys allowed into usage records.
budget_timezoneIANA timezoneUTCCalendar timezone for daily and monthly budget windows.
headers.enabledbooleanfalseEmit rate-limit and budget headroom response headers.
admission.default_max_output_tokensinteger4096Output-token estimate when request omits a maximum.
admission.unpriced_modelenumdenydeny, estimate, or allow_untracked.
admission.estimate_usd_per_requestnumberunsetRequired when unpriced_model: estimate.

See Rate limits for bucket matching and verified-identity behavior.

guardrail_source

Optional source for policy guardrail bundles. This is a top-level section, not a member of plugins. It is required when guardrails_policy.mode is observe or enforce. Unlike the top-level document, guardrail_source and guardrail_state accept unknown keys, so a misspelled key such as cache_ttl_sec is ignored rather than rejected.

FieldTypeDefaultNotes
namestring-Instance name.
kindenum-file or registry.
pathpath-Required for file. Reads a plain bundle only when unsigned input is explicitly allowed; otherwise reads an ES256 JWS.
verification.allow_unsignedbooleanfalseAccept an unsigned file bundle. Use only in a trusted development environment.
verification.public_key_filepathunsetES256 public keys in PEM form.
verification.public_key_pemstringunsetInline ES256 public keys in PEM form.
source_idstringunsetStable file-source identity for rollback protection. Required for signed sources.
high_water_pathpathbeside the bundle in unsigned development modeGateway-owned, persistent, writable high-water mark used to reject rollback. Required for signed sources.
reload_interval_secsinteger120File polling fallback interval.
base_urlURL-Required for registry. Registry internal-listener root.
bearer_token_filepath-Required for registry; reread each time the gateway fetches a bundle.
endpoint / pathstring/internal/v1/guardrails/effectiveRegistry endpoint override.
timeout_msinteger3000Registry request timeout.
cache_ttl_secsinteger900How long a fetched bundle is reused before the registry is called again. A rule change can take this long to reach a session.
on_backend_errorenumlast_knowndeny, allow, or last_known, for a failed fetch when the session has no cached bundle. last_known behaves like deny, because a cached bundle is reused only within cache_ttl_secs. allow substitutes an allow-all bundle.

Registry bundles are session-scoped and load lazily on the first authenticated request for that session. The gateway does not attempt an anonymous bundle fetch at startup.

The current CLI cannot initialize a signed file source on a fresh state volume because it does not expose the library's bootstrap operation. An uninitialized or lost high-water state fails closed.

guardrail_state

Optional state store for stateful policy guardrails. This is also a top-level section.

FieldTypeDefaultNotes
namestring-Instance name.
kindenum-memory or redis. No direct registry state kind is wired.
urlURL-Required for redis.
key_prefixstringorca:Redis key prefix.
session_ttl_secs, turn_ttl_secsinteger86400, 300Redis only. State lifetime for session and turn scopes. Values below 1 become 1.
subject_day_ttl_secs, subject_minute_ttl_secsinteger172800, 300Redis only. State lifetime for subject windows. Values below 1 become 1.
flush_interval_msinteger2000Coalescing interval for registry writeback.

When a Redis state store is paired with a registry guardrail source, the gateway builds a write-back client from the source's base_url, bearer_token_file, and timeout_ms, and posts state updates to /internal/v1/workspaces/{workspace}/sessions/{session}/guardrail-state. The gateway fails to start unless base_url is a bare service root. Flush failures are logged, not retried, and not returned to the client; when the flush queue is full, new batches are dropped.

guardrails_policy

Controls policy guardrail evaluation. Payload guardrails under plugins.guardrails[] use a different contract.

FieldTypeDefaultNotes
modeenumoffoff, observe, or enforce.
phaseslistall four Gateway phasesllm_request, llm_response, tool_call, tool_result. Harness-only request and response are rejected while policy is active.
failure_mode.llm_requestenumallowdeny, allow, or soft_allow_with_alert.
on_missingenumallowBehavior when no bundle is available.
on_expiredenumsoft_allow_with_alertBehavior once a bundle is older than its expires_at plus max_staleness_secs. At tool_call, anything other than allow denies.
on_unsupported_guardrailenumdenydeny or skip_with_alert.
refresh_interval_secsinteger30Bundle refresh cadence. Must be greater than zero.
max_staleness_secsinteger900Grace period after a bundle's expires_at before on_expired applies. Must be greater than zero.

vaults

FieldTypeDefaultNotes
namestring-Referenced by credentials.vault.
resolverenum-env, static_file, http.
env_varstringunsetFixed environment variable for env. When absent, the resolver derives a namespaced name.
schemestringderivedOptional canonical credential scheme for env.
prefixstringORCA_VAULT__For derived env names.
filepath-For static_file. YAML or JSON nested credential map loaded at startup.
url_templatestring-For http. Interpolates {credential_id} and {scope.<dim>}.
bearer_token_filepathunsetOptional bearer token file for http.
timeout_msinteger5000For http.
cacheobjectenabledenabled: true, ttl_secs: 300, max_entries: 1024.

Cloud secret-manager resolvers are not implemented. Use an environment variable, static file, or an http resolver in front of a trusted credential service. See Vaults for the static-file schema and cache behavior.

legacy_mcp_gateway

Accepts the YAML of the earlier mcp-gateway service verbatim and expands it before validation. Mutually exclusive with every other top-level key. Deprecated. See Migrate.

On this page